A loja já está disponível

Construímos máquinas Workstation AI para websites, agentes de IA e treino de LLM – configure e compre online.

Obter preços para revendedores
Produtos de IA
Laboratórios de IAAgentes OpenAIAgentes ClaudeBot GrokCRM nativo de IA Workstation AIMarketingTodos os produtos
Soluções de IA
IA aplicadaAgentes de IAIA generativaAutomação com IAFormação em IAPacotes de IA para PMELaboratório de IA empresarialWorkstations de IAHardware e software NVIDIAComputação acelerada NVIDIAIA privadaCloud privada de GPUClusters de GPUIA na edgeIA por setor
Serviços de IA
Modernização de plataformasEngenharia digitalFundações de dados e IAOperações autónomasConsultoria de IAAutomação DevOpsCibersegurançaDesenvolvimento de softwareCriação de agentesConfiguração de MLOpsLeasing de GPUCloud privada de GPU
Sobre nós
EmpresaA nossa históriaParceirosHistórias de clientes
Centros de dados de IA
Centros de dados de IACloud privada de GPUClusters de GPULeasing de GPU
Perspetivas sobre IASérie JevLaboratório de benchmarksSeleção de modelos
Notas técnicas
Documentação
Sistema operativo LinuxUbuntuRed Hat Enterprise LinuxSUSE LinuxAlpine LinuxDebian, Rocky e AlmaLinux
Plataformas de IA na cloudAWS e Amazon BedrockGoogle Cloud e Vertex AIMicrosoft Azure e AI FoundryClouds de GPU e marketplaces
Centros de dados de IA privadosPara escritórios de advogadosPara empresas de contabilidadePlataformas on-premisesCloud totalmente protegida
FerramentasRing PromoterJobshout
Notícias
Blogue
Contacte-nosIniciar sessão

Workstations de IA, software de IA multiagente, infraestrutura de GPU e soluções de agentes inteligentes para empresas modernas.

Contacte-nos

Soluções de IA

IA aplicadaAgentes de IAIA generativaAutomação com IAFormação em IAPacotes de IA para PMELaboratório de IA empresarialIA por setor

Produtos

Todos os produtosCRM e ERP nativos de IA Workstation AIMarketingAgentes OpenAIRing PromoterJobshout

Empresa

Sobre nósEmpresaCentros de dados de IAPorquê a WorkstationParceirosHistórias de clientesPreçosContactoTenthMatrix

Recursos

Perspetivas sobre IANotas técnicasDocumentaçãoSistema operativo LinuxPlataformas de IA na cloudCentros de dados de IA privadosBloguePesquisarMapa do site
Escritório na Bélgica
Workstation SRL, Rue Vanderkindere 34, 1180 Uccle, BrusselsBE 0751.518.683Seg – Sex: 9h00 – 18h00 CET
+32 492 45 67 46
Sede no Reino Unido
77-79 Marlowes, Hemel Hempstead HP1 1LFIndicações – saia na junção 20 da M25 (Outer London)N.º de registo da empresa: 11641870Seg – Sex: 9h00 – 18h00 GMT
+44 7515 356 146
Escritório na Índia
#159 Sector 9, Pocket 1, DDA Flats, 110077 Dwarka, New Delhi
+91 98881 98841
Escritório em Taiwan
3F, No. 2-4, Aisi Rd., Ren'ai Dist., Keelung City 200, Taiwan基隆市仁愛區愛四路2之4號3樓Seg – Sex: 9h00 – 18h00, hora de Taiwan (GMT+8)
+886 926 892 701+32 492 45 67 46
Escritório na Estónia
Aleksander Puškini tn 30-25, 20306 Narva, EstoniaSeg - Sex: 9h00 - 18h00, hora da Estónia (EET)
+32 492 45 67 46

© 2000-2026 Balinder Singh Walia. Todos os direitos reservados.

O sítio web Workstation e todo o seu conteúdo, bem como as APIs e plugins associados, são protegidos por direitos de autor de Balinder Singh Walia. balinder.walia@gmail.com

PrivacidadeEliminação de dadosCookiesTermos de serviçoMapa do site

