Skip to main content
MindStudio
Pricing
BlogAbout
My Workspace
fine-tune LLM locallymulti-LoRA servinglocal model training

How to Fine-Tune and Serve Multiple LLMs on One Local Machine

A practical breakdown of fine-tuning, quantizing, and serving multiple LLM adapters locally, with the memory math behind each step.

Edited by Luis Chavez-Mattos, Director of Product RSS
How to Fine-Tune and Serve Multiple LLMs on One Local Machine

What does it actually take to fine-tune and serve several LLMs on one machine?

Fine-tuning and serving multiple large language models locally comes down to three techniques used together: LoRA (or QLoRA) to shrink the trainable part of a model to under 1% of its parameters, multi-adapter serving to run several fine-tunes off one shared base model, and quantization formats like NVFP4 to compress the base model for fast inference. On hardware with enough unified memory, this makes it possible to train a 27B model, fine-tune a 120B model with QLoRA, and serve five specialized adapters at once, all without a GPU cluster.

TL;DR

  • Full fine-tuning is expensive by default: a mixed-precision, Adam-optimized full fine-tune needs roughly 16 bytes per parameter, which puts a 27B model at around 430GB before activations are even counted.
  • LoRA cuts that cost by freezing the base model and training small matrices on top of select layers, so gradients and optimizer states shrink to a sliver of the original memory footprint.
  • Enough unified memory lets you skip quantization during training: a 27B model fits in BFloat16 at about 54GB, which trains faster than QLoRA because there’s no dequantizing every step and no compounding quantization error.
  • QLoRA still earns its place at the top end: a 120B model quantized to 4-bit lands around 60-70GB, making single-box fine-tuning possible even at that scale.
  • Multi-LoRA serving is the efficiency trick that matters most for teams: one base model plus five lightweight adapters (each a few hundred megabytes) costs far less memory than five separately fine-tuned models, and tools like vLLM can batch requests to different adapters together.
  • LoRA teaches behavior, not facts, so pairing an adapter with retrieval-augmented generation (RAG) for current information is the more reliable architecture than trying to cram product catalogs or pricing into the weights.
  • A small routing model can direct traffic between adapters: a model as small as 270M parameters can classify incoming requests and send them to the right adapter, a bigger model, or an external API.
Developers have their tools. Enterprises have Remy.
Developers · AI coding tools
Claude Code
Codex
Cursor
GitHub Copilot
Enterprises · built into Remy
⌂Self-hosted
✓SOC 2
✚HIPAA
☰Audit log

How much memory does fine-tuning actually require?

Memory requirements for training are governed by a different set of rules than inference. A full fine-tune using mixed precision and the Adam optimizer needs about 16 bytes per parameter. That total includes the model weights, the gradients, a full-precision master copy of the weights, and two optimizer states. For a 27B parameter model, that math alone comes out to roughly 430GB, before accounting for activation memory during training.

That number rules out full fine-tuning for most business use cases on a single machine. It’s also typically unnecessary. Most companies aren’t trying to teach a model new general knowledge, they’re trying to teach it specific behaviors: how to format a response, which tool to call, how to write in a particular voice. That’s exactly the problem LoRA was built to solve.

How does LoRA change the memory math?

LoRA (Low-Rank Adaptation) freezes the base model entirely and trains two small matrices injected into the layers you care about. The trainable portion of the model typically works out to less than 1% of total parameters. Because gradients and optimizer states only need to track that small trainable slice, the memory requirement collapses to basically the size of the frozen base model itself, plus a small overhead.

This is where available hardware memory becomes the deciding factor in strategy. On smaller setups, fine-tuning a 27B model usually forces a move to QLoRA, quantizing the base model down to 4-bit precision (around 14-15GB) to make it fit. On a machine with enough HBM capacity, the full BFloat16 version of the same model (about 54GB) fits comfortably, leaving room for longer sequences and larger batch sizes. Training in BFloat16 instead of 4-bit also runs faster, since there’s no per-step dequantization and no accumulation of quantization error during training.

For larger models, QLoRA remains the practical path. A 120B parameter model quantized to 4-bit comes in around 60-70GB for the base weights, which still fits on a single box with a LoRA adapter trained on top.

What should you actually fine-tune on?

Two categories of data stand out as practical for most business applications.

The first is agent traces. Companies running agents against frontier APIs generate a trace every time the agent does a task well: looking up a record, calling the right tool, writing a correct reply. Filtering for the successful traces and fine-tuning on them teaches a local model your specific tools, schemas, and workflows, which can eventually let you stop paying per-token costs for the frontier model on routine runs. If the traces come from a commercial API, checking that provider’s terms of service around training on its outputs matters before you proceed.

Live class · Wed, Dec 2

$40,000+/mo

in SaaS spend the Remy team cut by building its own apps with AI.

We'll show you how.

Bring an idea.
Build it live.
Leave certified.

The second category is internal data: help center articles, past support tickets, policy documents, and guides, converted into instruction and response pairs. This is where LoRA fine-tuning and cloud-based fine-tuning diverge most sharply. Cloud fine-tuning usually means uploading your private data to a third party. Local fine-tuning keeps that data on your hardware, letting you keep both privacy and customization.

The caveat: LoRA is good at teaching behavior, not facts. It can teach a model your tone, your formatting conventions, which tool to call in which situation. It is a poor way to encode your full product catalog, current pricing, or anything that changes frequently. That job belongs to retrieval-augmented generation (RAG), which pulls current facts at query time. The practical setup pairs a behavior-tuned LoRA adapter with a RAG pipeline for facts, rather than trying to force one system to do both jobs.

