Downloads · 30 days
53
30% of all-time downloads
balastml/balastmed-4B
balastmed-4B is a text generation model from balastml. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
A fine-tuned version of Qwen/Qwen3.5-4B designed to run fully locally as a clinical decision support assistant for doctors and healthcare professionals.
Downloads · 30 days
53
30% of all-time downloads
All-time downloads
177
Public
Repo size
3.1 GB
Likes
2
Public
Click a slice to open those files.
.gguf2.8 GB · 89%
From the Hugging Face model README
A fine-tuned version of Qwen/Qwen3.5-4B designed to run fully locally as a clinical decision support assistant for doctors and healthcare professionals.
Specialized in emergency triage, ESI scoring, differential diagnosis, and medical situation management — without sending any patient data to external servers.
⚠️ Disclaimer: This model is for research and clinical support purposes only. It is NOT a substitute for professional medical judgment. Final decisions always rest with licensed medical professionals.
| Property | Value |
|---|---|
| Base Model | Qwen/Qwen3.5-4B |
| Fine-tuning Method | LoRA + SFT (Thinking pipeline re-training) |
| Task | Medical Triage / Clinical Decision Support |
| Language | English |
| License | CC-BY-NC 4.0 |
| Parameters | ~4B |
| Quantization | Q4_K_M (GGUF) — 2.78 GB |
| Benchmark | Score |
|---|---|
| MedQA (USMLE-style) | 77.6% |
MedQA tests clinical reasoning across USMLE-style multiple choice questions covering diagnosis, treatment, and medical knowledge.
You are a clinical medical assistant. Think through clinical reasoning, consider differentials, identify what data is missing, and flag emergencies. State uncertainty when evidence is insufficient. Defer final decisions to clinicians.
| Parameter | Value | Notes |
|---|---|---|
temperature | 0.72 | Balanced between consistency and nuanced clinical reasoning |
top_p | 0.94 | Wide token probability coverage |
top_k | 60 | For rare conditions and broader differential evaluation |
top_k | 20–40 | For focused, high-confidence diagnosis |
repetition_penalty | 1.08 | Prevents output looping without over-constraining |
max_new_tokens | 512–1024 | Higher range recommended for thinking mode |
Tip: Use
top_k: 60when exploring broad differentials or rare presentations. Usetop_k: 20–40when you need a clear, direct clinical answer. The thinking pipeline produces higher quality output whenmax_new_tokensis set generously (≥1024).
ollama run hf.co/balastml/balastmed-4B:Q4_K_M
brew install llama.cpp
llama-server -hf balastml/balastmed-4B:Q4_K_M
Search for balastml/balastmed-4B in LM Studio's model browser and download the Q4_K_M variant.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "balastml/balastmed-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto"
)
system_prompt = "You are a clinical medical assistant. Think through clinical reasoning, consider differentials, identify what data is missing, and flag emergencies. State uncertainty when evidence is insufficient. Defer final decisions to clinicians."
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": "58yo male, crushing chest pain radiating to left arm, diaphoresis, BP 90/60. ESI level and immediate actions?"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=1024,
temperature=0.72,
top_p=0.94,
top_k=40,
repetition_penalty=1.08,
do_sample=True
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Emergency Triage:
22yo female, sudden onset severe dyspnea, SpO2 82%, stridor present.
→ ESI level and initial management?
Differential Diagnosis:
45yo male, 3-week history of progressive fatigue, night sweats,
unintentional 8kg weight loss, palpable cervical lymphadenopathy.
→ Top differentials and recommended workup?
Medical Situation Management:
ICU patient, post-op day 2 after bowel resection. Sudden fever 39.8°C,
HR 118, BP dropping to 88/55, rising lactate. Current antibiotics: piperacillin-tazobactam.
→ Assessment and management priorities?
BalastMed-4B is designed for fully offline, local deployment. No patient data is sent to external servers. This makes it suitable for:
Minimum hardware for local use: 8GB RAM (Q4_K_M quantization, ~2.78 GB)
| Model | MedQA | Languages | Notes |
|---|---|---|---|
| BalastMed-4B | 77.6% | EN | This model |
| BalastMed-9B | 88.2% | EN + TR | Larger, bilingual |
For questions, collaborations, or clinical feedback, open a discussion on the Community tab.