Downloads · 30 days
18
21% of all-time downloads
arumpuri/deepseek-r1-medmcqa-qlora
deepseek-r1-medmcqa-qlora is a text generation model from arumpuri. Use it when you need the model to write or continue text. It is set up for peft.
This model is a fine-tuned version of deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B on the MedMCQA dataset using QLoRA (Quantized Low-Rank Adaptation).
Downloads · 30 days
18
21% of all-time downloads
All-time downloads
84
Public
Repo size
247 MB
Likes
0
Public
Click a slice to open those files.
.safetensors222 MB · 67%
From the Hugging Face model README
This model is a fine-tuned version of deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B on the MedMCQA dataset using QLoRA (Quantized Low-Rank Adaptation).
| Class | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|
| A | 0.0000 | 0.0000 | 0.0000 | 0 |
| B | 0.0000 | 0.0000 | 0.0000 | 0 |
| C | 1.0000 | 0.0980 | 0.1785 | 500 |
| D | 0.0000 | 0.0000 | 0.0000 | 0 |
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Load base model and tokenizer
base_model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B")
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B")
# Load fine-tuned model
model = PeftModel.from_pretrained(base_model, "arumpuri/deepseek-r1-medmcqa-qlora")
# Example usage
prompt = '''Question: What is the most common cause of acute pancreatitis?
Options:
A. Alcohol abuse
B. Gallstones
C. Hypertriglyceridemia
D. Medications
Answer:'''
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50, temperature=0.7)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
The model was evaluated using comprehensive metrics including:
The evaluation was performed on both validation and test sets to ensure robust performance assessment.
This model is designed for medical question answering tasks, particularly multiple-choice questions. It should be used as a research tool and not for actual medical diagnosis or treatment recommendations.