Back to Research
Paper2026-07-27

A Systematic Cross-Family Comparison of Fine-Tuning Open-Weight LLMs for Traditional Chinese Medicine: Capacity Scaling, Family Effects, and Teachability

— An empirical study of 8 open-weight base models (7B–72B) fine-tuned for Chinese medical licensing examinations under identical data and identical recipe

v1.3 (2026-07-27, adds 14-language multilingual evaluation + safety/typo results for the 3 new bases) · AIMate Smart Clinic Research Team · Technical report

📌 The One-Minute Version (for everyone)

What did we do? Training a TCM AI is like coaching students for a medical licensing exam. We wanted to know: which “student” (open-weight model) learns best? So we took one identical textbook (270,208 training samples of Chinese medical questions), one identical teaching method, and coached 8 different “students” — from a 7B model (~7 billion parameters) to a 72B model (~72 billion), spanning the Qwen, GLM and Llama families. Then we graded them all on the same 1,612 exam questions that none of them had ever seen.

What did we find?

  1. Bigger models score higher after training, and every step up is statistically significant — 36 points for 7B, 71 for 14B, 76 for 32B, 85 for 72B (out of 100). Spending compute on bigger models pays off.
  2. Newer-generation “students” are smarter — at the same 14B size, the newer Qwen3 beats the previous generation by 2.5 points; and an R1 reasoning model that started near zero (4.2 points) reached 65.7 after training — the “most improved underdog” of the whole class. A low starting score ≠ no future; plasticity is what matters.
  3. Our locally-trained 72B model ties a top international frontier model that can search the web during the exam (85.6 vs 86.8, statistically indistinguishable) — clinics get frontier-level TCM AI fully offline, with patient data never leaving the building.
  4. A surprise: safety awareness scales with capacity — small models reviewing prescriptions “cry wolf” (flagging even good prescriptions); at 32B the model suddenly “matures” and false alarms collapse.

In one sentence: for a clinic-ready TCM AI, choose a new-generation Qwen3-series base at sufficient scale, and pair it with a dedicated small safety-review model.

👉 If you have no time, stop here. For evidence and methods, read on — every section ends with a “In Plain Terms” box, and a glossary is at the end.

Abstract

Aiming at a locally deployable, TCM-specialized LLM for primary-care clinics, we systematically trained and evaluated 8 open-weight base models (7 completed full training and evaluation; 1 aborted) spanning three families — Qwen (R1-Distill / Qwen2.5 / Qwen3), GLM-4, and Llama — across multiple generations and a 7B–72B capacity range, under identical training data (270,208 samples) and an identical fine-tuning recipe. We ask: (1) Does capacity scaling yield consistent gains? (2) Does switching model family/generation add further gains? (3) How does a local open-weight specialist compare with a frontier web-connected model?

Key findings: ① The capacity ladder is monotonic — across R1-Distill-Qwen 7B→14B→32B→72B, TCM MCQ accuracy rises 36.0%→71.0%→76.3%→85.3% and general medicine 43.7%→73.7%→83.8%→90.3%; every model's base→tuned gain is significant by paired McNemar test (p≈0). ② Family/generation effects are real — at 14B, native Qwen3 beats R1-Distill-Qwen-14B on both axes (TCM 73.5% vs 71.0%; general 80.0% vs 73.7%); DeepSeek-R1-0528-Qwen3-8B shows the strongest “teachability” in the study (base 4.2% → tuned 65.7%, Δ+61.5pp). ③ The local 72B ties the web-connected frontier — the fully offline Qwen2.5-72B fine-tune is statistically tied with the web-connected frontier v4-pro on the n=811/801 large held-out set (TCM 85.6% vs 86.8%, p=0.47; general 89.8% vs 87.6%, p=0.18). Safety evaluation reveals a capacity phase transition: prescription-review specificity jumps from ~0.03 to 0.73 at 32B, with hallucination rate dropping 9×. All raw evaluation data, significance statistics and training provenance are released with this paper.

Keywords: TCM large language model; parameter-efficient fine-tuning (QLoRA); model capacity; cross-family comparison; decontaminated evaluation; McNemar test

1. Introduction