What is multi-LoRA serving and why does it matter?

Once you have more than one fine-tuned behavior to support, say, a support team, a legal team, and a SQL-writing use case, you don’t need a separate full model for each. LoRA adapters are small: a rank-16 adapter on a 27B model typically lands in the low hundreds of megabytes. That means you can keep a single copy of the base model loaded in memory and attach a different adapter per department or task.

The savings compound quickly. Five independently fine-tuned 27B models would require roughly 270GB combined. One 54GB base model plus five adapters stays only marginally larger than the base model alone. Serving frameworks like vLLM support this pattern directly, batching requests for different adapters together so they run efficiently off the same base weights.

This also has an operational benefit: each team can own its own adapter and its own training data. A support team can retrain its adapter overnight using only its own tickets, without touching legal’s data or anyone else’s.

How do you route requests between multiple adapters?

With several adapters in play, something needs to decide which one handles a given request. This is a natural fit for a small, purpose-built classifier model rather than hardcoded rules. A model in the range of 270 million parameters can be fine-tuned to make a single fast decision, classifying an incoming request (billing, technical, refund, escalate to a human) and routing it to the matching adapter.

This router isn’t a general-purpose model. It’s narrowly trained for one decision in one workflow. Its small size means it trains quickly, so testing different training data, hyperparameters, and evaluation criteria across multiple runs is cheap. The same pattern extends beyond adapter routing: document classification, workflow triggers, or deciding whether a request should stay on a small local model or escalate to a larger model or external API are all reasonable uses of a tiny, specialized router model.

How does quantization fit into deployment?

Once a model is trained, there’s a decision about whether to deploy it as-is or quantize it further for faster inference. NVFP4 is a 4-bit floating point format with hardware-level support on Nvidia’s Blackwell architecture, which is part of why it runs efficiently on compatible systems.

The enterprise platform for building software with AI.
Vendor Risk Portal✓ SOC 2✓ HIPAA✓ Audit log
VendorsApprovalsContractsReportsSettings
Active vendors1,284
In review37
High risk6
VendorTierRiskApprovalNEW
Northwind SupplyTier 1LowApproved
Acme LogisticsTier 2MediumApprove
Helios DataTier 1HighPending
Granite FreightTier 3LowApproved
Pinecrest LabsTier 2LowApprove
You → RemyAdd an approval step for new vendors

Pre-built NVFP4 quantizations exist for popular models, calibrated against general-purpose datasets. But calibration data matters: a quantization process optimizes to preserve accuracy against whatever dataset it’s calibrated on. Running your own quantization using tools like Nvidia’s Model Optimizer, calibrated on your own support tickets or agent traces, keeps accuracy higher for your specific use case than relying on a generic calibration set.

Model Optimizer also supports pruning (removing parts of a network that contribute least to its predictions, using a recipe like Nvidia’s Minitron) and distillation (using the full fine-tuned model as a teacher for a smaller pruned “student” model). Pruning on its own can reduce quality, so it’s typically paired with distillation rather than used alone. On a machine with sufficient memory, both the teacher and student model can fit at the same time, removing the need for a separate training server during distillation.

Is reinforcement learning practical to run locally?

Supervised fine-tuning teaches a model what a good answer looks like. Reinforcement learning (RL) goes a step further, teaching a model how to search for good answers and reason its way there. The basic loop: the model generates multiple attempts at a task, a reward function scores each attempt, and the training process nudges the model toward the behaviors that scored highest.

This category of training has historically been the domain of frontier labs with large compute clusters, mostly because running generation, scoring, and training together is compute-intensive. Running it on a single local machine is a newer and still emerging capability, and it comes with its own pitfalls, particularly reward functions that get “gamed” by the model finding shortcuts that score well without actually solving the task correctly.

Frequently Asked Questions

What’s the difference between LoRA and QLoRA?

LoRA trains small adapter matrices on top of a frozen base model kept at full or near-full precision. QLoRA does the same thing but first quantizes the frozen base model down to 4-bit precision, trading some memory savings for slightly slower training since the base has to be dequantized during computation.

Can you fine-tune a 120B parameter model without a GPU cluster?

Yes, using QLoRA. Quantizing the base model to 4-bit brings it down to roughly 60-70GB, which fits on a single machine with enough unified memory, with a LoRA adapter trained on top of the frozen quantized weights.

Why use LoRA adapters instead of fine-tuning separate full models?

Separate full fine-tunes multiply storage and memory costs linearly, five models means five times the footprint. LoRA adapters are a few hundred megabytes each and share one base model, so serving multiple specialized behaviors costs barely more than serving the base model alone.

Should fine-tuning replace RAG for keeping a model’s knowledge current?

No. Fine-tuning with LoRA is suited to teaching behavior, tone, and tool use, not to storing facts that change over time, like prices or policies. RAG handles that by retrieving current information at query time, and the two are typically used together.

What is NVFP4 and why does calibration data matter?

NVFP4 is a 4-bit floating point quantization format with native hardware support on Nvidia’s Blackwell GPUs. Quantization accuracy depends on the calibration dataset used, so calibrating on your own data (support tickets, agent traces) preserves more accuracy for your specific use case than using a generic, pre-built quantization.

Editorial standards

Presented by MindStudio

No spam. Unsubscribe anytime.