Text Generation
PEFT
Safetensors
English
qwen3_5
healthcare
medical
clinical-reasoning
chain-of-thought
grounded-generation
hallucination-mitigation
safety
adaptive-data
autoscientist
lora
qwen
fine-tuned
conversational
Instructions to use hetanshwaghela/autoscientist-healthcare-reasoning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use hetanshwaghela/autoscientist-healthcare-reasoning with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-0.8B") model = PeftModel.from_pretrained(base_model, "hetanshwaghela/autoscientist-healthcare-reasoning") - Notebooks
- Google Colab
- Kaggle
Experiment-log model card (honest)
Browse files
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
|
| 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
|
| 26 |
|
| 27 |
> **Built with Adaptive Data by Adaption.**
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
|
| 30 |
-
healthcare **clinical-reasoning** dataset (reason-then-answer chain-of-thought), plus a
|
| 31 |
-
grounded public-health operations blend.
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
| 36 |
-
adapted dataset β **not** a model that outperforms its base.
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 52 |
-
|
| 53 |
-
- **
|
| 54 |
-
- **
|
| 55 |
-
`
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 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 |
-
**
|
| 88 |
-
|
| 89 |
-
Grade BβA, top-third percentile), not in the small-model head-to-head.
|
| 90 |
|
| 91 |
-
##
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 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
|