Intelligent assistance for primary-care TCM clinics (speech transcription, medical-record generation, prescription safety review) imposes three hard constraints on the language model: specialization (TCM syndrome-differentiation knowledge and licensing-exam-level competence), locality (patient data must not leave the clinic; the model must run quantized on consumer GPUs), and trustworthiness (safety review that neither over-flags nor under-flags). These constraints dictate our technical route: specialization via fine-tuning open-weight bases on domain data, rather than relying on cloud general-purpose APIs.

Within this route, the key engineering and scientific question is: which base model? Capacity (7B/14B/32B/72B), family (Qwen/GLM/Llama), generation (Qwen2.5/Qwen3), and reasoning lineage (R1-distilled vs. native) interweave; community wisdom mostly comes from general English benchmarks and may not transfer to Chinese medical specialization. Anecdotal conclusions (“bigger is always better” or “small is enough”) are unreliable — only controlled variables — same data, same recipe, same evaluation, swapping one base at a time — yield decision-grade evidence.

This paper is the complete record of that controlled experiment. Our contributions:

  1. A reproducible cross-base comparison table: 8 bases (7 completed + 1 aborted) × one 270,208-sample training set × one QLoRA recipe × one large held-out set (n=1,612), with paired statistical significance throughout;
  2. Three empirical conclusions: a monotonic capacity ladder, independent family/generation gains, and “teachability” that is negatively correlated with base scores;
  3. A safety capacity-transition finding: prescription-review specificity jumps at 32B (0.03→0.73), directly informing the design of clinical review pipelines;
  4. Complete data governance and honest boundaries: the held-out set is verified disjoint from training data through multiple independent audits; all non-comparable factors (library-compatibility discounts, early convergence stops) are disclosed.
💡 In plain termsWith dozens of open models available, “which one makes the best TCM AI” used to be guesswork. We turned guessing into an experiment — everything held constant except the model itself, so the gaps we measure can be attributed to the model.

2. Data

2.1 Training set

All runs use the same v3 training set of 270,208 samples from 8 sources (per-file SHA-256 prefixes verified identical across runs via run_manifest.json):

FileContentSHA-256 prefix
cmb_train_sft_full_v2CMB (Chinese Medical Benchmark, arXiv:2308.08833) train split converted to SFT, held-out removede8a64bee
cmexam_train_sftCMExam real exam questions for training (overlap with held-out/CMB removed, net +43,695)f3b57980
r1_tcm_cotR1-distilled TCM syndrome-differentiation reasoning chains7cbe3ef3
knowledge_kbTCM knowledge-base QAf19855c9
tcm_formula_kbHerbal-formula knowledge base5b74f8f8
typo_correctionHerb-name typo correctionee387938
clinical_review_syntheticSynthetic prescription-review casesc3538856
tcm_mcq_trainTCM MCQ training questions114e76b6

2.2 Evaluation set (held-out) and decontamination

The main evaluation is the CMB large held-out: stratified from CMB-train, near-duplicate decontaminated (384 rewritten duplicates discarded), then deleted from the training set (→ cmb_full_v2), yielding cmb_tcm (TCM) n=811 and cmb_medical (general medicine) n=801. The external benchmark CMExam was rejected as an evaluation set (19.2% verbatim overlap with CMB-train — not independent) and is used only as training material.

Decontamination was verified in three independent rounds: (1) a near-duplicate gate at split time (0/1,609 leaked); (2) char-8gram containment + exact-substring checks against all 8 training files — zero leakage; (3) a 2026-07-14 credibility re-audit with cross-source exact matching — residual contamination effect ≤0.12pp, negligible. The safety evaluation set was expanded to n=195 (30 clean standard formulas + 165 erroneous cases, all self-checked by check_prescription_safety and disjoint from the training review pool). The typo set has n=90.

2.3 Data compliance

All training data comes from public academic benchmarks and self-built knowledge bases — no real patient data (PII-free). The residual risk is uncleared per-question copyright of upstream exam questions (an industry-wide gray zone), which we disclose here.

