praisonai-train is private by default. Set hf_private: false in config.yaml to publish.
Vision publish-default parity (PraisonAI #4879). Independent of
hf_private, the vision trainer used to default huggingface_save / huggingface_save_gguf / ollama_save to ON (they read a config default of the string "true"), so a plain vision run pushed to the Hub even without those keys — private since #4357, but still a push the user never asked for, and a crash when hf_model_name was missing. From #4879 the vision path skips every publish stage unless the flag and its target are both set, matching the LLM trainer. See Vision Fine-Tuning.Quick Start
Publish to a public repo — opt out of the private default with one key.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.
Accepted values for hf_private
hf_private fails closed: only the publish set opts out, and anything unrecognised stays private.
"private", "enabled", 5, "", "maybe", [] — keeps the repo private and prints:
commit_message and tags are only forwarded to the Hub when you set them — leave them out and nothing extra is sent.The fail-closed parser landed in PraisonAI PR #4367. If you upgraded past #4357 and still saw an unparseable
hf_private publish a public repo, #4367 is the follow-up that closed the parser gap.Authentication
A write-scoped token, from an env var, a cached login, or config — any works.config.yaml as hf_token — the config-level twin of the env var:
HF_TOKEN env var wins, then a cached huggingface-cli login, then hf_token from config.
The token must have write scope, and the repo must be under your own username or an org you can write to.
Prefer config-level
hf_token inside CI configs where you don’t want the token to leak into environment inspection. hf_token also reaches Unsloth as the download credential for gated base models (Llama, Gemma) — see Unsloth Surface.Error translation
A rejected push turns into a one-line fix, not a stack trace — now shared by all three push sites (LLM, vision, andupload-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.
Best Practices
Leave hf_private unset for private repos
Leave hf_private unset for private repos
The default is private. Only add
hf_private: false when you deliberately want a public repo — and double-check the dataset was public too.Always namespace hf_model_name
Always namespace hf_model_name
Use
me/model, never a bare model. A namespaced id is a Hub target and is never deleted as a local path.Set a write token once
Set a write token once
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.Related
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.
Unsloth Surface
Gated model access, PEFT selectors, offline merge, and vLLM rollouts.

