hetanshwaghela commited on
Commit
a3ad4cd
Β·
verified Β·
1 Parent(s): baa684b

Experiment-log model card (honest)

Browse files
Files changed (1) hide show
  1. README.md +67 -66
README.md CHANGED
@@ -3,7 +3,7 @@ base_model: Qwen/Qwen3.5-0.8B
3
  license: apache-2.0
4
  language:
5
  - en
6
- library_name: peft # LoRA adapter (apply on the base model)
7
  pipeline_tag: text-generation
8
  datasets:
9
  - hetanshwaghela/autoscientist-healthcare-reasoning
@@ -22,98 +22,99 @@ tags:
22
  - fine-tuned
23
  ---
24
 
25
- # AutoScientist β€” Healthcare Clinical-Reasoning Model (LoRA)
26
 
27
  > **Built with Adaptive Data by Adaption.**
 
 
28
 
29
- A **Qwen3.5-0.8B** LoRA adapter fine-tuned with **AutoScientist** on an adapted
30
- healthcare **clinical-reasoning** dataset (reason-then-answer chain-of-thought), plus a
31
- grounded public-health operations blend.
32
 
33
- ## ⚠️ Honest performance summary (read first)
 
 
 
 
 
34
 
35
- This is a **research artifact**, released for reproducibility and to accompany the
36
- adapted dataset β€” **not** a model that outperforms its base.
37
 