💡 In plain termsA fair exam requires that students never saw the questions. Our 1,612 exam questions were not only removed from the textbook at creation, but also passed three rounds of “plagiarism checks” — the scores are real skill, not memorization. And all training material comes from public exams and medical knowledge bases — no real patient data was ever used.

3. Methods

3.1 Fine-tuning recipe

Local runs and the 32B cloud run use our in-house train_lora.py: QLoRA 4-bit + packing, epochs=1, LoRA rank=16 (alpha=32), lr=1e-4, cutoff 1024 (32B cloud run 2048). The decisive reason for our own stack over LLaMA-Factory is the health gate: after training, reasoning models are screened for degeneration (empty <think>, repetition collapse), with exit code 3 blocking bad models — we previously produced a completely wrong “32B≈14B” conclusion when LLaMA-Factory's deepseekr1 template broke the reasoning model on no-think data with no gate to catch it (retracted; see §6.4). The 72B model, infeasible on a single machine, was trained with AWS 4×g6e.2xlarge multi-node DDP (LLaMA-Factory + Liger + paged_adamw_8bit, template=qwen; the non-reasoning base is immune to that failure mode).

3.2 Evaluation protocol

All models share one harness: base 4-bit + LoRA adapter, batch 8, max_new_tokens=512 (GLM-4 excepted, see §7). Each model is evaluated base first, then tuned, on the same questions paired. Scoring is exact set equality (multi-select answers must match letter-for-letter, preventing lucky-guess inflation). The empty-answer rate is 0 throughout, ruling out “format not learned” artifacts — base→tuned gains are knowledge gains, not format gains.

3.3 Statistics

Base→tuned and cross-model paired comparisons use the McNemar test (same-question pairing; win/loss counts and p-values reported); comparisons against the frontier model (independent samples) use the two-proportion z-test; accuracies are reported with Wilson 95% CIs.

💡 In plain termsThe “teaching method” is QLoRA, a lightweight fine-tuning technique — the model body stays frozen and only a small “plug-in” of parameters is trained, so a consumer GPU (RTX 5090) suffices. Multi-select questions must match letter-for-letter — no lucky guesses. Every model sits the exam twice: before training (base) and after (tuned), on the same questions, and a statistical test (McNemar) confirms the improvement is not luck.

4. Experimental Setup: Training Overview

ModelFamily/GenerationLocation·HardwareRecipeStepsDurationArtifact
DeepSeek-R1-Distill-Qwen-7BR1-DistillLocal RTX 5090train_lora2190~5.1hjinsixian-tcm-7b-v3pack
DeepSeek-R1-Distill-Qwen-14BR1-DistillLocal RTX 5090train_lora2190~8.6hjinsixian-tcm-14b-v3pack
DeepSeek-R1-Distill-Qwen-32BR1-DistillAWS spot/on-demand, intermittent resumetrain_lora (cloud, cutoff 2048)219007-04→14 断续jinsixian-tcm-32b-v3pack
Qwen2.5-72B-InstructQwen2.5AWS 4×g6e multi-node DDPLLaMA-Factory5266(收敛于 ckpt-2400)~12h 级72b-mn-v2(S3)
DeepSeek-R1-0528-Qwen3-8BQwen3+R1-0528Local RTX 5090train_lora2190~5.9hjinsixian-tcm-r1qwen3-8b-v3
Qwen3-14BQwen3 原生Local RTX 5090train_lora2283~18.9hjinsixian-tcm-qwen3-14b-v3
THUDM/glm-4-9bGLM-4(智谱)Local RTX 5090train_lora2108~5.2hjinsixian-tcm-glm4-9b-v3
DeepSeek-R1-Distill-Llama-70BLlamaAWS g7e.4xlarge150/755 中止~3.8hckpt-150 留 S3

Notes: 72B had max_steps=5,266, but its loss entered a flat plateau from step ~130 (mean 0.084 / std 0.036, no downward trend); training was stopped at checkpoint-2400 (46%) on judged convergence, saving ~$25 with provably zero remaining gain. Llama-70B reached only 150/755 steps (0.06 epoch) in 3h40m; resuming would cost ~$45 with insufficient marginal value — aborted, checkpoint retained for future resume.

