ModelForge v3 introduces a modular provider system that allows you to choose different model loading and optimization backends.
Providers are backends that handle:
- Loading models from model hubs or local storage
- Applying optimizations and patches
- Managing tokenizers
- Setting up device mappings
Different providers offer different trade-offs in terms of speed, memory usage, and compatibility.
| Provider | Speed | Memory | Platform Support | Description |
|---|---|---|---|---|
| HuggingFace | 1x (baseline) | Standard | Windows/Linux | Standard HuggingFace Transformers |
| Unsloth | 2x faster | 20% less | Linux/WSL/Docker only | Optimized training kernels |
✅ Running on native Windows
✅ Maximum compatibility needed
✅ Using models not supported by Unsloth
✅ Debugging or development
✅ First time using ModelForge
✅ Running on Linux or WSL
✅ Training large models (7B+ parameters)
✅ Need faster training times
✅ Have limited VRAM
✅ Using supported architectures (Llama, Mistral, etc.)
{
"provider": "huggingface",
"model_name": "meta-llama/Llama-3.2-3B",
"task": "text-generation",
...
}- Go to Training tab
- Select Provider dropdown
- Choose
huggingfaceorunsloth
curl -X POST http://localhost:8000/api/start_training \
-H "Content-Type: application/json" \
-d '{
"provider": "unsloth",
"model_name": "meta-llama/Llama-3.2-3B",
...
}'Training Request
↓
Provider Factory
↓
Load Provider ← (HuggingFace / Unsloth / Custom)
↓
Load Model
↓
Load Tokenizer
↓
Validate Access
↓
Return (model, tokenizer)
All providers implement the same interface:
class ModelProvider(Protocol):
def load_model(self, model_id: str, model_class: str,
quantization_config, device_map, **kwargs) -> Model
def load_tokenizer(self, model_id: str, **kwargs) -> Tokenizer
def validate_model_access(self, model_id: str, model_class: str) -> bool
def get_provider_name(self) -> strThis ensures all providers work seamlessly with ModelForge.
| Architecture | HuggingFace | Unsloth |
|---|---|---|
| Llama (1/2/3) | ✅ | ✅ |
| Mistral | ✅ | ✅ |
| Qwen | ✅ | ✅ |
| Gemma | ✅ | ✅ |
| Phi | ✅ | ✅ |
| BART | ✅ | ❌ |
| T5 | ✅ | ❌ |
| BERT-based | ✅ | ❌ |
| Task | HuggingFace | Unsloth |
|---|---|---|
| Text Generation | ✅ | ✅ |
| Summarization | ✅ | |
| Question Answering | ✅ |
| Strategy | HuggingFace | Unsloth |
|---|---|---|
| SFT | ✅ | ✅ |
| QLoRA | ✅ | ✅ |
| RLHF | ✅ | |
| DPO | ✅ |
Based on Llama-3.2-3B with 1000 examples:
| Provider | Time | Speedup |
|---|---|---|
| HuggingFace | 45 min | 1x |
| Unsloth | 22 min | 2x |
Based on Llama-3.2-7B with batch_size=4:
| Provider | VRAM | Reduction |
|---|---|---|
| HuggingFace | 16 GB | - |
| Unsloth | 12.8 GB | 20% |
Results may vary based on hardware and configuration.
Supported Platforms:
- ✅ Windows 10/11
- ✅ Linux (all distributions)
- ✅ WSL 2
- ✅ Docker
Requirements:
- Python 3.11
- PyTorch 2.0+
- transformers 4.40+
Supported Platforms:
- ✅ Linux (Ubuntu 20.04+, Debian 11+)
- ✅ WSL 2 on Windows
- ✅ Docker with NVIDIA runtime
- ❌ Native Windows
Requirements:
- Python 3.11
- PyTorch 2.0+ with CUDA
- transformers 4.40+
- unsloth package
- NVIDIA GPU with CUDA 11.8+
Error: ProviderError: Unknown provider 'xyz'
Solution: Check spelling. Valid providers: huggingface, unsloth
Error: ProviderError: Unsloth is not installed
Solution: Use WSL or Docker. See Windows Installation.
Error: ModuleNotFoundError: No module named 'unsloth'
Solution: Install the provider:
pip install unslothWant to add a new provider? See Custom Providers Guide.
- HuggingFace Provider - Learn about the standard provider
- Unsloth Provider - Enable 2x faster training
- Custom Providers - Add your own provider
- Training Strategies - Choose a training strategy
Providers make ModelForge flexible and extensible! Choose the right one for your needs.