Skip to content

Training Hub v0.12.0

Latest

Choose a tag to compare

@Maxusmusti Maxusmusti released this 12 Nov 19:57
1ce9cd4

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. task selects sequence_classification (default), multiple_choice or token_classification via the native HF Auto classes. Custom architectures load through trust_remote_code (with revision pinning), model_class (a user-installed package) or a custom loss_fn. Encoders fully fine-tune; decoders use LoRA (use_peft). Checkpoints save the label mapping and task, ready for inference. Available as training_hub.classifier_sft, ClassifierSFTAlgorithm and in the thub CLI. 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_args with a top-level TrainableModel(lora_config=...) and made run_name required, so lora_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), new enable_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, plus target_modules / fused_loss overrides. 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_gather adds 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 from config.json, so no weights are downloaded.

Behavior changes

  • Estimator, LoRA/QLoRA: batch_size is now the per-process micro-batch (micro_batch_size), not a global batch divided by num_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 with training_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