To upload to Huggingface
Initilise praisonai train
Requirements
Training dependencies are checked at startup via
unsloth package availability but only fully loaded when training commands run.- Huggingface token
- Base model to train on (e.g. unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit)
- Dataset to train on (e.g. yahma/alpaca-cleaned)
- Huggingface model name to upload to (e.g. mervinpraison/llama3.1-instruct) (Optional)
- Ollama model name to upload to (e.g. mervinpraison/llama3.1-instruct) (Optional)
To upload to ollama.com (Linux)
You no longer need to run
ollama serve manually before praisonai train. The training command starts the Ollama daemon automatically if it isn’t already running, then creates and pushes the model. Requires the ollama CLI on PATH — install from ollama.com.RUN PraisonAI Train
Config.yaml example
wandb
Get the key from here
How It Works
You point the trainer at a base model and dataset; it fine-tunes with LoRA and pushes the result to the hubs you configured.Best Practices
Set HF_TOKEN in the environment
Set HF_TOKEN in the environment
Export
HF_TOKEN in your shell before training so the trainer can push to Hugging Face. Never commit the raw token.Start small, then scale
Start small, then scale
Use a low
max_steps and a small num_samples for a first run to confirm the pipeline before a full training job.Install the train extra
Install the train extra
Run
pip install "praisonai[train]" (or praisonai train init) so unsloth and CUDA deps are available.Track runs with Weights & Biases
Track runs with Weights & Biases
Set
PRAISON_WANDB=True and the WANDB_* variables to log loss curves and checkpoints for each run.Related
Models
Use your fine-tuned model with an Agent.
Installation
Install the training extras.

