Getting Started with Flux¶
Welcome to Flux! This guide will help you get up and running with the adaptive post-training framework for LLMs.
What is Flux?¶
Flux is an adaptive post-training framework that combines the best of synchronous and asynchronous RLHF training. Instead of forcing you to choose between stability and efficiency, Flux dynamically adjusts based on your training dynamics.
-
5 min setup
Get Flux installed and configured in under 5 minutes
-
Quick Start
Run your first training in 10 lines of code
-
First Training
Complete walkthrough of your first training run
-
Configuration
Learn the basics of Flux configuration
Prerequisites¶
Before you begin, ensure you have:
- Python 3.10+
- CUDA 12.0+ with compatible GPU (H100/A100 recommended)
- 16GB+ GPU memory (for 8B models)
- SGLang installed for inference
Installation Overview¶
Quick Example¶
from flux import FluxConfig, FluxTrainer
# Configure training
config = FluxConfig(
model_path="Qwen/Qwen3-8B",
num_steps=1000,
batch_size=32,
algorithm="grpo",
)
# Create trainer and run
trainer = FluxTrainer(config)
trainer.fit(prompts="data/prompts.jsonl")
Learning Path¶
New to Flux? Follow this recommended learning path:
graph LR
A[Installation] --> B[Quick Start]
B --> C[First Training]
C --> D[Configuration]
D --> E[Tutorials]
E --> F[Advanced Topics]
- Installation - Set up your environment
- Quick Start - Run a minimal example
- First Training - Complete training walkthrough
- Configuration - Understand configuration options
- Tutorials - Deep-dive tutorials
- Concepts - Core concepts explained
Need Help?¶
-
Community
Ask questions and get help from the community
-
Issues
Report bugs or request features
-
FAQ
Common questions and answers
FAQ¶
What GPUs are supported?
Flux supports NVIDIA GPUs with CUDA 12.0+. We recommend:
- Development: RTX 4090, A100 (40GB)
- Production: H100 (80GB), A100 (80GB)
Minimum 16GB VRAM for 8B models, 80GB for 70B models.
Can I use Flux with vLLM instead of SGLang?
Currently, Flux is optimized for SGLang integration. vLLM support is planned for future releases.
How does Flux compare to TRL?
TRL is excellent for simple RLHF setups. Flux is designed for:
- Large-scale distributed training (64+ GPUs)
- Maximum GPU utilization through adaptive async
- Native Megatron integration for 3D parallelism
If you're training on 1-8 GPUs, TRL may be simpler. For scale, choose Flux.
Is Flux production-ready?
Flux is under active development. Core features are stable, but we recommend testing thoroughly before production deployment.
Next Steps¶
Ready to dive in? Start with the Installation Guide.