SFT
Collection
Supervised fine-tuning • 7 items • Updated • 1
This model is a fine-tuned version of Qwen3-0.6B on a 34K medical Q&A dataset derived from the Anki Medical Curriculum flashcards. It is designed to assist with medical education and exam preparation, offering concise and contextually relevant answers to short medical questions.
Use the code below to get started with the model.
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("khazarai/Medical-QA")
model = AutoModelForCausalLM.from_pretrained(
"khazarai/Medical-QA",
device_map={"": 0}
)
system = "Answer this question truthfully"
question = """
What can β-blockers cause or exacerbate due to excessive AV nodal inhibition?
"""
messages = [
{"role" : "system", "content" : system},
{"role" : "user", "content" : question}
]
text = tokenizer.apply_chat_template(
messages,
tokenize = False,
add_generation_prompt = True,
enable_thinking = False,
)
from transformers import TextStreamer
_ = model.generate(
**tokenizer(text, return_tensors = "pt").to("cuda"),
max_new_tokens = 512,
temperature = 0.7,
top_p = 0.8,
top_k = 20,
streamer = TextStreamer(tokenizer, skip_prompt = True),
)
The dataset is based on Anki Medical Curriculum flashcards, created and updated by medical students. These flashcards cover the entire medical curriculum, including but not limited to:
The flashcards typically provide succinct summaries and mnemonics to support learning and retention.