💡 In plain termsHere are the “account books” of all 8 training runs — which machine, how long, what it cost. Seven finished; one (Llama-70B) was stopped when the math said it wasn't worth it ($45 more for little added insight). The 72B model was also stopped early when its score stopped improving (the loss curve went flat), saving money — both decisions disclosed honestly.

5. Results

5.1 Main results: MCQ large held-out (cmb_tcm n=811 / cmb_medical n=801)

Modelbase TCMtuned TCMΔbase generaltuned generalΔ
R1-Distill-Qwen-7B13.7%36.0%+22.3pp19.9%43.7%+23.8pp
R1-Distill-Qwen-14B38.2%71.0%+32.8pp41.8%73.7%+31.8pp
R1-Distill-Qwen-32B41.3%76.3%+35.0pp48.3%83.8%+35.5pp
Qwen2.5-72B-Instruct61.8%85.3%+23.5pp72.0%90.3%+18.2pp
R1-0528-Qwen3-8B4.2%65.7%+61.5pp6.4%72.8%+66.4pp
Qwen3-14B32.1%73.5%+41.4pp31.2%80.0%+48.8pp
GLM-4-9B ⚠️39.8%68.1%+28.2pp37.5%70.5%+33.1pp
Reference: v4-pro (web-connected frontier)86.8%87.6%

All 7 models show McNemar p≈0 (significant) base→tuned gains. ⚠️ GLM-4, due to three incompatibilities between its remote code and transformers 4.57 forcing use_cache=False, could only be evaluated at max_new=128 (vs. 512 for others); its scores carry a library-compatibility discount (estimated 2–5pp underestimation) and are not strictly comparable.

💡 In plain termsThis is the report card. Each model has two scores — before training (base) and after (tuned); Δ is the improvement. Three takeaways: ① bigger is stronger (72B tops at 85/90); ② newer generations are better value (Qwen3-14B beats the old 14B by 2.5/6 points); ③ the underdog improves fastest (R1-0528-Qwen3-8B rockets from 4 to 66). GLM-4's row carries a ⚠️ because its exam conditions differed (its answer length was capped) — its score may be unfairly low, and we say so.

5.2 Comparison with the web-connected frontier

v4-pro (web-connected, able to look up answers) on the same held-out, prompt and scoring: TCM 86.8%, general 87.6%. Two-proportion z-tests: TCM 72B 85.6% vs 86.8%, z=−0.72, p=0.47 (tie); general 72B 89.8% vs 87.6%, z=+1.34, p=0.18 (tie). A fully offline open-weight 72B specialist is in the same league as the web-connected frontier. An earlier small-sample (n=55) run once suggested “beating the frontier”; re-measuring on a 15× larger sample corrected this to a tie — the accurate statement is “same tier, drifting slightly with question distribution”.

💡 In plain termsThe opponent is a top international model taking an “open-book exam” (it can search the web); ours is a local model taking it “closed-book” — and the result is a statistical tie. Full honesty: with only 55 questions we once thought we had beaten it; with 15× more questions, that turned out to be small-sample luck — we now state “tie”. This is also why every claim in this paper uses large samples.

5.3 Safety evaluation (prescription review, sensitivity/specificity)

Modeln=66 sens/specn=195 sens/specHallucination (n=195)Dangerous-advice rate
7B0.446/0.200.539/0.100.4820.041
14B0.786/0.000.697/0.030.3740.015
32B0.625/0.900.746/0.730.0410.021
72B (knowledge model)1.00/0.00not re-evaluatednot re-evaluatednot re-evaluated
R1-0528-Qwen3-8B0.539/0.430.3130.021
Qwen3-14B0.824/0.170.1950.000
GLM-4-9B ⚠️0.0/1.0(invalid — degenerate outputs)0.00.169

