Repository navigation
Minor release adding a classification-head trainer, fixing the LoRA-GRPO ART backend for newer openpipe-art, and making the memory estimator accurate for multi-GPU and newer model families. No dependency changes since v0.11.2.
New
classifier_sft(#160): a convention-based trainer that fine-tunes a decision/classification head on any recognized backbone, without per-model code.taskselectssequence_classification(default),multiple_choiceortoken_classificationvia the native HF Auto classes. Custom architectures load throughtrust_remote_code(withrevisionpinning),model_class(a user-installed package) or a customloss_fn. Encoders fully fine-tune; decoders use LoRA (use_peft). Checkpoints save the label mapping and task, ready for inference. Available astraining_hub.classifier_sft,ClassifierSFTAlgorithmand in thethubCLI. Docs:docs/algorithms/classifier_sft.md.
Fixes
- LoRA-GRPO (ART backend) works with openpipe-art ≥ 0.5.20 (#162). ART 0.5.20 replaced
peft_argswith a top-levelTrainableModel(lora_config=...)and maderun_namerequired, solora_grpo(backend="art")failed before training on every ART release after 0.5.18. The backend now detects the API from the constructor signature and supports both sides of the change. - LoRA-GRPO (ART backend) now trains at the requested LoRA rank (#162). Previously the rank was omitted whenever
lora_r == 16(the default), but ART defaults to rank 8, so default runs silently trained rank-8 adapters. Default runs now train rank 16 as requested, which uses somewhat more memory than before. - Memory estimator: accurate multi-GPU and per-GPU estimates (#163), validated against measured runs of Gemma 4 31B, Muse Glimmer 30B, Nemotron 30B-A3B and Qwen3/3.5 on H100s:
- LoRA/QLoRA: per-GPU estimates from transformers' real
device_map="balanced"placement (the busiest GPU is reported), newenable_model_splitting(otherwise multi-GPU means DDP, one full replica per GPU), LoRA parameters counted from the model's actual linear layers (including fused MoE experts), logits counted only when the loss materializes them, QLoRA sized as bitsandbytes loads it, plustarget_modules/fused_lossoverrides. Mean error dropped from ~29% to ~5% on held-out runs. These estimates are calibrated for the Unsloth backend (lora_sft). - SFT/OSFT: new
count_fsdp_gatheradds the FSDP unit gather (largest block), the backward-prefetched unit and per-GPU runtime overhead. - Multimodal configs whose text settings sit under
text_config(e.g. Gemma 4, Muse Glimmer, Qwen3.5) no longer crash the estimator. Models are built on the meta device fromconfig.json, so no weights are downloaded.
- LoRA/QLoRA: per-GPU estimates from transformers' real
Behavior changes
- Estimator, LoRA/QLoRA:
batch_sizeis now the per-process micro-batch (micro_batch_size), not a global batch divided bynum_gpus. - Estimator cache: model sizes are now cached in
$XDG_CACHE_HOME/training_hub/model_storage.csv(default~/.cache/training_hub/) instead of inside the installed package. If that path isn't writable the estimator warns and continues. Override withtraining_hub.profiling.memory_estimator.MODEL_STORAGE_PATH.
Known issues
- openpipe-art ≥ 0.5.20 runs rollouts in its own managed vLLM runtime: at training time it downloads a pinned torch/vLLM into a cache directory (
ART_VLLM_RUNTIME_CACHE_DIR) instead of using the environment's vLLM. In offline or locked-down environments this can fail independently of training_hub; see #162 for details.
Full Changelog: v0.11.2...v0.12.0