NVIDIA, o logótipo NVIDIA, RTX, RTX PRO, Blackwell, CUDA, NVLink, MGX, Omniverse, Spectrum-X, Quantum, BlueField, DGX e HGX são marcas comerciais e/ou marcas registadas da NVIDIA Corporation nos EUA e noutros países. AMD, o logótipo AMD Arrow, EPYC, Instinct, Ryzen e Threadripper são marcas comerciais da Advanced Micro Devices, Inc. Dell e PowerEdge são marcas comerciais da Dell Inc. ou das suas subsidiárias. Intel e Xeon são marcas comerciais da Intel Corporation ou das suas subsidiárias. AMAX, AceleMax e LiquidMax são marcas comerciais da AMAX Engineering Corporation. Todos os outros nomes de produtos, logótipos e marcas são propriedade dos respetivos proprietários. Utilizamo-los apenas para identificar os produtos que descrevemos, fornecemos ou suportamos; a sua utilização não significa que os respetivos proprietários nos recomendem.

Início / Notas técnicas / Technology
AILLMMLOpsPerformanceGPU

Turbocharging LLMs

Technical brief: OS-style KV paging, near-zero-waste serving, agent debug loops, workstation token generation, and embedding-gated latent attention

30 de agosto de 2026Technology7 min read

Workstation technical brief: how to turbocharge LLM serving and agents with PagedAttention, vLLM, Self-Debugging, PowerInfer, and EG-MLA. Companion: blog · primer: LLMs on Kubernetes article · lab: Enterprise AI Lab.

Turbocharging LLMs cover

Agent digest.
  • Bottleneck: KV cache growth and fragmentation, not “the model is slow” in the abstract.
  • PagedAttention: OS-style paging of KV blocks; tune block size and cache hierarchy.
  • vLLM: serving engine with near-zero KV waste + continuous batching; watch TTFT vs tokens/s.
  • Self-Debugging: few-shot program repair beats huge candidate sets; cap rounds in prod.
  • PowerInfer: hot/cold split; 13.20 tok/s avg / 29.08 peak on RTX 4090 (paper/repo figures).
  • EG-MLA: architecture-level KV compression (~91.6% vs MHA); re-eval before swap.

1. Why serving, not training, is the crisis

Large language models changed NLP: chat, generation, tools. Training is expensive once; serving is expensive every second. Decode is autoregressive. Each new token needs the previous keys and values. Memory for that KV cache is proportional to layers × heads × hidden × sequence × batch. Prefill is compute-heavy; decode is memory-bandwidth-heavy. If you allocate a contiguous max-length KV tensor per request, most of it is empty until the sequence actually grows — classic internal fragmentation. Concurrent requests cannot steal those holes. Batch size drops. Tokens per second drop. GPUs look busy and still idle.

That is the problem PagedAttention and vLLM attacked in 2023, and the problem PowerInfer and later attention variants still attack from different angles.

Watch: LLM mental model

Context video: Intro to Large Language Models. Workstation explainer: how LLMs work and how to run them on Kubernetes.

2. PagedAttention: paging for the KV cache

PagedAttention logical pages vs physical GPU blocks

Kwon, Li, Zhuang, Sheng, Zheng, Yu, Gonzalez, Zhang, and Stoica introduced PagedAttention as an attention algorithm inspired by virtual memory and OS paging, and built vLLM on top of it [arXiv:2309.06180]. The idea:

  • Split KV into fixed-size blocks (a small number of tokens per block).
  • Keep a block table from logical token positions to physical GPU blocks (possibly non-contiguous).
  • Allocate/free blocks as sequences grow or finish — like page allocation, not like malloc of one giant array.
  • Share blocks (copy-on-write) for prefix reuse, beam search, and parallel sampling so you do not duplicate identical prefixes.

Implementation is not “set a flag on BERT.” The attention kernel must gather scattered blocks. The scheduler must know which blocks are free. The cache hierarchy matters: HBM-resident blocks vs CPU offload vs NVLink peers. Buffer (block) size is a real knob. Too small: more table lookups and kernel overhead. Too large: wasted slots inside the last partial block. Pair block size with max_model_len and the actual prompt/completion mix of your traffic.

Practice: profile fragmentation (unused KV bytes / reserved KV bytes) and tokens/s together. Memory graphs without throughput are vanity.

3. vLLM: the serving system around the pager

