HIPAA Compliant AI and GDPR Compliant AI
: The Guide to Self-Hosting Inference in 2027
A private GPU inference setup gives you control over where the model runs. Follow a patient record through queues, logs, and backups to see where the rest of the data goes.
Imagine a hospital that runs its AI model on a GPU it controls. A clinician clicks Draft discharge summary, the app pulls the relevant notes, and a draft comes back for review. The first demo goes exactly as planned.
Then the GPU times out. The gateway retries the request, the queue keeps a failed copy, and an error handler forwards the request body to a monitoring service. The model stayed on the private network. The discharge notes traveled farther than anyone expected.
That hypothetical failure is a useful way to design self-hosted AI inference. Inference is the work a trained model does when it processes a new input and produces an output.
Self-hosting inference puts that work on infrastructure you operate, whether it is in your own facility or in your cloud account. For healthcare AI deployment, that control is only the starting point. To make the deployment suitable for regulated data, follow the request through the application, the model, and the systems that handle its output and failures.
To make that concrete, this guide follows a discharge summary AI workflow and uses Superlinked Inference Engine (SIE) as a practical example of serving several models in one private deployment. If you want a team that already builds in this space, Barqsol delivers Healthcare AI solutions designed around these data paths.
Follow one Patient Record Through The System
Start with the smallest version of the discharge workflow. The app checks that the clinician is authorized to open the encounter, fetches the fields needed for the draft, and makes a single inference request.
The draft comes back to the clinician for review. This design gives you a small set of data paths to inspect before adding document search, asynchronous processing, or agent tools.
Draw the same workflow for a timeout. Write down which component retries, whether it keeps the full payload, who can inspect a failed job, and how long the job stays there. Repeat the exercise for a worker restart and a support request. This is the heart of AI data flow mapping: knowing exactly where protected health information (PHI) travels.
Where possible, make retries refer to an authorized job ID so each attempt can retrieve the approved inputs from their source. If a queue needs the payload, give that copy access controls, an expiry policy, and an owner. Treat every retry queue and dead letter queue as a place where PHI in logs and queues can quietly accumulate.
A timeout can move the same request through a retry queue and into monitoring. (From AI)
Retrieval introduces another set of copies. In retrieval-augmented generation (RAG for healthcare), an app searches an index for relevant passages and adds those passages to the model input.
If you add it, filter the search by the caller's record access and account for chunks, embeddings, and index snapshots in your data inventory.
Embeddings are numerical representations of text. Research has demonstrated text recovery from certain embedding models under experimental conditions (text embedding inversion), so a vector database deserves its own data classification and review.
Apply the same reasoning to tools. A tool that fetches an authorized encounter and a tool that sends an attachment to an external service make very different data flows possible. Start with a short list of allowed tools and destinations.
Give each tool only the fields it needs and make the application enforce the decision before it makes the call. This is data minimization applied at the tool level.
Turn Legal Requirements into Deployment Decisions
When HIPAA applies, identify the permitted use of PHI and include the inference workflow in the HIPAA Security Rule risk analysis (the HIPAA risk analysis).
The analysis covers risks to the confidentiality, integrity, and availability of ePHI (electronic protected health information).
It should account for who can access the system, how the team will detect and respond to incidents (AI incident response for healthcare), and what happens when the service or its storage fails.
When a cloud provider creates, receives, maintains, or transmits ePHI on behalf of a covered entity or business associate, HHS says the arrangement requires a HIPAA-compliant business associate agreement (BAA). Any BAA for AI vendors should be checked line by line.
That can include encrypted backup storage even if the provider lacks the decryption key. Check the services you actually use against your agreement and the provider's scope.
A cloud account can contain an eligible GPU service alongside a separate monitoring feature whose eligibility still needs review.
Where GDPR applies, document the purpose, the lawful basis under Article 6, and the applicable GDPR Article 9 health data condition for processing health data. GDPR Article 28 processor rules set requirements for processors and their contracts.
GDPR Article 32 security calls for security measures appropriate to the risk. Article 35 calls for a data protection impact assessment (DPIA for AI) before processing likely to result in high risk and expressly includes large-scale processing of health data.
Review international data transfers at the point of access as well as storage. The European Data Protection Board gives the example of a processor in a third country remotely accessing data held in the EU for support.
GDPR Chapter V applies in that example. Ask who can read a production trace or access a support bundle and from which legal entity, alongside where you deploy the database and GPUs (data residency).
Make the private endpoint part of a working deployment
Put the model server behind an authenticated gateway. Give the application a service identity, restrict routes to approved callers, and enforce encounter access (role-based access control) before retrieval. Keep workers on a private network and limit their outbound connections to destinations the workflow needs (outbound network restrictions).
If your inference server spans multiple machines, include worker communications in the design. vLLM, for example, documents that its multi-node communications are insecure by default and recommends dedicated network isolation.
Pick tooling based on the workload you can measure. For a small pilot, one approved model and a single model serving endpoint may be enough.
Start by measuring how long typical and unusually long drafts take, how wait times change when several clinicians submit requests together, and how frequently the service needs to retry.
If the app later needs semantic search or reranking models, assess that service separately, since it sees different inputs and may write to its own stores.
Build an AI audit trail you can use without routinely exposing clinical text. A restricted audit logging record might hold the authenticated actor, the action, a protected record reference, the model version, and a timestamp.
Performance dashboards can use a narrower stream with latency, status codes, and aggregate volumes.
Treat identifiers and metadata as sensitive whenever they can be linked back to people. Check default request logging in the gateway, model runtime, and tracing and monitoring system separately.
Practice model version pinning: pin the model and runtime versions, review the model's license and model provenance, and keep a record of what changed before you roll out a new version. Evaluate the draft against the job it is meant to do.
In this example, test whether it preserves follow-up instructions, omits important facts, or invents details that a clinician might miss during review. Give the reviewer access to the source notes and a clear way to discard the draft. This keeps clinical documentation AI safe in daily use.
How Superlinked fits into a self-hosted LLM stack
Superlinked Inference Engine (SIE) is an open-source server that can run embedding models, reranking, extraction, and generation models behind one API on infrastructure you operate.
In the discharge-summary example, SIE could embed a search query, rerank permitted passages from the encounter, and run the model that drafts the summary.
The application would still check the clinician's access before retrieving records, and the clinician would still review the draft before it enters the chart.
For a pilot with a one generation model, a dedicated serving endpoint may be enough. SIE is worth evaluating when the workflow needs several models and your team wants to serve them from one cluster.
Superlinked documents Kubernetes GPU deployment and air-gapped AI deployment options. If your environment must run without public internet access, stage approved model weights and container images in private infrastructure, then test that a cold start and a model update work with outbound access blocked.
Include the registry, logs, and any payload storage in the data-flow review.
Superlinked offers three distinct arrangements for this decision. Your team can operate the open-source engine itself, use Superlinked's hosted SIE Serverless API, or use Native Inference, where Superlinked engineers help evaluate models and operate a cluster in your cloud.
Review who can see prompts, logs, and support bundles under the arrangement you choose.
Confirm current terms directly. If a service would handle ePHI on your behalf and a BAA is required, keep that service outside the data path until the agreement is in place.
Rehearse failure, deletion, and recovery
Create a synthetic encounter with an unmistakable marker. Run a successful draft, a timeout, a retry, and a worker restart.
Then search the approved systems for the marker. Inspect queue payloads, logs, traces, archived error reports, and the monitoring sinks that receive the app's events.
Compare each occurrence with the data map. Ask who can retrieve each copy and test the answer with the relevant roles.
A distinctive marker in a synthetic record helps reveal which copies survive a restore. (From AI)
Run the reverse test with a clinician who lacks access to the encounter. Confirm the app denies the request before document retrieval or inference. Do it again against any background path so that a delayed retry runs with appropriate authorization even if the caller's access changes.
Set a clear failure behavior for an overloaded GPU. An external fallback model is a separate processing destination, so review its data handling and contract scope before wiring it in.
Finally, test retention alongside recovery. The source note, the draft, an approved chart entry, a retry copy, and a backup can all have different data retention policy rules.
Document which policy applies to each copy, how exceptions such as a legal obligation are handled, and what happens to previously deleted or expired data when a backup comes back online (encrypted backups included).
GDPR sets a storage limitation principle and a right to erasure with conditions and exceptions. Put the real retention and restore procedure through a rehearsal.
Source: GDPR Articles 5 and 17
Give the rehearsal an owner and an expected result before you run it. For instance, a successful request might leave one short-lived draft and one restricted audit record.
A failed request might leave a job identifier and a status code. Writing down those expectations makes it easier to spot an extra copy than reviewing a long list of services after the fact.
Keep the results with the deployment record. If a copy appears somewhere unexpected, record the path, fix it, and repeat the same test before approving the change.
The record should give the next operator enough detail to reproduce what happened during a service failure.
Choose what your team can operate
A HIPAA compliant AI hosting option from a hosted service can be suitable when the exact endpoints, enabled features, processor terms, access, and retention fit the workflow. Review the contract scope for each feature the application calls.
For example, a text endpoint and a background file-processing feature may be governed differently. Self-hosting gives you more direct control over model releases and traffic paths while assigning your team more of the work of patching, capacity planning, recovery, and incident response.
HIPAA and GDPR allow for third-party processing when applicable requirements are met. Sources: HHS on cloud services · GDPR Article 28
Compare hosted vs self-hosted AI inference using realistic peak traffic, acceptable queue times, the quality of drafts after clinician review, and the staffing needed to keep the service running.
A pilot can show whether a smaller model meets the quality bar or whether a particular feature would add an unnecessary processor. The result gives the team a reason to choose a deployment it can afford to maintain.
If you lack the in-house capacity, HIPAA compliant AI software development with an experienced partner can shorten the path from pilot to production. Barqsol builds HIPAA compliant AI solutions for healthcare teams, from data-flow review to deployment.
Before the first real patient record goes through, ask the team to walk through one failed request.
They should be able to show which system held the payload, who could open it, and when it expired.