Skip to main content
Every Hub push from praisonai-train is private by default. Set hf_private: false in config.yaml to publish.
Prior to PraisonAI PR #4357, every training run that set huggingface_save: true uploaded to a public repo, silently — LLM, vision, and standalone upload paths alike. From this release the default is private. If you were relying on the old behaviour, add hf_private: false to your config.

Quick Start

Publish to a public repo — opt out of the private default with one key.
Omit hf_private entirely and the repo is created private — the safe default.

Config keys

Every key that shapes a Hub push, read from _hub.py::hub_push_kwargs and the trainer’s KNOWN_KEYS.
commit_message and tags are only forwarded to the Hub when you set them — leave them out and nothing extra is sent.

Authentication

A write-scoped token, from an env var or a cached login — either works.
The token must have write scope, and the repo must be under your own username or an org you can write to.

Error translation

A rejected push turns into a one-line fix, not a stack trace — now shared by all three push sites (LLM, vision, and upload-vision) via _hub.py::raise_hf_push_error.

Safety note on hf_model_name

Always use the namespaced form me/model, never a bare name. praisonai-train deletes a local stale output directory of that name before an upload (_hub.py::clean_local_repo_dir), but a namespaced repo id like me/model is never treated as a path to delete — even if ./me/model exists locally. A bare name with no / is treated as a local directory and removed.
Setting hf_model_name to a bare directory name (no /) makes praisonai-train treat it as a local path and delete it before an export. Always prefer the namespaced form (me/model) so no local directory of that name can be wiped. This was a real defect in upload_vision.py before PR #4357.

Best Practices

The default is private. Only add hf_private: false when you deliberately want a public repo — and double-check the dataset was public too.
Use me/model, never a bare model. A namespaced id is a Hub target and is never deleted as a local path.
Run huggingface-cli login (cached tokens count) or export HF_TOKEN=hf_... with write scope before the run — preflight fails fast if it’s missing.
commit_message and tags are only sent when set — use them to label each upload on the Hub.

Export a trained model

Publish an already-trained model to HF, GGUF, or Ollama without re-training.

Train

Full fine-tuning flow and config.yaml reference.

Preference Tuning

Fine-tune with DPO, ORPO, or KTO preference pairs.