CODLAB / Blog · AI & integration

On-Premise LLMs vs European Cloud APIs: GPU Memory Planning, Data Sovereignty, GDPR and the EU AI Act

14 Nov 2026 CODLAB Team 12 min

As of November 2026 · CODLAB Team

Direct answer: Choosing between on-premise open-weights language models and a European cloud API depends on data sensitivity, concurrency profiles, and operational capacity. Genuine data sovereignty requires auditing every hop from embeddings to backups, sizing GPU memory for dynamic KV-cache growth, and decoupling inference behind portable endpoints aligned with GDPR and the EU AI Act.

1. Why Open Weights Alone Do Not Equal Data Sovereignty

When planning enterprise AI infrastructure, two symmetrical misconceptions stand in the way: assuming that downloading an open-weights model (such as a Llama or Mistral checkpoint) automatically settles every data-protection question, or assuming that every external inference API represents an uncontrollable compliance failure. Both shortcuts miss how production systems actually move data.

Data sovereignty is not a property of model weights; it is a property of the entire technical and organizational data path. Across our applied engineering research at CODLAB on Sovereign AI & Data, we map seven concrete hops before recommending any infrastructure topology:

  1. Network ingress and TLS termination: Does encrypted traffic terminate inside controlled infrastructure, or traverse external reverse proxies and inspection layers?
  2. Document parsing and embedding generation: Are internal PDFs chunked and embedded locally — or silently sent to a remote embedding API even though chat generation runs on-premise?
  3. Vector index and permission metadata: Do embeddings and access filters reside inside controlled PostgreSQL infrastructure in Germany or the EU (see pgvector with Django)?
  4. Language model inference (serving): Does token generation run on in-house GPUs, dedicated single-tenant European instances, or a multi-tenant EU API — and do its terms guarantee both contractual no-training exclusion and, as a distinct technical property, genuine zero-data-retention with no provider-side prompt or output logging?
  5. Application logging and observability: Are prompts, retrieved passages, or stack traces forwarded to external SaaS telemetry platforms?
  6. Backup replication: Where are encrypted snapshots of vector tables and chat logs stored, and who holds the decryption keys?
  7. Administrative and support access: Which personnel or sub-processors hold hypervisor or SSH privileges, and under which legal jurisdictions?

Only after inspecting all seven stages can engineering and legal teams make a defensible infrastructure decision without resorting to hollow absolute guarantees.

2. GPU Memory Planning Beyond Naive Rules of Thumb: Weights, Quantization, and KV-Cache

When an organization opts for self-hosted GPU inference — whether in an on-site server room or on dedicated European bare-metal servers — rigorous memory engineering replaces back-of-the-envelope estimates. Throughout our Engineering Notes, specifically Llama on GPU: plan memory, then measure, we demonstrate why checkpoint file size alone never predicts production stability.

Computing the idealized weight floor — multiplying parameter count by bit width and dividing by eight — yields roughly 32.6 GiB for a 70-billion-parameter model at 4-bit precision (taking care never to conflate decimal gigabytes GB with binary gibibytes GiB on hardware spec sheets). Under real server load, four additional consumers claim substantial GPU VRAM:

  • Quantization metadata and format constraints: Schemes such as AWQ and GPTQ store group scales and zero-points above the nominal bit floor. Moreover, GGUF, AWQ, and GPTQ target different execution kernels; a desktop llama.cpp label does not automatically translate into a stable production vLLM deployment.
  • Runtime buffers and CUDA graph workspaces: Serving engines pre-allocate activation workspaces and execution buffers during startup before a single user prompt arrives.
  • Dynamic Key-Value (KV) cache growth: Autoregressive generation retains attention key and value tensors across every transformer layer for all prompt and generated tokens. Long RAG document contexts multiplied by concurrent users expand KV-cache demand linearly with sequence length and batch concurrency.
  • Memory fragmentation under concurrent batching: Early serving stacks reserved contiguous memory slabs sized for maximum sequence length, stranding large portions of VRAM. Block-level virtual memory management via PagedAttention in vLLM partitions the KV-cache into non-contiguous pages, sharply curbing fragmentation and enabling high-throughput continuous batching (Kwon et al., SOSP 2023, arXiv:2309.06180).

Equally important for operational resilience (see Operations, Maintenance & Evolution): adding a second GPU inside the same chassis expands aggregate memory for tensor parallelism, yet a single shared host remains a single point of failure whenever power supplies, motherboards, or kernel updates fail.