Capacity transition: specificity jumps 0.03→0.73 from 14B to 32B — the 7B/14B/72B models all suffer “flag-everything” disease (specificity ≈ 0, flagging even clean formulas), first cured at the 32B tier; hallucination drops 0.374→0.041 (9×). The production review pipeline still uses the dedicated balanced 7b-safe (0.48/0.90, trained with rebalanced ratios; its specificity beats the frontier API's 0.10).

💡 In plain termsSafety review is like airport security. Sensitivity = fraction of real dangers caught (no misses); specificity = fraction of innocent travelers waved through (no false arrests). The 7B/14B models are “paranoid security officers” — they catch the bad prescriptions but also stop the good ones (specificity ≈ 0, which would drive doctors mad). At 32B the officer suddenly matures: the innocent-pass rate rises from 3% to 73%, and “making things up” (hallucination) falls from 37% to 4%. What clinics actually use is a specially trained 7b-safe officer that would rather under-report than cry wolf.

5.4 Typo correction (n=90)

ModelAccuracy
7B0.300
14B0.689
Qwen3-14B0.778
R1-0528-Qwen3-8B0.722
32B0.711
GLM-4-9B0.556
72B0.844
💡 In plain termsHandwritten or dictated TCM prescriptions often contain typos (e.g., “胆叁” for “丹参” — wrong herb names can cause medical accidents). This test measures typo-correction ability: the 72B fixes 84%, the small model only 30% — a hard reason why small models alone are not enough.

5.5 Multilingual evaluation (14 languages, new in v1.3)

Method: same paper, different languages — one identical clean held-out (797/787) was machine-translated into 13 languages under a 105-term glossary constraint (answer letters unchanged, scoring logic untouched), then evaluated per language on the same harness; zh uses the original clean set as the anchor, and Δ is each language's gap to the zh-clean baseline.

Main matrix (tuned accuracy %, with Δ vs zh):

Localeqwen3-14b TCMqwen3-14b general14b-v3 TCM14b-v3 general
zh (anchor)73.3(—)79.5(—)70.8(—)73.4(—)
en63.2(−10.0)78.1(−1.4)57.1(−13.7)73.8(+0.4)
es56.6(−16.7)70.8(−8.8)47.8(−23.0)63.1(−10.3)
pt-BR55.3(−17.9)73.2(−6.3)49.1(−21.7)61.0(−12.4)
vi48.9(−24.3)66.1(−13.5)42.4(−28.4)58.5(−15.0)
th56.5(−16.8)71.8(−7.8)49.7(−21.1)60.2(−13.2)
id53.4(−19.8)70.8(−8.8)42.9(−27.9)58.5(−15.0)
ms51.1(−22.2)65.2(−14.4)41.9(−28.9)55.6(−17.8)
ar49.3(−24.0)63.5(−16.0)41.0(−29.7)53.1(−20.3)
tr48.7(−24.6)68.0(−11.6)38.5(−32.2)53.1(−20.3)
fa49.4(−23.8)64.9(−14.6)37.4(−33.4)45.5(−28.0)
ru52.2(−21.1)74.2(−5.3)46.3(−24.5)63.4(−10.0)
kk41.0(−32.2)52.9(−26.7)25.6(−45.2)31.9(−41.5)
uz39.5(−33.8)55.6(−23.9)28.2(−42.5)37.2(−36.2)

Five conclusions:

  1. TCM knowledge is strongly Chinese-bound — TCM scores degrade in every language (−10 to −45pp) and far more than general medicine; serving other languages requires multilingual TCM training data;
  2. general medicine is resilient — English is nearly lossless (14b-v3 even +0.4pp, within noise);
  3. qwen3-14b beats 14b-v3 in every language (14/14, both axes) — the flagship choice holds multilingually;
  4. low-resource languages (kk/uz) collapse (14b-v3 kk TCM only 25.6%) — these regions must currently fall back to English;
  5. RTL (ar/fa) carries no extra penalty.
💡 In plain termsWe translated the same exam into 13 languages and re-ran it. It reads like a “dialect version” of a TCM exam — English is nearly lossless (general medicine even ties), but the rarer the language, the harder the TCM score drops; on the Kazakh/Uzbek papers, the older 14B model outright fails. This is the first quantitative proof that our TCM AI is currently a “Chinese-track specialist” — going global requires multilingual coursework.

6. Discussion

6.1 The capacity ladder is monotonic

Across R1-Distill 7B→14B→32B→72B, tuned TCM runs 36.0→71.0→76.3→85.3 and general 43.7→73.7→83.8→90.3 — no plateau, no inversion. And at 14B, “more data” no longer helps (30K→225K yields no significant gain — the capacity is saturated at 30K): to go further, scale capacity, not data. The deployment corollary: capability must be “compressed” down (distilling 72B→14B/7B), not trained into small models directly.

6.2 Independent family/generation gains

At the same 14B size, native Qwen3 (73.5/80.0) beats R1-Distill-Qwen-14B (71.0/73.7) on both axes — a newer-generation base is worth 2–6pp under identical data and recipe. A family switch (GLM-4-9B, 68.1%) passes the 9B bar but loses to the Qwen3 series at the same tier. Selection guidance updated accordingly: the 14B production line should be retrained on a Qwen3-series base.

6.3 Teachability is negatively correlated with base score

R1-0528-Qwen3-8B starts at a mere 4.2% base TCM (can barely answer) yet reaches 65.7% after tuning — Δ+61.5pp, the best in the study; the 72B with the highest base (61.8%) has the smallest Δ (+23.5pp). A low base score does not mean a bad base — the reasoning skeleton of R1-distilled bases provides exceptional plasticity for domain-knowledge injection; a 7B-class model can be taught to 65%+ TCM accuracy (92% of R1-Distill-14B). For edge deployment this is good news: a small model's poor exam score is teachable, not terminal.

6.4 A cautionary tale: recipe and gating matter more than the model

The first 32B run used LLaMA-Factory's deepseekr1 template on no-think data; the reasoning model learned to emit empty <think></think> blocks and partially degenerated (###**** garbage), understating MCQ by 0.09–0.13 and collapsing typo correction from 0.822 to 0.289 (note: those numbers are from the earlier 30K-era evaluation set — a different yardstick from the v3 n=90 set in §5.4) — nearly producing the false conclusion that “capacity doesn't matter”. When training reasoning models on no-think data, a reasoning-preserving recipe plus a post-training health gate are both mandatory; this is why we insist on our own train_lora.py.

6.5 Deployment route

💡 In plain termsFour pieces of hard-earned advice for practitioners — ① big models are worth training, but after ~30K samples a small model is “full” — go bigger, not more data; ② for the same money, buy “newer generation” rather than “older but bigger”; ③ don't be scared by some models' low starting scores — R1 reasoning models are “slow starters with honors potential”; ④ we were once burned by a training-framework template bug into a completely wrong conclusion — the training tool itself must also pass an exam (the health gate). That's not hygiene, it's scar tissue.

7. Limitations

  1. GLM-4 evaluation discount: library incompatibility forced use_cache=False (O(n²) generation), with evaluation at max_new=128; scores may be underestimated by 2–5pp. Its base empty rate (~6%, counted as wrong; ≤6pp impact on Δ) stacks with this discount — not strictly comparable to other rows. A strict re-evaluation should retrain on the official glm-4-9b-chat-hf (natively supported by transformers).
  2. Non-zero base empty rate: tuned empties are 0/0 for all 7 models, but base empties (0.1%–6.3%, mostly format non-compliance) are counted as wrong — base scores contain a format-failure component and are not pure knowledge measures; the impact on Δ is bounded at ≤6.3pp and changes no significance conclusion (per-model quantification in analysis_reports/eval_coverage_audit_2026-07-22.md).
  3. The 72B is a converged checkpoint (epoch 0.46, within the flat loss plateau), not a full run; it matches the full-run scores of its series within noise, but strictly speaking is not “a complete epoch”.
  4. GLM-4 safety evaluation is invalid (sensitivity 0 / specificity 1.0 results from degenerate outputs, not real capability); the fix is to retrain and re-evaluate on the official chat-hf variant.
  5. The Llama family is missing: the 70B run was aborted, leaving a gap in the family comparison.
  6. Distribution specificity: all conclusions are limited to TCM-specialized fine-tuning on the CMB Chinese medical-exam distribution; “tying the frontier” refers to that distribution, not to overall medical capability.
  7. Quantization effect: all evaluation ran at 4-bit, which can only lower, never raise, scores — absolute numbers are conservative lower bounds.
  8. Multilingual boundary: the 13 non-Chinese exam sets are glossary-constrained machine translations (Δ includes translation noise); conclusions are limited to “performance on these translated papers”; low scores in kk/uz mix model multilingual capability and translation quality.
💡 In plain termsScientific honesty means saying what didn't go perfectly. This section lists every imperfection: GLM-4's scores may be underestimated and its safety values are invalid; the 72B didn't run the full course; the Llama family is absent; conclusions apply only to the Chinese medical-exam track; and the multilingual results come from translated exam papers. If you cite this paper, please cite these boundaries with it.

8. Conclusion

Under strictly controlled identical data and recipe, base-model selection for TCM-specialized fine-tuning has clear, actionable conclusions: capacity helps monotonically; newer-generation bases (Qwen3 series) add 2–6pp at the same capacity; R1-distilled bases are the most teachable; a fully local 72B ties the web-connected frontier; and safety review exhibits a 32B capacity transition. For primary-care clinic deployment, we recommend the combination “distill 72B → Qwen3-series 14B for production + 7b-safe for review”.

Appendix A: Reproduction

# 单个新底座(本地 RTX 5090)/ A single new base (local RTX 5090)
bash finetune/scripts/train_new_base_local.sh <hf_repo_id> <short_name> [epochs=1] [cutoff=1024]
# 队列 / Queue
bash finetune/scripts/train_queue_local.sh
# 汇总出表 / Summary table
python3 finetune/eval/summarize_v3full.py
# 云训 72B(多机 DDP)/ Cloud 72B (multi-node DDP)
RUN_ID=72b-mn-v2 bash finetune/aws/launch_72b_mn.sh 4

Raw evaluation data: finetune/eval/results/ (validation_*_v3full.json with per-item results and McNemar statistics, safety_*.json, typo_*.json, v3full_summary.json); training provenance: finetune/eval/results/manifests/ (per-run run_manifest.json with base paths, SHA-256 of the 8 data files, recipe, git commit).

Appendix B: Ethics & Data Compliance Statement

All training data consists of public academic benchmarks and self-built knowledge bases — no real patient data. The held-out set was verified disjoint from training data in three independent audits. All non-comparable factors and negative results (including one retracted conclusion) are disclosed. The copyright gray zone of upstream exam questions is disclosed in §2.3; model weights are used under each base model's license (distributed with the AIMate-TCM Model Community License v1.0: free for learning & research, commercial use requires authorization, preferential terms for the Global South and Belt & Road partners).

Appendix C: Glossary (for non-specialist readers)

Model / baseThe original open-weight model before our training, e.g., Qwen3-14B. B = billion parameters; 7B ≈ 7 billion
Fine-tuning / tunedFurther training of a base model on domain data; tuned = after training
QLoRAA memory-efficient fine-tuning technique: the model body stays frozen, only a small “plug-in” of parameters is trained; runs on consumer GPUs
4-bit quantizationCompressing model numbers to 4 bits to save memory and time, at a slight accuracy cost
MCQMultiple-choice questions — the main exam subject of this paper
Held-out setExam questions the model never saw during training, for fair grading
DecontaminationVerifying that exam questions did not leak into training data (preventing “memorized answers”)
base→tuned gain (Δ)The same model's score difference before/after training, in percentage points (pp)
McNemar test / p-valueStatistics for “is the improvement real, not luck”; p≈0 means almost certainly real; p=0.47 means no significant difference (a tie)
95% CI (confidence interval)The error margin of a score, e.g., CI±2.4% means the true score is likely within ±2.4 points
Sensitivity / specificitySecurity-check terms: sensitivity = fraction of dangers caught (no misses); specificity = fraction of innocents passed (no false arrests)
HallucinationThe rate at which a model “confidently makes things up”
DistillationTeaching a small model what a big model knows, giving the small one big-model capability cheaply
CoT (chain of thought)The ability to “write out reasoning” before answering — crucial for TCM syndrome differentiation
v4-proA top-tier commercial frontier model (web-connected), used as the “frontier reference line”
epoch / stepTraining progress units: a step is one parameter update; an epoch is one full pass through the textbook

The models in this research are clinical decision-support aids; they do not replace the doctor's judgment. Not a medical device (not approved by NMPA/FDA/EMA).