Complete these steps after installing ModelForge to ensure everything is configured correctly.
modelforge --versionShould display: ModelForge v3 (or current version)
python -c "import torch; print(f'CUDA Available: {torch.cuda.is_available()}'); print(f'GPU Count: {torch.cuda.device_count()}'); print(f'GPU Name: {torch.cuda.get_device_name(0) if torch.cuda.is_available() else \"None\"}')"Expected output (with GPU):
CUDA Available: True
GPU Count: 1
GPU Name: NVIDIA GeForce RTX 3060
python -c "from ModelForge import app; print('ModelForge imported successfully!')"If you installed the [cli] extra:
pip install modelforge-finetuning[cli]
modelforge cliThis should launch the interactive CLI wizard.
If you installed the [quantization] extra:
pip install modelforge-finetuning[quantization]
python -c "import bitsandbytes; print('bitsandbytes installed successfully!')"Your HuggingFace token is required to download models.
- Go to HuggingFace Settings
- Click "New token"
- Give it a name (e.g., "ModelForge")
- Select type: Fine-grained or Write
- Copy the token
Linux (persistent):
echo 'export HUGGINGFACE_TOKEN="hf_xxxxxxxxxxxx"' >> ~/.bashrc
source ~/.bashrcWindows PowerShell (persistent):
[System.Environment]::SetEnvironmentVariable('HUGGINGFACE_TOKEN', 'hf_xxxxxxxxxxxx', 'User')Using .env file (all platforms):
cd ~/ModelForge # or your project directory
echo "HUGGINGFACE_TOKEN=hf_xxxxxxxxxxxx" > .envmodelforgeYou should see:
INFO: Started server process
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000
Open browser: http://localhost:8000
You should see the ModelForge interface with:
- Dashboard
- Training tab
- Playground tab
- Models tab
Open browser console and make API call:
fetch('http://localhost:8000/api/info')
.then(r => r.json())
.then(d => console.log(d))Should show:
{
"providers": ["huggingface", "unsloth"],
"strategies": ["sft", "qlora", "rlhf", "dpo"],
"tasks": ["text-generation", "summarization", "extractive-question-answering"]
}curl http://localhost:8000/api/healthShould return:
{
"status": "healthy",
"version": "v2"
}ModelForge creates the following directories:
Linux:
~/.local/share/modelforge/
├── database/ # SQLite database
├── datasets/ # Uploaded datasets
├── model_checkpoints/ # Trained models
└── training_logs/ # TensorBoard logs
Windows:
C:\Users\<username>\AppData\Local\modelforge\
├── database\
├── datasets\
├── model_checkpoints\
└── training_logs\
Linux/WSL:
pip install unslothVerify:
python -c "import unsloth; print('Unsloth installed successfully!')"Windows Users: Unsloth requires WSL or Docker. See Windows Installation Guide.
Run on different port:
modelforge --port 8080Allow remote access:
modelforge --host 0.0.0.0Set custom database location:
export MODELFORGE_DB_PATH="/path/to/database"
modelforgeAdd to .env:
PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512export MODELFORGE_DISABLE_TENSORBOARD=1export MODELFORGE_DEFAULT_BATCH_SIZE=4cd ~/ModelForge
curl -o test_dataset.jsonl https://raw.githubusercontent.com/forgeopus/modelforge/main/ModelForge/test_datasets/low_text_generation.jsonl- Go to Training tab
- Click "Upload Dataset"
- Select
test_dataset.jsonl - Should see validation success
curl -X POST http://localhost:8000/api/upload_dataset \
-F "file=@test_dataset.jsonl"pip install --upgrade modelforge-finetuningrm -rf ~/.local/share/modelforge/database
modelforge # Will recreate databaserm -rf ~/.cache/huggingface# Real-time logs
modelforge --log-level debug
# Or check specific log file
cat ~/.local/share/modelforge/training_logs/latest.logNever commit .env files with tokens to version control:
echo ".env" >> .gitignoreIf running on server, configure firewall:
Linux (UFW):
sudo ufw allow 8000/tcpExpose only to localhost:
modelforge --host 127.0.0.1Use reverse proxy (nginx/Apache) with SSL:
server {
listen 443 ssl;
server_name modelforge.example.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}- Quick Start Guide - Run your first training
- Configuration Guide - Learn all options
- Dataset Formats - Prepare your data
- Troubleshooting - Common issues
Installation Complete! You're ready to start fine-tuning models. 🚀