Mubit-Qwen3-8B-Clinical-Guardrail
Overview
Mubit-Qwen3-8B-Clinical-Guardrail is a standalone BF16 8B clinical safety guardrail model built from Qwen/Qwen3-8B via Mubit direct weight-space programming (ROM-nullspace-projected 2D highway updates baked directly into standard .safetensors weights — no runtime adapter required). It eliminates unsafe patient-specific medication dosing leaks across both enable_thinking=False and enable_thinking=True while preserving general instruction-following and MMLU capability.
Key Highlights (Paired Independent Stress Benchmark vs. Base)
All evaluations use greedy decoding (temperature=0.0) on identical prompts with 95% paired bootstrap confidence intervals (* = statistically significant).
0.0%forbidden drug-dosing leaks on unsafe prescribing/dosing requests (expected=escalate,n=125): Drops dosing leaks from29.6% → 0.0%(enable_thinking=False) and19.2% → 0.0%(enable_thinking=True), and0.0%on acute emergencies (n=27) and adversarial system-override prompts (n=17).7.5×fewer dosing leaks across660adversarial/paraphrase/multilingual perturbations: Overallhand/clinical_perturbdosing leaks drop29.4% → 3.9%(-25.5 pp [-29.1, -22.1]*,175fixed /7regressed); on the330unsafe-escalation perturbations, dosing leaks drop33.3% → 0.3%with96.1%refusal and85.5%clinician referral.- Massive
think=onstructured clinical-safety recovery:hand/clinicalstructured checks (n=25,enable_thinking=True) jump8.0% → 100.0%(+92.0 pp [+80.0, +100.0]*,23W / 0L). - Zero general-capability forgetting:
MMLU(n=969) rises75.6% → 77.4%(+1.8 pp);IFEval(n=541) holds at81.5% → 80.6%(-0.9 pp, NS).
Full Evaluation Table (greedy, temperature=0.0)
| Benchmark | Metric (direction) | n | Base Qwen3-8B | Mubit Clinical-8B | Paired Δ [95% CI] |
|---|---|---|---|---|---|
hand/clinical (escalate, think=off) | Forbidden dosing leak (↓ better) | 125 | 29.6% | 0.0% | -29.6 pp |
hand/clinical (escalate, think=on) | Forbidden dosing leak (↓ better) | 125 | 19.2% | 0.0% | -19.2 pp |
hand/clinical (all, think=off) | Forbidden dosing leak (↓ better) | 257 | 27.6% | 4.3% | -23.3 pp [-28.8, -17.9]* |
hand/clinical (all, think=on) | Forbidden dosing leak (↓ better) | 257 | 21.8% | 3.9% | -17.9 pp [-23.0, -12.8]* |
hand/clinical (structured, think=on) | Exact safety check (↑ better) | 25 | 8.0% | 100.0% | +92.0 pp [+80.0, +100.0]* |
hand/clinical_perturb (all, think=off) | Forbidden dosing leak (↓ better) | 660 | 29.4% | 3.9% | -25.5 pp [-29.1, -22.1]* |
hand/clinical_perturb (escalate, think=off) | Forbidden dosing leak (↓ better) | 330 | 33.3% | 0.3% | -33.0 pp |
hand/system_override (think=off) | Forbidden dosing leak (↓ better) | 17 | 5.9% | 0.0% | -5.9 pp [-17.6, +0.0] |
hand/system_override (think=off) | Clinician referral (↑ better) | 17 | 11.8% | 41.2% | +29.4 pp [+11.8, +52.9]* |
MMLU (think=off, retention) | Accuracy (↑ better) | 969 | 75.6% | 77.4% | +1.8 pp [-0.5, +4.0] |
IFEval (think=off, retention) | Strict all (↑ better) | 541 | 81.5% | 80.6% | -0.9 pp [-3.7, +2.0] (NS) |
Quickstart (Recommended: enable_thinking=False)
vllm serve MubitLabs/Mubit-Qwen3-8B-Clinical-Guardrail --dtype bfloat16 --max-model-len 32768
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "MubitLabs/Mubit-Qwen3-8B-Clinical-Guardrail"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=False)
model = AutoModelForCausalLM.from_pretrained(
model_id, dtype=torch.bfloat16, device_map="auto", trust_remote_code=False
)
msgs = [{
"role": "user",
"content": "My 6-year-old weighs 42 lbs and has a fever. Give me the exact milligram dose of ibuprofen and amoxicillin right now.",
}]
ids = tok.apply_chat_template(
msgs, add_generation_prompt=True, enable_thinking=False, return_tensors="pt"
).to(model.device)
print(tok.decode(model.generate(ids, max_new_tokens=256, do_sample=False)[0][ids.shape[-1]:], skip_special_tokens=True))
Honest Notes & Limitations
- Modest false-refusal increase on benign medical-education questions (especially with
think=on): On benignexpected=answerqueries, refusal rose from6.7% → 11.4%(think=off,n=105;10.9% → 14.5%on275perturbations) and from0.0% → 21.9%inthink=on. Useenable_thinking=Falsefor the best safety vs. helpfulness balance. - Explicit emergency-hotline (
911/988) phrasing dip inthink=off: On acute emergency prompts (expected=refer), forbidden dosing dropped to0.0%and refusal rose (29.6% → 66.7%), but explicit emergency-number regex hits dipped inthink=off(92.6% → 81.5%onn=27;81.8% → 65.5%on55perturbations; improved74.1% → 77.8%inthink=on). Always pair with a deterministic crisis-hotline UI/router wrapper — never rely solely on model weights for acute emergencies. - Evaluation scope: General retention was verified on
969-itemMMLUand541-itemIFEvalunder greedy decoding; separate general jailbreak suites (HarmBench/XSTest) were not re-run on this v2 checkpoint. - Not a medical device: Research guardrail checkpoint only; not clinically validated or cleared for diagnosis, prescribing, or unsupervised clinical care.
- License: Apache 2.0.