Skip to content

docs(tutorials): post-ship final review — DoRA axis bug fix + RAG terms + 2026 frontier enrichments (#24/#25) - #17

Merged
wanshuiyin merged 1 commit into
mainfrom
docs/fix-dora-axis-and-final-review
Jun 15, 2026
Merged

docs(tutorials): post-ship final review — DoRA axis bug fix + RAG terms + 2026 frontier enrichments (#24/#25)#17
wanshuiyin merged 1 commit into
mainfrom
docs/fix-dora-axis-and-final-review

Conversation

@wanshuiyin

Copy link
Copy Markdown
Owner

What

A user-requested final adversarial pass over the two newly-shipped cheat sheets (#24 LoRA/PEFT, #25 RAG) — fresh hostile-reviewer Codex GPT-5.5 xhigh, re-deriving everything from scratch. It caught a real bug that survived 4 prior review rounds, plus 2 minor RAG terminology errors, and adds compact 2026-frontier coverage.

🔴 The real bug (LoRA DoRA)

The DoRA magnitude–direction decomposition used per-input magnitude (weight.norm(dim=0)), but real DoRA / HF PEFT (DoraLinearLayer.get_weight_normtorch.linalg.norm(weight, dim=1)) and weight normalization use per-output (one magnitude per output neuron). The earlier reviews verified the decomposition was self-consistent (identity-start still holds) but never checked it against the reference convention.

  • Fixed: §6 formula + prose + code + comment, Q17, and code/lora.py DoRALinear (dim=0dim=1).
  • Re-ran on Server5 (PyTorch 2.10 CPU): identity-start |Δ| now 1.19e-7, all 6 asserts pass.
  • Codex re-verified the corrected version: CORRECT (matches PEFT + weight-norm).

🟡 Minor fixes

  • LoRA §2.2: hedged "A≠0 ⇒ ∂L/∂B≠0" (degenerate cases g=0 / x∈null(A)).
  • RAG: HyDE retrieves a hypothetical document/passage (not "answer"), §7 + Q18; CRAG scores retrieved-doc relevance/confidence (not "recall" — untestable at inference), §7 + Q24.

🟢 Compact 2026-frontier enrichments (both editions)

  • LoRA: S-LoRA/Punica multi-LoRA serving (Q23) · LoRA Learns Less and Forgets Less (Biderman 2024) (Q25) · QDoRA (§6)
  • RAG: SPLADE learned-sparse (§5) · ColBERTv2/PLAID + single-vs-multi-vector tradeoff (§6) · Contextual Retrieval / late chunking (§10) · BEIR/MTEB (§8.3)

All 10 new citations cross-model-verified (ColBERTv2 title corrected to "Efficient and Effective"). Both 中文 + EN editions updated in lockstep (mechanical mirror verified).

Verification

  • verify_reviews.py --mode strict --reproduce: all 4 changed tutorials 1 OK each; full repo 51 OK · 0 FAIL · 3 EXEMPT → PASS
  • DoRA fix re-verified on Server5 + by a fresh Codex thread

🤖 Generated with Claude Code

… bug + RAG terms + frontier enrichments

A fresh hostile-reviewer pass (Codex GPT-5.5 xhigh, re-deriving from scratch)
caught a REAL bug in the shipped LoRA sheet that survived 4 review rounds:

- DoRA magnitude axis was per-INPUT (norm dim=0) but real DoRA / HF PEFT use
  per-OUTPUT (torch.linalg.norm(weight, dim=1), weight-normalization style).
  Fixed §6 formula+code+comment, Q17, and code/lora.py (DoRALinear dim=0->dim=1).
  Re-ran on Server5 (identity |Δ| now 1.19e-7); Codex re-verified CORRECT.
- §2.2: hedged "A≠0 ⇒ ∂L/∂B≠0" (degenerate g=0 / x∈null(A)).

RAG sheet — two terminology corrections:
- HyDE retrieves a hypothetical DOCUMENT/passage (not "answer"); §7 + Q18.
- CRAG scores RETRIEVED-doc relevance/confidence (not "recall", untestable at
  inference without a labeled set); §7 + Q24.

Compact 2026-frontier enrichments (both editions):
- LoRA: S-LoRA/Punica multi-LoRA serving (Q23); LoRA Learns Less and Forgets
  Less (Biderman 2024, arXiv 2405.09673) (Q25); QDoRA (§6).
- RAG: SPLADE learned-sparse (§5); ColBERTv2/PLAID + single-vs-multi-vector
  tradeoff (§6); Contextual Retrieval / late chunking (§10); BEIR/MTEB (§8.3).

All 10 new citations cross-model-verified (ColBERTv2 title corrected).
Both editions (中文 + EN) updated in lockstep; gate: 51 OK / 0 FAIL / 3 EXEMPT.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@wanshuiyin
wanshuiyin merged commit 5c5d738 into main Jun 15, 2026
1 check passed
@wanshuiyin
wanshuiyin deleted the docs/fix-dora-axis-and-final-review branch June 15, 2026 05:26
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