3. Avoiding Vendor Lock-In: What Endpoint Portability Actually Requires

Tying business workflows, citation parsers, and access controls directly to a proprietary cloud SDK creates unnecessary lock-in. In CODLAB's Django RAG designs, we separate local PostgreSQL knowledge storage from decoupled model calls — while stating clearly how our lightweight reference assistant (ragbot) in the codlab.de codebase (public chat demo switched off since October 2026; code and data retained) differs from a fully switchable enterprise deployment.

In the codebase of our reference assistant (ragbot), pure cosine vector search uses PostgreSQL with pgvector, source boundaries and citation numbering (see RAG source boundaries) live in application code, and ragbot/services.py already reads getattr(settings, "RAG_OPENAI_BASE_URL", "") as an extension hook. However, codlab_site/settings.py in the delivered codlab.de configuration does not bind that environment variable by default, and the same client helper serves both chat completions and embeddings. Operational endpoint portability in an enterprise project therefore requires three explicit engineering steps: wiring environment settings in settings.py, verifying OpenAI-API parameter compatibility, and separating chat from embedding endpoints with full vector re-indexing whenever the embedding model or dimensionality (1536) changes:

# Enterprise configuration pattern (extending the hook prepared in ragbot/services.py):
# 1. Wire explicitly in settings.py: RAG_CHAT_BASE_URL = os.environ.get("RAG_CHAT_BASE_URL", "")
# 2. Separate chat and embedding clients; changing embedding models requires re-indexing!
from django.conf import settings
from openai import OpenAI

def build_chat_client():
    base_url = getattr(settings, "RAG_CHAT_BASE_URL", "") or None
    api_key = getattr(settings, "RAG_CHAT_API_KEY", "")
    kwargs = {"api_key": api_key}
    if base_url:
        # On-premise example: "https://llm-internal.company.lan/v1" (vLLM)
        kwargs["base_url"] = base_url
    return OpenAI(**kwargs)

With those three prerequisites in place, mid-market teams gain two real advantages: a domain pilot validated on a contractually vetted European API can later move chat generation onto internal vLLM GPUs without rewriting application workflows — while either keeping the existing embedding space or executing a planned re-indexing run — and candidate open-weights checkpoints can be evaluated reproducibly against the identical test suite.

4. An Honest Decision Matrix for Mid-Market Firms and Regulated Professions

Neither "always self-host" nor "always rent an API" survives serious technical and economic scrutiny. For planned deployments in industrial and service SMEs as well as confidentiality-critical environments such as law practices, we evaluate four dimensions jointly with IT leadership and legal counsel:

  • Confidentiality class and professional secrecy: Where unpublished R&D drawings, manufacturing formulas, HR files, or legally privileged client matters are processed, isolated on-premise infrastructure — or dedicated single-tenant European nodes where provider and sub-processor access is technically and contractually excluded — avoids multi-tenant exposure, always paired with formal review by qualified legal and data-protection counsel.
  • Utilization shape across the workweek: Steady daily document throughput across dozens of seats amortizes dedicated GPUs predictably. Conversely, sporadic bursts a few times per week leave self-hosted accelerators idle while power, cooling, and administration overhead accrue continuously.
  • Internal operations maturity: Running an internal vLLM node demands disciplined OS, container, and driver patching, VRAM and latency alerting, and tested backup and recovery runbooks.
  • Task complexity and multilingual synthesis: Compact and mid-sized open models perform strongly on tightly grounded RAG tasks, whereas complex cross-document synthesis across German, Italian, and English may narrow the margin. Whether a specific open model in 4-bit or 8-bit quantization suffices for the domain task is decided through comparative multi-run evaluation on the identical test set.

5. GDPR and the Consolidated EU AI Act (November 2026): Technical Documentation Duties