vLLM’s claim is near-zero waste in KV cache memory plus flexible sharing within and across requests. Evaluations in the paper showed roughly 2–4× throughput versus then-SOTA systems (FasterTransformer, Orca) at similar latency, with larger gains on long sequences and fancier decoding. Today the engine also ships continuous batching, chunked prefill, prefix caching, and tensor/pipeline parallel for multi-GPU.

Operational checklist:

  1. Set gpu_memory_utilization high enough to hold weights + KV, low enough to leave CUDA workspace.
  2. Enable prefix caching only after you confirm eval scores and p95 TTFT on your prompts.
  3. Separate prefill-heavy and decode-heavy pools if mixed traffic wrecks SLO (disaggregated serving).
  4. Expose OpenAI-compatible endpoints behind your gateway (Workstation estates often put this behind WSL Proxy / API gateway patterns).
from vllm import LLM, SamplingParams

llm = LLM(
    model="meta-llama/Llama-3.1-8B-Instruct",
    gpu_memory_utilization=0.90,
    max_model_len=8192,
    enable_prefix_caching=True,
)
params = SamplingParams(temperature=0.2, max_tokens=256)
outs = llm.generate(["Summarise PagedAttention for a platform engineer."], params)
print(outs[0].outputs[0].text)

Anti-pattern (this is not PagedAttention):

# Classifier forward pass — logits, not paged KV serving
import torch
from transformers import AutoModelForSequenceClassification
model = AutoModelForSequenceClassification.from_pretrained("bert-base-uncased")
out = model(torch.tensor([[1, 2, 3]]), attention_mask=torch.tensor([[1, 1, 1]]))
print(out.logits)

Watch: serving systems in the wild

Contextual serving talk. Canonical write-up: vLLM blog (PagedAttention) · engine: vllm-project/vllm.

4. Self-Debugging: more quality per candidate, not more candidates

Chen, Lin, Klein, et al. showed that teaching an LLM to debug its predicted program with few-shot demonstrations can match or beat baselines that generate more than 10× as many candidates [arXiv:2304.05128]. The loop is: generate → execute or unit-test → feed traces back → repair.

Production trade-off: each feedback message is another prefill+decode (or a long context append). Accuracy often rises with more rounds; so does latency and cost. Workstation guidance for agents (see also Muse Glimmer / local agents):

  • Hard cap on debug rounds (for example 2–4) per tool call.
  • Budget tokens separately from user-visible chat.
  • Escalate to a human or a specialist model instead of infinite retry.
  • Log traces for eval — Self-Debugging without telemetry is folklore.

5. PowerInfer: locality-aware token generation

PowerInfer (SJTU IPADS / related repos) is a token generation system that exploits activation locality: a small “hot” neuron set on GPU, colder weights streamed or executed on CPU. Published operating points include 13.20 tokens/s average and 29.08 tokens/s peak on a single NVIDIA RTX 4090, and up to 11.69× versus llama.cpp with retained accuracy [PowerInfer GitHub]. (User-facing forks such as Tiiny-AI/PowerInfer track the same line of work.)

Scale-out is the hard part. A single 4090 locality profile does not automatically become a healthy Kubernetes Deployment. You need:

  • Honest GPU requests/limits and NUMA-aware CPU pinning if CPU experts run.
  • A distributed plan if the model no longer fits: tensor parallel vs pipeline vs expert parallel.
  • SLO split: interactive chat vs batch completion vs agent tool loops.

Use PowerInfer (or llama.cpp, or MLX) on workstations and edge boxes; use vLLM (or TensorRT-LLM, or SGLang) when you are filling datacenter GPUs with concurrent OpenAI-style traffic. Measure both. Our Enterprise AI Lab stance is the same as Polyglot Benchmarks: evidence, then ADR.

6. EG-MLA: compress attention at the architecture

Serving tricks cannot fix a model whose KV is intrinsically huge. EG-MLA (embedding-gated multi-head latent attention) reports over 91.6% KV cache size reduction versus multi-head attention (MHA) with negligible degradation, additional savings versus MLA (up to 59.9%), and improved reasoning-benchmark accuracy. The authors argue embedding gating induces implicit high-order interactions and show scaling past 1B parameters [EG-MLA, arXiv].

