File size: 4,439 Bytes
0de5a77 73fba5f 0de5a77 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | ---
license: apache-2.0
base_model: Qwen/Qwen3-1.7B
tags:
- medical
- mcq
- question-answering
- physiology
- qwen3
- medmcq
- stravoris
pipeline_tag: text-generation
language:
- en
---
# MedMCQ — Physiology Answer Generator (Qwen3-1.7B)
A small fine-tuned Qwen3 model that **answers Physiology medical multiple-choice questions (MCQs)**. Given a Physiology topic, an MCQ stem, and four lettered options, it returns the correct option and a brief clinical explanation.
This is a **per-subject answer generator** — the third hop in the [MedMCQ three-hop pipeline](#the-medmcq-pipeline). It is reached only after the [subject classifier](https://huggingface.co/stravoris/medmcq-subject-classifier-qwen3-0.6b) has routed the MCQ to Physiology and the [Physiology topic classifier](https://huggingface.co/stravoris/medmcq-physiology-classifier-qwen3-0.6b) has tagged it with a topic.
## The MedMCQ pipeline
The MedMCQ project explores small, specialized models for medical MCQs. Instead of using one large model for everything, it splits the task across three hops:
1. **Subject routing** — the [subject classifier](https://huggingface.co/stravoris/medmcq-subject-classifier-qwen3-0.6b) picks the medical subject.
2. **Topic classification** — the [Physiology topic classifier](https://huggingface.co/stravoris/medmcq-physiology-classifier-qwen3-0.6b) picks the topic within Physiology.
3. **Answer generation** — *this model.* Given the topic and the MCQ, return the correct option and an explanation.
Each hop is a separate, narrow model. They are all published under the [MedMCQ Medical Models](https://huggingface.co/collections/stravoris/medmcq-medical-models) collection.
## Quick start
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "stravoris/medmcq-physiology-qwen3-1.7b"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
prompt = """Answer the following medical question. Provide the correct option and a brief explanation.
Topic: <a Physiology topic>
Question: <the MCQ stem>
Options:
A) <option A>
B) <option B>
C) <option C>
D) <option D>"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
```
## Prompt format
The model expects prompts in this exact form:
```
Answer the following medical question. Provide the correct option and a brief explanation.
Topic: <topic name>
Question: <question stem>
Options:
A) <option A>
B) <option B>
C) <option C>
D) <option D>
```
The model completes the prompt with the correct option and a short clinical explanation, in the form:
```
<letter>) <correct option text>
<brief explanation>
```
## What this model is not
This is a **sample model for demonstration**. It is not a production-grade medical AI system:
- It has not been formally evaluated against board-level benchmarks.
- It should not be used to make clinical decisions or provide medical advice.
- Returned answers and explanations may contain factual errors or outdated information. A clinician should review every output before any educational use.
- It is narrow: it only answers Physiology MCQs and is brittle outside that domain or on prompts that deviate from the format above.
- It was trained on a curated educational dataset and inherits any biases or gaps in that data.
The MedMCQ project exists to explore small-model pipeline architectures for medical reasoning, not to ship a medical product.
## Training data
Trained on the Physiology subset of the [Stravoris Medical MCQ dataset](https://huggingface.co/datasets/stravoris/medical-mcq-dataset) — educational Physiology MCQs with topic labels, stems, lettered options, the correct option, and a worked explanation.
## Base model
Fine-tuned from [`Qwen/Qwen3-1.7B`](https://huggingface.co/Qwen/Qwen3-1.7B). The base model's license and usage terms also apply.
## License
Apache 2.0. See [LICENSE](https://www.apache.org/licenses/LICENSE-2.0).
## Collection
Part of the [MedMCQ Medical Models](https://huggingface.co/collections/stravoris/medmcq-medical-models) collection — all 31 models that make up the MedMCQ three-hop pipeline.
|