Team Ai
Modelpublic

charakaweb/phi4-clinical

sourceHugging Facemitupdated 5d agoView on Hugging Face
0likes487downloads
Model Card

Phi-4-mini Clinical (PyTorch / Transformers)

A specialized 3.8B biomedical & clinical reasoning foundation model built on Microsoft's Phi-4-mini-instruct, formatted for standard Hugging Face transformers and PyTorch.


๐Ÿ—๏ธ 3-Stage Transfer Learning Curriculum

  1. 1.Stage 1 (STEM Foundation): 116,000 instruction pairs across NCERT Classes 6โ€“12 (Physics, Chemistry, Biology) eliminating foundational science hallucinations.
  2. 2.Stage 2 (PubMed 2026 Evidence): 12 recent 2026 clinical update archives from NCBI FTP covering survival outcomes (OS, PFS, HR), targeted therapeutics, and clinical trial endpoints.
  3. 3.Stage 3 (Comprehensive Internal Medicine): Balanced multi-specialty clinical curriculum (cardiology, nephrology, endocrinology, pulmonology) with an active oncology replay buffer.

All LoRA adapter weights have been permanently fused into the base weights.


๐Ÿ“Š Benchmark Results (PubMedQA)

Evaluated on 50 biomedical research decision tasks from PubMedQA:

ModelAccuracyScoreAvg LatencyRelative Improvement
Base Phi-4-mini (4-bit)26.0%13 / 501.02s / questionBaseline
Phi-4-mini Clinical (Merged)40.0%20 / 500.93s / question+53.8% relative gain

โšก Quickstart with Transformers

python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "charakaweb/phi4-clinical"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

prompt = "<|user|>\nWhat are the first-line therapeutic recommendations for heart failure with preserved ejection fraction (HFpEF)?<|end|>\n<|assistant|>\n"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

โš•๏ธ Clinical Disclaimer

This model is intended solely for biomedical research, educational exploration, and experimental evaluation. It is not an FDA-cleared medical device and must not be used as a substitute for professional clinical judgment, diagnosis, or treatment.

๐Ÿ† Verified Medical Benchmark Results

BenchmarkScopeTested SamplesAccuracyEvaluation Hardware
PubMedQAClinical Trial Evidence Decisions10049.0%Apple Silicon Metal GPU
MedQA (USMLE)Medical Board Diagnostic Cases10053.0%Apple Silicon Metal GPU