Engineering implication: this is a training / architecture decision. You cannot flip EG-MLA on a random vLLM nightly of Llama-3 and expect the paper’s percentages. If you control pretrain or continued pretrain, EG-MLA is a candidate to cut HBM before you buy another GPU. If you only serve public weights, stay on PagedAttention + quantization + MLA variants the engine already supports, and track EG-MLA checkpoints as they land.

Four technique cards: vLLM, PowerInfer, Self-Debugging, EG-MLA

7. Combining the stack without cargo-culting

Layer Use when Watch out
PagedAttention / vLLMConcurrent API serving, long context, shared prefixesPrefix cache vs correctness; OOM at high util
PowerInferSingle fat GPU / workstation token rateLocality mismatch; messy scale-out
Self-DebuggingCode / agent loops that can execute testsUnbounded rounds; extra prefill cost
EG-MLAYou train or fine-tune the backboneNot a serving flag; re-run full eval

8. Scalability on Kubernetes

A well-designed distributed architecture raises throughput and also raises failure modes: stragglers, KV cache transfer, tokenizer skew, and autoscalers that kill warm prefixes. Practical pattern (aligned with our Ollama / vLLM on Kubernetes write-up):

  • Dedicated GPU node pools; never pack decode pods with random CPU jobs.
  • Separate prefill and decode if TTFT SLOs and tokens/s SLOs fight.
  • HPA on queue depth or GPU KV occupancy, not only CPU.
  • Promote serving stacks through rings (Ring Promoter) so a bad engine build cannot skip test.

9. Conclusion

Turbocharging LLMs is not one algorithm. It is paging the KV cache (PagedAttention), a serving engine that does not waste those pages (vLLM), locality-aware generation when the hardware is a workstation GPU (PowerInfer), agent loops that debug instead of spraying candidates (Self-Debugging), and — when you own the weights — attention that simply stores less (EG-MLA). Every layer trades memory, latency, and accuracy. Measure on your traffic. Publish the ADR. Ship.

References

  • Kwon et al. — Efficient Memory Management for Large Language Model Serving with PagedAttention (arXiv:2309.06180, 14 Sep 2023).
  • Chen et al. — Teaching Large Language Models to Self-Debug (arXiv:2304.05128, 12 Apr 2023).
  • PowerInfer — SJTU-IPADS/PowerInfer (and related Tiiny-AI forks).
  • EG-MLA — Embedding-Gated Multi-head Latent Attention (arXiv, 20 Sep 2025).
  • vLLM blog — Easy, Fast, and Cheap LLM Serving with PagedAttention.

Published by Workstation. Paper figures cited as published by the original authors; production numbers on your cluster will differ.

Partilhar este artigo

Mais sobre Technology

Portáteis para programadores de IA: correr LLM localmente em Linux com GPU de 16 GB e 24 GB (guia de 2026)

Portáteis para programadores de IA: correr LLM localmente em Linux com GPU de 16 GB e 24 GB (guia de 2026)

O que cabe numa RTX 5080 ou RTX 5090 Laptop GPU, as contas da memória, os modelos abertos que vale a pena correr, a configuração do Ubuntu 26.04 com a stack NVIDIA, Ollama, llama.cpp e vLLM, assistentes de programação, fine-tuning LoRA, segurança e quando passar o trabalho para um servidor

Ler mais
Testar sistemas de ML e LLM que não pode provar corretos: um kit de evidências em Python

Testar sistemas de ML e LLM que não pode provar corretos: um kit de evidências em Python

Evidências em vez de provas, em cerca de 400 linhas de Python com resultados reais: métricas por segmento com intervalos bootstrap e um contrato de aprovação/reprovação, testes de propriedades e metamórficos com Hypothesis, calibração e conformal prediction, contratos Pydantic e avaliações de regressão para saídas de LLM, verificações de drift, um gate de CI e a verificação exata de uma pequena rede neuronal

Ler mais
TorchCurves na prática: curvas B-spline e de Legendre aprendíveis em PyTorch

TorchCurves na prática: curvas B-spline e de Legendre aprendíveis em PyTorch

Instalar o torchcurves, ajustar e dimensionar uma curva, escolher B-spline ou Legendre e o mapa de entrada, construir uma curva de calibração monótona e um modelo aditivo sobre dados tabulares, comparar com SciPy, scikit-learn, uma KAN e uma MLP, exportar os coeficientes para JSON, testar e executar em produção, com resultados reais

Ler mais