docs(training-hub): QLoRA + CPT guides + e2e (8.2.3) - #270
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Close the L0 8.2.3 gaps (QLoRA, continued pre-training) in the Training Hub corpus, matching the existing SFT/OSFT tutorial style. APIs verified against the real traininghub0.1-cu126-amd64 v0.1.0 runtime image on g1-c1-x86: - QLoRA -> training_hub.lora_sft(load_in_4bit=True, bnb_4bit_quant_type="nf4") - CPT -> training_hub.sft(is_pretraining=True, block_size, document_column_name) Docs - training-hub-fine-tuning.mdx: algorithm table now covers SFT/OSFT/QLoRA/CPT; new "QLoRA (4-bit LoRA)" and "Continued pre-training (CPT)" sections (CUDA-first, with Ascend NPU notes); notebooks added to the examples table; Open Data Hub design-context note (algorithm library vs. Kubeflow Trainer runtime split). - qlora-comprehensive-tutorial.ipynb / cpt-comprehensive-tutorial.ipynb: runnable comprehensive notebooks mirroring the SFT/OSFT tutorials. E2E harness - e2e/cases/c13_traininghub_qlora.sh: drives lora_sft 4-bit QLoRA (trl+peft+ bitsandbytes fallback path when the library-level API is missing) with an sm_75 arch guard. - e2e/cases/c14_traininghub_cpt.sh: drives sft(is_pretraining=True); full- parameter SDPA, no sm_75 floor. - Both cases: self-contained synthetic tiny Qwen2 + synthetic data (no model/corpus download); SKIP (rc=77) with the captured scheduler event when no GPU slice is schedulable. - e2e/lib.sh: add ensure_pull_secret() — reuse-or-create the build-harbor dockerconfigjson secret (default harbor-mlops-regcred) in the run namespace from $ACP_HARBOR_USER/$ACP_HARBOR_PASS; C13/C14 default IMAGE_PULL_SECRET to its result. - Default IMAGE for C13/C14 is the cluster-pullable build-harbor.alauda.cn/mlops/traininghub0.1-cu126-amd64:v0.1.0-build.20260609030710 (docker.io is egress-blocked on the GPU cluster nodes). - run_all.sh: wire C13 and C14 as active GPU cases. Verified on g1-c1-x86 (ns mlops-demo-e2e): C13 QLoRA PASS (adapter_model.safetensors + checkpoint-5 written), C14 CPT PASS (continued pre-training, checkpoints written). Co-Authored-By: Wu Yi <typhoonzero1986@gmail.com> Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
6dea568 to
cd33847
Compare
|
PR cleaned: force-pushed to a single squashed commit on top of latest E2E on
|
| Case | Result | Runtime | Artifacts / signal |
|---|---|---|---|
| C13 QLoRA | ✅ PASS | trl QLoRA finished in 3.3s (5 steps, loss 5.60→5.60) | adapter_model.safetensors, checkpoint-5/adapter_model.safetensors |
| C14 CPT | ✅ PASS | sft(is_pretraining=True) finished in 73.2s (1 epoch, 9 steps, 17 samples) |
hf_format/samples_17/pytorch_model.bin; INFO Operation completed successfully! |
Both Jobs scheduled onto the A30 (192.168.128.143) and were auto-cleaned by the case trap. Image build-harbor.alauda.cn/mlops/traininghub0.1-cu126-amd64:v0.1.0-build.20260609030710 pulled cleanly using the pre-seeded harbor-mlops-regcred secret.
Ready for review.
Daily-loop dev (2026-06-22). Adds runnable QLoRA + CPT tutorials, training-hub-fine-tuning.mdx sections, e2e cases c13/c14. GPU smoke SKIPped (A30 saturated). See .docs/loop/worklog-2026-06-22.md. Draft.