Skip to content

docs(training-hub): QLoRA + CPT guides + e2e (8.2.3) - #270

Merged
typhoonzero merged 1 commit into
masterfrom
loop/2026-06-22-traininghub-qlora-cpt
Jul 6, 2026
Merged

typhoonzero merged 1 commit into
masterfrom
loop/2026-06-22-traininghub-qlora-cpt

Conversation

@typhoonzero

Copy link
Copy Markdown
Contributor

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.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ee0f99a1-215b-47af-b493-745a3b9dc473

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch loop/2026-06-22-traininghub-qlora-cpt

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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>
@typhoonzero
typhoonzero force-pushed the loop/2026-06-22-traininghub-qlora-cpt branch from 6dea568 to cd33847 Compare July 6, 2026 03:38
@typhoonzero

Copy link
Copy Markdown
Contributor Author

PR cleaned: force-pushed to a single squashed commit on top of latest master (was 24 commits, most were unrelated content already merged via #263 / #258 / #260 / etc.). The single commit now includes both the initial guides/e2e work and the follow-up fix ea7eed1 (docker.io → build-harbor image + ensure_pull_secret helper).

E2E on g1-c1-x86 (ns mlops-demo-e2e, A30 sm_80)

Both cases wired active in run_all.shPASS end-to-end today.

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.

@typhoonzero
typhoonzero marked this pull request as ready for review July 6, 2026 03:50
@typhoonzero typhoonzero changed the title Draft: docs(training-hub): QLoRA + CPT guides + e2e (8.2.3) docs(training-hub): QLoRA + CPT guides + e2e (8.2.3) Jul 6, 2026
@typhoonzero
typhoonzero merged commit b51397d into master Jul 6, 2026
@typhoonzero
typhoonzero deleted the loop/2026-06-22-traininghub-qlora-cpt branch July 6, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant