Views
No views yet
1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3repo = "stravoris/medmcq-pathology-classifier-qwen3-0.6b"
4tokenizer = AutoTokenizer.from_pretrained(repo)
5model = AutoModelForCausalLM.from_pretrained(repo)
6
7prompt = """Classify the following Pathology MCQ by topic.
8
9Question: <a Pathology MCQ here>
10A) <option A>
11B) <option B>
12C) <option C>
13D) <option D>
14
15Topic:"""
16
17inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
18outputs = model.generate(**inputs, max_new_tokens=16, do_sample=False)
19print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))Classify the following Pathology MCQ by topic.
Question: <question text>
A) <option A>
B) <option B>
C) <option C>
D) <option D>
Topic:Qwen/Qwen3-0.6B. The base model's license and usage terms also apply.