Downloads · 30 days
6
2% of all-time downloads
rishabh9559/medical-llama-3.2-3B
medical-llama-3.2-3B is a question answering model from rishabh9559. Use it when the input is a question plus a passage. The card lists the license as mit.
Medical-LLaMA-3.2-3B is a domain-specialized medical language model fine-tuned using LoRA (Low-Rank Adaptation) on structured medical textbook data derived from the Gale Encyclopedia of Medicine.
Downloads · 30 days
6
2% of all-time downloads
All-time downloads
347
Public
Parameters
3.2B
6.4 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors6.4 GB · 100%
From the Hugging Face model README
Medical-LLaMA-3.2-3B is a domain-specialized medical language model fine-tuned using LoRA (Low-Rank Adaptation) on structured medical textbook data derived from the Gale Encyclopedia of Medicine.
The model is optimized for medical education, terminology explanation, structured medical Q&A, and healthcare content generation.
unsloth/Llama-3.2-3B-InstructMethod: Supervised Fine-Tuning (SFT)
Parameter Efficient Tuning: LoRA
LoRA Rank (r): 32
LoRA Alpha: 32
LoRA Dropout: 0.05
Target Modules:
q_proj, k_proj, v_proj, o_proj,
gate_proj, up_proj, down_proj
Bias: None
Gradient Checkpointing: Enabled (Unsloth optimized)
| Parameter | Value |
|---|---|
| Batch Size (per device) | 16 |
| Gradient Accumulation | 2 |
| Effective Batch Size | 32 |
| Epochs | 3 |
| Learning Rate | 1.5e-4 |
| Scheduler | Cosine |
| Warmup Ratio | 0.1 |
| Weight Decay | 0.05 |
| Precision | BF16 |
| Optimizer | AdamW 8-bit |
| Seed | 3407 |
Source: Gale Encyclopedia of Medicine Total Records: 13,398 Unique Medical Titles: 1,742 Unique Section Types: 15
pip install transformers torch accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "rishabh9559/medical-llama-3.2-3B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto"
)
messages = [
{"role": "user", "content": "Explain abdominal ultrasound simply."}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
output = model.generate(
**inputs,
max_new_tokens=200,
temperature=0.2
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
This model is suitable for:
This model is for educational and informational purposes only.
It is NOT intended for:
Always consult licensed medical professionals for healthcare decisions.
Rishabh ML Engineer | LLM Developer | Medical AI Enthusiast
If you use this model in research, please cite this repository.