Appearance
What is Weaver?
Weaver is a training API designed for researchers and developers working with large language models. As an ecosystem-oriented product, it seamlessly integrates with various agent frameworks (such as NexAU) and RL training frameworks (such as NexRL), enabling flexible fine-tuning of agentic models. Weaver lets you focus on what matters – you data, algorithms and agents – while handling the complexity of distributed training infrastructure.
Weaver is inspired by Thinking Machine Labs' Tinker.
Key Concepts
You write a simple training loop that runs on your machine, specifying your data and loss function. Weaver figures out how to make the training work efficiently on distributed GPUs, executing the exact computation you specified. To change the model you're working with, you only need to change a single string in your code.
Weaver gives you full control over the training loop and algorithmic details. It's not a magic black box – it's a clean abstraction that shields you from distributed training complexity while preserving your control.
Division of Responsibilities
| You Focus On | You Write | Weaver Handles |
|---|---|---|
| Your training data and environments | Simple Python script that runs locally | Distributed training across GPUs |
| Your training logic: loss functions, training loops, evaluations | API calls: forward_backward(), optim_step(), sample() | Infrastructure reliability and failure recovery |
Current Features
What Weaver currently supports:
- Model Support: Fine-tune open-weight models like Qwen3-8B
- LoRA Training: Implements low-rank adaptation (LoRA) fine-tuning for efficient training
- Weight Management: Download trained model weights for use with any inference provider
- Flexible Loss Functions: Built-in support for
cross_entropyandimportance_samplinglosses
Core Functionality
Weaver's main functionality is contained in a few key functions:
forward_backward(): Feed in your data and loss function to compute and accumulate gradientsoptim_step(): Update your model using accumulated gradientssample(): Generate outputs from your trained modelsave_weights_for_sampler(): Save model weights for inferencecompute_logprobs(): Compute log probabilities for sequencessave_state(): Save training state (model weights, optimizer state, etc.) for checkpointingload_state(): Load a previously saved training state to resume training
Why Weaver?
Simplicity: Clean, intuitive APIs focused on your training logic, not infrastructure.
Flexibility: Full control over training loops, loss functions, and algorithmic details.
Efficiency: Optimized distributed training without the complexity of manual configuration.
Next Steps
- Installation - Get started with Weaver
- Training and Sampling - Learn the core APIs
- Model Lineup - See supported models
- Loss Functions - Explore available loss functions