lorax

predibase/lorax

Multi-LoRA inference server that scales to serve thousands of fine-tuned LLMs on a single GPU

3.8k
Stars
323
Forks
183
Open issues
33
Watchers
Python Apache-2.0Last pushed May 28, 2026

Overview

LoRAX (LoRA eXchange) is an innovative framework for scaling multi-LoRA models, offering dynamic adapter loading, heterogeneous continuous batching, optimized scheduling, and high-performance optimizations.

Categories

Tags

Similar tools

Install

pip install lorax

README

LoRAX: Multi-LoRA inference server that scales to 1000s of fine-tuned LLMs

LoRAX (LoRA eXchange) is a framework that allows users to serve thousands of fine-tuned models on a single GPU, dramatically reducing the cost of serving without compromising on throughput or latency.

πŸ“– Table of contents

  • πŸ“– Table of contents
  • 🌳 Features
  • 🏠 Models
  • πŸƒβ€β™‚οΈ Getting Started
    • Requirements
    • Launch LoRAX Server
    • Prompt via REST API
    • Prompt via Python Client
    • Chat via OpenAI API
    • Next steps
  • πŸ™‡ Acknowledgements
  • πŸ—ΊοΈ Roadmap

🌳 Features

  • πŸš… Dynamic Adapter Loading: include any fine-tuned LoRA adapter from HuggingFace, Predibase, or any filesystem in your request, it will be loaded just-in-time without blocking concurrent requests. Merge adapters per request to instantly create powerful ensembles.
  • πŸ‹οΈβ€β™€οΈ Heterogeneous Continuous Batching: packs requests for different adapters together into the same batch, keeping latency and throughput nearly constant with the number of concurrent adapters.
  • 🧁 Adapter Exchange Scheduling: asynchronously prefetches and offloads adapters between GPU and CPU memory, schedules request batching to optimize the aggregate throughput of the system.
  • πŸ‘¬ Optimized Inference: high throughput and low latency optimizations including tensor parallelism, pre-compiled CUDA kernels (flash-attention, paged attention, SGMV), quantization, token streaming.
  • 🚒 Ready for Production prebuilt Docker images, Helm charts for Kubernetes, Prometheus metrics, and distributed tracing with Open Telemetry. OpenAI compatible API supporting multi-turn chat conversations. Private adapters through per-request tenant isolation. Structured Output (JSON mode).
  • 🀯 Free for Commercial Use: Apache 2.0 License. Enough said 😎.

🏠 Models

Serving a fine-tuned model with LoRAX consists of two components:

  • Base Model: pretrained large model shared across all adapters.
  • Adapter: task-specific adapter weights dynamically loaded per request.

LoRAX supports a number of Large Language Models as the base model including Llama (including CodeLlama), Mistral (including Zephyr), and Qwen. See Supported Architectures for a complete list of supported base models.

Base models can be loaded in fp16 or quantized with bitsandbytes, GPT-Q, or AWQ.

Supported adapters include LoRA adapters trained using the PEFT and Ludwig libraries. Any of the linear layers in the model can be adapted via LoRA and lo