Skip to content

Tutorials

Hands-on tutorials to help you master Flux for various RLHF training scenarios.


Learning Path

graph LR
    A[Basic RLHF] --> B[Custom Rewards]
    B --> C[Multi-GPU]
    C --> D[DPO Training]
    D --> E[Adaptive Async]
    E --> F[Production]

Beginner Tutorials

  • Basic RLHF Training


    Complete walkthrough of training an LLM with RLHF using Flux.

    Time: 30 minutes Prerequisites: Flux installed

    Start Tutorial

  • Custom Reward Functions


    Learn to create custom reward functions for your specific task.

    Time: 20 minutes Prerequisites: Basic RLHF tutorial

    Start Tutorial


Intermediate Tutorials

  • Multi-GPU Training


    Scale your training across multiple GPUs on a single node.

    Time: 45 minutes Prerequisites: Basic training working

    Start Tutorial

  • Fine-tuning with DPO


    Use Direct Preference Optimization for preference learning.

    Time: 30 minutes Prerequisites: Preference data available

    Start Tutorial


Advanced Tutorials

  • Adaptive Async in Practice


    Deep dive into configuring and monitoring adaptive async control.

    Time: 60 minutes Prerequisites: Multi-GPU training

    Start Tutorial

  • Production Deployment


    Deploy Flux training at scale with monitoring and fault tolerance.

    Time: 90 minutes Prerequisites: All previous tutorials

    Start Tutorial


Quick Reference

Tutorial Difficulty Time Key Topics
Basic RLHF Beginner 30 min FluxTrainer, GRPO, basic config
Custom Rewards Beginner 20 min RewardFunction, FunctionReward
Multi-GPU Intermediate 45 min TP, DP, distributed training
DPO Training Intermediate 30 min DPO algorithm, preference data
Adaptive Async Advanced 60 min PID tuning, staleness monitoring
Production Advanced 90 min Monitoring, checkpoints, scaling

Tutorial Format

Each tutorial follows a consistent structure:

  1. Overview - What you'll learn
  2. Prerequisites - What you need before starting
  3. Setup - Environment and data preparation
  4. Step-by-Step - Detailed instructions
  5. Verification - How to know it worked
  6. Troubleshooting - Common issues and solutions
  7. Next Steps - Where to go from here

Sample Projects

Complete example projects you can clone and run:

Math Reasoning (GSM8K)

Train a model for mathematical reasoning using GRPO.

git clone https://github.com/flux-team/flux-examples
cd flux-examples/math-reasoning
./run.sh

Code Generation (HumanEval)

Train a model for code generation with custom evaluation.

git clone https://github.com/flux-team/flux-examples
cd flux-examples/code-generation
./run.sh

Chat Assistant (UltraChat)

Build a general-purpose chat assistant.

git clone https://github.com/flux-team/flux-examples
cd flux-examples/chat-assistant
./run.sh

Video Tutorials

Coming soon! Subscribe to our YouTube channel for video walkthroughs.


Community Tutorials

Have you written a tutorial about Flux? Submit it here and we'll feature it!


Getting Help

Stuck on a tutorial? Here's how to get help:

  1. Check the FAQ
  2. Search GitHub Issues
  3. Ask on Discord
  4. Open a new issue with the tutorial-help label