38
- - On a held-out LLM-judged win-rate (Gemini 3.1 pro, 200 held-out samples), the
39
- **base model wins**: **base 58 / adapted 42** on the dataset task, **base 55 /
40
- adapted 46** on the broader Medical category.
41
- - The base `Qwen/Qwen3.5-0.8B` is already instruction-tuned; SFT-ing a 0.8B model on
42
- long chain-of-thought completions makes it more verbose, and the judge prefers the
43
- base's more concise answers. Two independent training runs both landed below base.
44
- - **The strong result in this project is the *dataset*, not the model** β€” see the
45
- [dataset card](https://huggingface.co/datasets/hetanshwaghela/autoscientist-healthcare-reasoning)
46
- for the +30% Adaptive Data quality improvement (Grade B→A). This model is the
47
- companion training artifact.
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
  ## Model description
50
  - **Base model:** `Qwen/Qwen3.5-0.8B` β€” the exact model AutoScientist trained from
51
- (served via `togethercomputer/Qwen3.5-0.8B`). All numbers above are **relative to
52
- this base** with identical prompts and inference settings.
53
- - **Fine-tuning method:** AutoScientist, LoRA (SFT, `train_on_inputs=false`).
54
- - **Recipe (as run):** rank `r=64`, `alpha=128`, `dropout=0.05`, target modules
55
- `q_proj,k_proj,v_proj,o_proj`, **3 epochs**, learning rate ~`1.1e-4` (cosine,
56
- warmup 0.05), weight decay 0.01, grad-clip 2. Final train loss β‰ˆ 1.19,
57
- eval loss β‰ˆ 1.53 (168 steps).
58
- - **Weight format:** **LoRA adapter** (`adapter_model.safetensors` +
59
- `adapter_config.json`). Apply on top of the base model with PEFT.
60
- - **Language:** English. **Size:** ~0.8B base params (small β€” fast, publishable).
61
-
62
- ## Training data
63
- Trained on the **Adapted Healthcare Clinical-Reasoning (AutoScientist)** dataset β€” the
64
- adapted output of the foundation β†’ Adaptive Data β†’ AutoScientist pipeline. Foundation:
65
- [`FreedomIntelligence/medical-o1-reasoning-SFT`](https://huggingface.co/datasets/FreedomIntelligence/medical-o1-reasoning-SFT)
66
- (Apache-2.0, gold chain-of-thought) blended with 30 curated CDC-grounded public-health
67
- rows; adapted with `deduplication` + `hallucination_mitigation` under a
68
- clinical-reasoning safety blueprint. See the dataset card for full provenance.
69
-
70
- - HF dataset: https://huggingface.co/datasets/hetanshwaghela/autoscientist-healthcare-reasoning
71
- - Kaggle dataset: https://www.kaggle.com/datasets/hetanshwaghela1/autoscientist-healthcare-reasoning
72
-
73
- Recorded for reproducibility / baseline comparison:
74
- - Base model id: `Qwen/Qwen3.5-0.8B` (served as `togethercomputer/Qwen3.5-0.8B`)
75
- - AutoScientist experiment id: `0eac225d-a25c-43b3-ae85-0549d5d08d8e`
76
- - Adapted dataset id: `26048b57-f164-46d5-810b-12d498a76660` (20,000 rows)
77
-
78
- ## Evaluation results (base vs. adapted)
79
- Held-out LLM-judged win-rate, judge = **Gemini 3.1 pro**, 200 held-out samples,
80
- identical prompts and settings for both models.
81
 
82
  | Win-rate (head-to-head) | Base `Qwen3.5-0.8B` | Adapted (this model) |
83
  |---|---|---|
84
  | On the dataset task | **58** | 42 |
85
  | Medical category (all tasks) | **55** | 46 |
86
 
87
- **Interpretation:** the adapted model does **not** beat base on this held-out judge.
88
- The value of the pipeline shows up in **dataset quality** (see dataset card: +30%,
89
- Grade B→A, top-third percentile), not in the small-model head-to-head.
90
 
91
- ## Intended uses
92
- - Reproducing the AutoScientist pipeline; research on grounding, hallucination
93
- mitigation, CoT reasoning, and small-model fine-tuning behavior.
94
- - Clinical-reasoning **education**, with the caveats below.
95
-
96
- ## Limitations & safety
97
- - **Underperforms its base model on the held-out judge** (see above). Do not treat it
98
- as an improvement over `Qwen/Qwen3.5-0.8B`.
99
- - **Educational decision-support, not a medical device.** Not for individual diagnosis,
100
- treatment, or medication dosing without a qualified clinician.
101
- - Inherits limitations/biases of the base model and of partly machine-generated data;
102
- tends to be verbose. English, exam-style skew.
103
- - Escalate emergencies; do not rely on outputs for high-stakes decisions; preserve
104
- numeric values exactly.
105
 
106
  ## How to use
107
  ```python
108
  from peft import PeftModel
109
  from transformers import AutoModelForCausalLM, AutoTokenizer
110
-
111
  base = "Qwen/Qwen3.5-0.8B"
112
  tok = AutoTokenizer.from_pretrained(base)
113
  model = AutoModelForCausalLM.from_pretrained(base)
114
  model = PeftModel.from_pretrained(model, "hetanshwaghela/autoscientist-healthcare-reasoning")
115
  ```
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  ## Credit
118
  **Built with Adaptive Data by Adaption.** Base: `Qwen/Qwen3.5-0.8B`. Foundation data:
119
  `FreedomIntelligence/medical-o1-reasoning-SFT` (Apache-2.0). Public-health blend: CDC
 
3
  license: apache-2.0
4
  language:
5
  - en
6
+ library_name: peft
7
  pipeline_tag: text-generation
8
  datasets:
9
  - hetanshwaghela/autoscientist-healthcare-reasoning
 
22
  - fine-tuned
23
  ---
24
 
25
+ # πŸ§ͺ AutoScientist β€” Healthcare Clinical-Reasoning (LoRA) + Experiment Log
26
 
27
  > **Built with Adaptive Data by Adaption.**
28
+ > A `Qwen/Qwen3.5-0.8B` LoRA adapter trained on the adapted clinical-reasoning dataset β€”
29
+ > released together with the *honest, reproducible experiment* that produced it.
30
 
31
+ ## TL;DR β€” read this first (integrity over hype)
 
 
32
 
33
+ This is a **research artifact**, not a leaderboard-beating model. On a held-out
34
+ LLM-judged win-rate (Gemini 3.1 pro, 200 samples) the **base model wins, 58/42**.
35
+ We report that plainly. The **contribution of this project is the dataset** (+30%
36
+ quality, Grade B→A — see the
37
+ [dataset card](https://huggingface.co/datasets/hetanshwaghela/autoscientist-healthcare-reasoning))
38
+ and the **rigorous finding** documented below.
39
 
40
+ ## πŸ““ The AutoScientist's notebook
 
41
 
42
+ **Hypothesis.** Adapting a high-quality medical chain-of-thought dataset (+30% platform
43
+ quality) and SFT-ing a small model on it should beat the base model on held-out medical
44
+ reasoning.
45
+
46
+ **Experiment 1** β€” 20k rows, LoRA r=64, 3 epochs.
47
+ β†’ Base **58** / adapted **42**. Medical category: base **55** / adapted **46**.
48
+ β†’ Diagnostic: eval-loss plateaued after ~epoch 1 (1.559β†’1.525) while train-loss kept
49
+ falling (2.27β†’1.19) β€” **overfitting**.
50
+
51
+ **Experiment 2** β€” controlled follow-up: **60k rows**, **+40% general-purpose data**
52
+ (to counter catastrophic forgetting, per platform guidance), tuned recipe, more steps.
53
+ β†’ Base **62** / adapted **38**. It got **worse** β€” higher peak LR + more steps moved the
54
+ model *further* from a strong base.
55
+
56
+ **Conclusion (reproducible across two runs).**
57
+ > Supervised fine-tuning an *already-instruction-tuned* 0.8B model on long (~780-word)
58
+ > chain-of-thought makes it **more verbose**, and the judge prefers the base's crisper
59
+ > answers. **Dataset quality and small-model win-rate are different axes.** No
60
+ > hyperparameter or data-mix change flipped it β€” the effect is structural, not a bug.
61
+
62
+ This is the result the challenge is designed to surface: a clean, honest, reproducible
63
+ negative β€” the dataset is the win; the model is the documented experiment.
64
 
65
  ## Model description
66
  - **Base model:** `Qwen/Qwen3.5-0.8B` β€” the exact model AutoScientist trained from
67
+ (served via `togethercomputer/Qwen3.5-0.8B`). All numbers are relative to this base,
68
+ identical prompts and settings.
69
+ - **Method:** AutoScientist, LoRA SFT, `train_on_inputs=false`.
70
+ - **Released recipe (Experiment 1, the stronger of the two):** r=64, Ξ±=128, dropout 0.05,
71
+ target `q,k,v,o_proj`, 3 epochs, LR ~1.1e-4 (cosine, warmup 0.05), weight-decay 0.01,
72
+ grad-clip 2. Final train-loss β‰ˆ 1.19, eval-loss β‰ˆ 1.53 (168 steps).
73
+ - **Weight format:** **LoRA adapter** (`adapter_model.safetensors` + `adapter_config.json`),
74
+ base repointed to `Qwen/Qwen3.5-0.8B` for portable PEFT loading.
75
+ - **Language:** English. **Size:** ~0.8B base params.
76
+
77
+ ## πŸ“Š Evaluation (base vs. adapted) β€” honest
78
+ Judge = **Gemini 3.1 pro**, 200 held-out samples, identical prompts/settings.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
80
  | Win-rate (head-to-head) | Base `Qwen3.5-0.8B` | Adapted (this model) |
81
  |---|---|---|
82
  | On the dataset task | **58** | 42 |
83
  | Medical category (all tasks) | **55** | 46 |
84
 
85
+ **Dataset quality (Adaptive Data, platform-measured):** +30% overall, Grade B→A,
86
+ completion quality +37.9%, message quality +17.6%, percentile 15.3β†’33.0.
 
87
 
88
+ ## 🩺 What it's designed to do (safety blueprint)
89
+ Trained to *reason then answer*, stay grounded in evidence, hedge, recommend clinician
90
+ confirmation, escalate red-flag/emergency symptoms, refuse when uncertain, and preserve
91
+ numeric values exactly. (Design goals of the dataset; not a claim of clinical accuracy.)
 
 
 
 
 
 
 
 
 
 
92
 
93
  ## How to use
94
  ```python
95
  from peft import PeftModel
96
  from transformers import AutoModelForCausalLM, AutoTokenizer
 
97
  base = "Qwen/Qwen3.5-0.8B"
98
  tok = AutoTokenizer.from_pretrained(base)
99
  model = AutoModelForCausalLM.from_pretrained(base)
100
  model = PeftModel.from_pretrained(model, "hetanshwaghela/autoscientist-healthcare-reasoning")
101
  ```
102
 
103
+ ## ⚠️ Limitations & safety
104
+ - **Underperforms its base on the held-out judge** β€” do not treat as an improvement over
105
+ `Qwen/Qwen3.5-0.8B`. Tends to be verbose.
106
+ - **Educational decision-support, not a medical device.** Not for individual diagnosis,
107
+ treatment, or dosing without a qualified clinician. Escalate emergencies; preserve
108
+ numeric values exactly.
109
+ - Inherits base-model and machine-generated-data limitations; English, exam-style skew.
110
+
111
+ ## πŸ” Reproducibility
112
+ - Base: `Qwen/Qwen3.5-0.8B` (served as `togethercomputer/Qwen3.5-0.8B`)
113
+ - AutoScientist experiment id: `0eac225d-a25c-43b3-ae85-0549d5d08d8e`
114
+ - Adapted dataset id: `26048b57-f164-46d5-810b-12d498a76660` (20,000 rows)
115
+ - Dataset: https://huggingface.co/datasets/hetanshwaghela/autoscientist-healthcare-reasoning
116
+ - Kaggle model: https://www.kaggle.com/models/hetanshwaghela1/autoscientist-healthcare-reasoning
117
+
118
  ## Credit
119
  **Built with Adaptive Data by Adaption.** Base: `Qwen/Qwen3.5-0.8B`. Foundation data:
120
  `FreedomIntelligence/medical-o1-reasoning-SFT` (Apache-2.0). Public-health blend: CDC