Running a model inside your own server room does not exempt an AI system from European law. As of November 2026, two statutory pillars govern technical documentation:

  1. General Data Protection Regulation (GDPR): Whenever personal data appears in prompts, indexed documents, or chat logs, Articles 5 and 6 GDPR apply regardless of whether servers sit on-site or in an EU cloud (Regulation (EU) 2016/679). External API or hosting processors require Article 28 processing agreements, Article 32 security controls, and Chapter V scrutiny of any third-country support access; high-risk processing requires a prior Data Protection Impact Assessment under Article 35 GDPR.
  2. Staggered obligations under the EU AI Act (consolidated text of 27 July 2026): The European AI Regulation (Regulation (EU) 2024/1689, consolidated version of 27.07.2026 incorporating Amending Regulation (EU) 2026/1744 of 08.07.2026) attaches obligations primarily to intended purpose and operator role rather than server location. Under Article 113, Chapters I and II (prohibited practices and Article 4 staff AI literacy) apply from 2 February 2025 — except for the newly inserted prohibitions in Article 5(1), first subparagraph, points (ba) and (bb), and Article 5(1a) and (1b), which apply from 2 December 2026. General provisions including Article 50 transparency duties apply from 2 August 2026 (subject to specific transitional provisions in Article 111). Under Article 113(c) as amended by Regulation (EU) 2026/1744, the staggered dates of 2 December 2027 (Article 6(2) and Annex III) and 2 August 2028 (Article 6(1) and Annex I) defer specifically Chapter III, Sections 1, 2, and 3, with the exception of Article 6(5) — not every obligation touching high-risk AI systems.

Germany's Federal Office for Information Security describes exposure or provider access to inputs and outputs in internet-delivered services as a distinct risk (R2); operational and attack risks such as Indirect Prompt Injection (R28) or faulty reactions to inputs (R3) apply independently of where the model is hosted and require dedicated engineering controls (BSI, Version 2.0, 2025). To structure preparation for your legal and privacy advisors, see our EU AI Act Guide (an engineering worksheet, not legal advice or conformity certification).

6. Synthetic Infrastructure Decision Protocol Before Hardware Procurement

Methodological note: The four-step protocol below illustrates our repeatable engineering decision process; it contains no invented client figures, pricing promises, or generalized hardware benchmarks.

Before purchasing server GPUs or signing multi-year API commitments, we execute four verifiable steps:

  1. Map all seven data hops: Document ingress, embeddings, pgvector storage, inference, logs, backups, and maintenance access.
  2. Calculate VRAM and KV-cache envelopes: Establish weight floors, maximum context windows, and concurrent request budgets following our GPU planning note.
  3. Run identical multi-pass evaluations: Execute the same domain and refusal test set across candidate quantized checkpoints and reference EU APIs through the shared OpenAI-compatible interface.
  4. Define operations and failover ownership: Specify patching cadences, monitoring thresholds, and fallback behavior prior to launch.

If your team is weighing local GPU inference, dedicated European hosting, or a hybrid RAG setup, explore Sovereign AI & Data or schedule an engineering review via Contact & Initial Consultation.

Continue in this research series: For the PostgreSQL and pgvector indexing and ranking pipeline behind sovereign document retrieval, read our study on hybrid RAG architecture, chunking, and reranking; for architectural controls against hosting-independent risks such as BSI R28, see Indirect Prompt Injection and source boundaries.

Verified Primary Sources

Frequently Asked Questions (FAQ)

Does running an open-weights LLM on our own server automatically make us compliant with GDPR and the EU AI Act?

No. Self-hosting eliminates data transfers to external inference providers, but GDPR rules on access control, retention, and lawful basis still apply, as do purpose-based EU AI Act duties such as staff AI literacy (Article 4) and user transparency (Article 50).

Why can a 4-bit quantized model run out of GPU memory under concurrent load even when the checkpoint file fits on disk?

Checkpoint weight bytes represent only the theoretical lower bound. Production serving also allocates quantization metadata, runtime activation buffers, and a dynamic KV-cache that scales with context length and simultaneous active requests.

Can we launch a pilot on a European API and migrate to internal GPU servers later without rewriting our application?

Yes, provided settings, API compatibility, and embedding boundaries are engineered upfront: when PostgreSQL/pgvector holds the index and Django settings wire chat and embedding endpoints separately, chat generation can move to a compatible internal vLLM server without rewriting domain logic, whereas changing the embedding model additionally requires full re-indexing.

Does installing two GPUs inside one server provide high availability for on-premise AI?

No. Multiple GPUs inside a single server share the same motherboard, power supply, operating system, and maintenance downtime. True failover requires separate hosts or a documented fallback path.

Related operational guide (German edition): KI im Unternehmen einführen: Vom Arbeitsauftrag zur überprüfbaren Freigabe.

Share this article

Comments

No comments yet. Be the first to comment!

Leave a comment

Will not be published

Related Articles

Project on your mind?

We develop tailored software and AI solutions. Let's start your next project together.

Free initial consultation