
Production LLM deployment comes in six formats, each striking a different balance between inference speed and hardware flexibility. Faster formats like TensorRT lock optimizations into machine code for specific GPUs, while portable formats like safetensors and ONNX run on any compatible hardware but without speed gains. The choice depends on whether your latency budget allows you to sacrifice compatibility for raw performance.
Summaries like this, in your inbox every morning.
Sign up free →What happened
A technical breakdown of six production LLM deployment formats—Pickle, safetensors, GGUF, ONNX, MLX, and TensorRT—each with different tradeoffs between inference speed and hardware compatibility. Pickle and safetensors run anywhere Python runs; GGUF bundles weights and tokenizer for CPU-only machines; ONNX lets models switch frameworks; MLX optimizes for Apple silicon; TensorRT compiles to specific NVIDIA GPUs for maximum speed.
Why it matters
Faster models require hardware-specific choices baked into the file, so a single model must be rebuilt separately for each chip or runtime it needs to support. Teams must choose how far down the speed-versus-compatibility ladder to go—trading inference latency against the types of hardware that can actually run the model in production.
What to watch
The article emphasizes holding the deployment format as high on the speed-compatibility chart as the latency budget allows, because every step toward faster execution narrows the hardware it can run on. Teams deploying LLMs face a constant tradeoff between minimizing response time and maximizing portability.
The article presents LLM deployment as a technical choice with hard tradeoffs. Google and Anthropic both recognize the same principle: a faster model file requires hardware-specific optimizations that lock the model into running on particular hardware. Those optimizations—CPU/GPU instructions, memory layouts, compiled assembly code—cannot transfer between chip architectures. The consequence is that a single model must be rebuilt separately for each target hardware environment.
The six deployment formats are ranked by speed potential. At the portable end, Pickle and safetensors hold raw weights and run anywhere Python runs, but neither offers speed beyond what the surrounding framework provides. Pickle files are lists of instructions that torch.load executes; loading them can even trigger malicious payloads. Safetensors instead holds plain numbers in memory-aligned layouts, so the file opens with nothing left to rebuild—safer and cleaner, though still needing Python, model code, and a tokenizer alongside.
GGUF bundles everything into a single file: weights, tokenizer, and chat template ship together, and tools like llama.cpp or Ollama run it directly, requiring no ML framework at all. ONNX is an interchange format—it decouples the training framework from the runtime by specifying operations and their order, but leaves the hardware choice to the runtime, which picks CPU, CUDA, or an NPU at load time.
At the fast end, MLX is Apple's framework for its own silicon, exploiting the fact that CPU and GPU share a single memory pool; weights never copy between them, a win unavailable on any other machine. TensorRT is NVIDIA's compiler, turning a model into machine code for one specific GPU—everything is settled at build time, down to instructions validated on the exact card being compiled for, and the file will not load on a different GPU architecture.
The article concludes with a strategic principle: stop as high on the chart as the latency budget allows, because every row down trades speed for hardware portability. Teams must measure their response-time requirements and choose the deployment format that fits—accepting portability loss only where speed is genuinely necessary.
The article frames a fundamental constraint in LLM deployment: the speed-portability tradeoff. As models become faster through hardware-specific optimizations, they become less portable. This explains why major AI providers maintain multiple versions of the same model—a practical necessity, not a choice. The six formats form a spectrum, with the safest default sitting high on the chart (favoring compatibility) and dropping down only when latency budgets demand it.
The breakdown also reveals why different formats exist for different environments. GGUF and Ollama enable deployment where Python and ML frameworks are unavailable (edge devices, servers without ML infrastructure). ONNX acts as a bridge, letting models trained in one framework run in another. MLX and TensorRT represent the opposite end: maximum speed by committing fully to Apple's unified memory architecture and NVIDIA's specific GPU instruction sets, respectively. Teams choosing a format are essentially choosing which hardware constraints they are willing to accept.
AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.
Free · takes 30 seconds · unsubscribe anytime
No comments yet. Be the first to share your thoughts!
Log in to join the discussion


Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.
Get Started FreeFree · takes 30 seconds · unsubscribe anytime