TGI Multi-LoRA: Deploy Once, Serve 30 Models
Text Generation Inference (TGI) v2.1.1 adds multi-LoRA serving: one base model such as Mistral-7B is deployed once, and many small LoRA adapters are loaded alongside it, with each request picking its adapter via an adapter_id. Adapters are tiny (13.6MB versus 14.48GB for the base), so loading 30 of them adds only about 3% VRAM. The post shows deployment via Docker with the LORA_ADAPTERS setting, Inference Endpoints through the GUI and in Python, and how to query a specific adapter. It argues that per-token cost stays flat as models are added and that consolidating bursty per-model traffic onto one deployment smooths GPU utilization.
Related posts
- Llama 2 is here - get it on Hugging Face
Hugging Face mediumAdeptMeta's Llama 2 family (7B, 13B, 70B base and RLHF-tuned chat models) is released under a commercially usable license, trained on 40% more tokens than Llama 1 with 4k context and grouped-query attention for the 70B model, and is integrated across the Hugging Face ecosystem. Inference runs through transformers 4.31 or Text Generation Inference and Inference Endpoints, with recommended GPU sizes per model (A10G for 7B, A100 for 13B, 2-4x A100 for 70B). The 7B model can be fine-tuned on a single 16GB T4 using QLoRA and trl's SFTTrainer. The chat prompt format uses [INST] and <<SYS>> delimiters, and prompts must match the training template exactly for system prompts and multi-turn conversations to work.
- Async GRPO with LoRA across HF Jobs: a bucket, a proxy, and no NCCL
Hugging Face hardMasterTRL v1.14's AsyncGRPOTrainer can train a LoRA adapter and sync only that adapter to vLLM, which lets the trainer and inference replicas run as separate Hugging Face Jobs on separate machines without NCCL. A rank-1 adapter for a 1.5B model is a few megabytes, so it travels through a Storage Bucket mounted at the same path in every Job, and vLLM loads it via /v1/load_lora_adapter. Versioned adapter names and max_staleness+2 adapter slots keep in-flight rollouts on their original policy and stop prefix-cache reuse across weight versions. A small proxy adds the auth header, broadcasts adapter loads, pause and resume to every replica, and routes the G=8 rollouts of each prompt to the replica holding their KV prefix using adapter-seeded chained block hashes. Using the AsyncGRPO metrics to find bottlenecks, five runs cut the same 500-step recipe from 3 h 27 min to 53 min.
- Goodbye cold boot - how we made LoRA Inference 300% faster
Hugging Face mediumAdeptHugging Face's Inference API now keeps Stable Diffusion base models warm and swaps LoRA adapters per request, so hundreds of distinct LoRAs share a few GPUs instead of each getting a dedicated deployment. Requests carrying a base_model attribute and a lora tag are routed to a shared backend that uses Diffusers' load_lora_weights/fuse_lora and unfuse_lora/unload_lora_weights to swap adapters in 2-4 seconds. Warm-up dropped from 25s to 3s and cold request latency from 35s to 13s, with hundreds of LoRAs served on fewer than 5 A10G GPUs. Fusing weights cuts inference time by 30%, and batched LoRA inference was skipped because diffusion throughput rose only 25% at batch size 8 while latency grew sixfold.
- LoRA Explained: Faster, More Efficient Fine-Tuning with Docker
Docker mediumAdeptGemma 3 270M can be specialized into a compact PII-masking assistant using LoRA, which freezes the base weights and trains only small low-rank adapters, cutting compute and memory needs while avoiding catastrophic forgetting. The walkthrough covers formatting supervised examples with the model's chat template so training data matches inference input, configuring PEFT adapters (r=16, alpha=32 on q_proj/v_proj), training with TRL's SFTConfig via Unsloth, and merging adapters into a standalone 16-bit checkpoint. The merged model can then be packaged and shared through Docker Model Runner and Docker Hub.
- Hugging Face on AMD Instinct MI300 GPU
Hugging Face easyNoviceHugging Face's transformers and text-generation-inference (TGI) now run on AMD Instinct MI300X GPUs with no code changes, backed by a Kubernetes-scheduled CI pipeline that runs tens of thousands of unit tests on MI250 and MI300 hardware. TGI optimizations for MI300 include Flash Attention v2, Paged Attention, GPTQ/AWQ kernels, fused kernels, and PyTorch's ROCm TunableOp. TunableOp tunes GEMMs during server warmup and gives an 8-10% decode latency gain on small inputs. On Llama 3 70B, MI300X on Azure delivers 2-3x faster time to first token and 2x faster decoding than MI250, and roughly 2x faster LoRA fine-tuning. Its 192 GB HBM3 also fits the full ~140 GB fp16 model on a single GPU.