SAVRN
Search Contact SAVRN

Open-weight model · Text generation

phi4-clinical-mlx

by Web charakaweb/phi4-clinical-mlx

phi4-clinical-mlx is an open-weight model for text generation from Web, released under MIT License. It has 3.8B parameters and a 131,072-token context. At 16-bit it needs about 9.2 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index.

A specialized 3.8B biomedical & clinical reasoning model built on Microsoft's Phi-4-mini-instruct, optimized natively for Apple Silicon Metal acceleration via Apple MLX. The model underwent a 3-stage transfer learning curriculum: 1.

Parameters3.8B
Context131,072
Weights2.2 GB
Licensemit
AccessOpen weights
Monthly Downloads—

Runs On

What it takes to serve phi4-clinical-mlx (3.8B parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 7.7 GB 9.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 3.8 GB 4.6 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 1.9 GB 2.3 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Oct 7, 2026.

phi4-clinical-mlx on every accelerator the SAVRN Index prices, at every precision

Model Card

By Web, published under mit, revision eb6d117ed7d9.

A specialized 3.8B biomedical & clinical reasoning model built on Microsoft's Phi-4-mini-instruct, optimized natively for Apple Silicon Metal acceleration via Apple MLX. The model underwent a 3-stage transfer learning curriculum: 1. Stage 1 (STEM Foundation): 116,000 instruction pairs across NCERT Classes 6–12 (Physics, Chemistry, Biology) eliminating foundational science hallucinations. 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. Stage 3 (Comprehensive Internal Medicine): Balanced multi-specialty clinical curriculum (cardiology, nephrology…

Read Web's full model card

Phi-4-mini Clinical MLX (4-Bit Merged)

A specialized 3.8B biomedical & clinical reasoning model built on Microsoft's Phi-4-mini-instruct, optimized natively for Apple Silicon Metal acceleration via Apple MLX.

The model underwent a 3-stage transfer learning curriculum: 1. Stage 1 (STEM Foundation): 116,000 instruction pairs across NCERT Classes 6–12 (Physics, Chemistry, Biology) eliminating foundational science hallucinations. 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. Stage 3 (Comprehensive Internal Medicine): Balanced multi-specialty clinical curriculum (cardiology, nephrology, endocrinology, pulmonology) with an active oncology replay buffer.

The LoRA adapter weights have been permanently fused into the base 4-bit weights (mlx_lm fuse) to deliver zero-latency execution.


Benchmark Results (PubMedQA)

Evaluated on 50 biomedical research decision tasks from PubMedQA:

Model Accuracy Score Avg Latency Relative Improvement
Base Phi-4-mini (4-bit) 26.0% 13 / 50 1.02s / question Baseline
Phi-4-mini Clinical MLX (Merged) 40.0% 20 / 50 0.93s / question +53.8% relative gain

Quickstart with Apple MLX

Install mlx-lm:

pip install mlx-lm

CLI Generation

python -m mlx_lm.generate \
  --model <repo_id> \
  --prompt "<|user|>\nWhat are the first-line therapeutic recommendations for heart failure with preserved ejection fraction (HFpEF)?<|end|>\n<|assistant|>\n" \
  --max-tokens 512

Python API

from mlx_lm import load, generate

model, tokenizer = load("<repo_id>")
prompt = "<|user|>\nSummarize the mechanism of action of SGLT2 inhibitors in diabetic kidney disease.<|end|>\n<|assistant|>\n"
response = generate(model, tokenizer, prompt=prompt, max_tokens=300)
print(response)

Local OpenAI-Compatible Server

python -m mlx_lm.server --model <repo_id> --port 8080

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

Benchmark Scope Tested Samples Accuracy Evaluation Hardware
PubMedQA Clinical Trial Evidence Decisions 100 49.0% Apple Silicon Metal GPU
MedQA (USMLE) Medical Board Diagnostic Cases 100 53.0% Apple Silicon Metal GPU

Configuration

Architecture
Phi3ForCausalLM
Context length (tokens)
131,072
Layers
32
Hidden size
3,072
Feed-forward size
8,192
Attention heads
24
Key/value heads
8
Vocabulary size
200,064
Sliding window (tokens)
262,144
RoPE base
10000
Stored precision
bfloat16
Model type
phi3

Identity and Version

Repository
charakaweb/phi4-clinical-mlx
Publisher
Web
Task
Text generation
Modality
Text
Library
mlx
Parameters
3.8B parameters
Languages
en
Revision
eb6d117ed7d947d5e64c960c073afc49dae15b85
First published
2026-10-05
Last updated
2026-10-06

Files and Weights

12 files, 2.2 GB in total. The weights are 1 file totalling 2.2 GB in safetensors.

Weights1 file · 2.2 GB
Configuration6 files · 107.5 KB
Tokenizer2 files · 15.5 MB
Documentation1 file · 3.0 KB
Other1 file · 423 B
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights2.2 GB 13887bee68fc
config.jsonConfiguration3.4 KB —
configuration_phi3.pyConfiguration10.9 KB —
generation_config.jsonConfiguration168 B —
model.safetensors.index.jsonConfiguration32.6 KB —
modeling_phi3.pyConfiguration54.3 KB —
sample_finetune.pyConfiguration6.2 KB —
README.mdDocumentation3.0 KB —
chat_template.jinjaOther423 B —
.gitattributesRepository1.6 KB —
tokenizer.jsonTokenizer15.5 MB 7ea8bdf68c3e
tokenizer_config.jsonTokenizer349 B —

License and Download

License
mit
Access
Open weights, no gate
Download size
2.2 GB
Download from Web

Released by Web through its official repository on Hugging Face. Read the license.

Built From

  • Derived from microsoft/Phi-4-mini-instruct
  • Quantized from microsoft/Phi-4-mini-instruct

Memory Requirements

PrecisionWeights in memory
As published2.2 GB
16-bit7.7 GB
8-bit3.8 GB
4-bit1.9 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About phi4-clinical-mlx

How much GPU memory does phi4-clinical-mlx need?

About 9.2 GB at 16-bit and 2.3 GB at 4-bit: the weights (3.8B parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run phi4-clinical-mlx on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use phi4-clinical-mlx commercially?

Yes. phi4-clinical-mlx is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

What is phi4-clinical-mlx's context length?

131,072 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Text generation

phi4-clinical

Web

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. 1. Stage 1 (STEM Foundation): 116,000 instruction pairs across NCERT Classes 6–12 (Physics, Chemistry, Biology) eliminating foundational science hallucinations. 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. Stage 3 (Comprehensive Internal Medicine): Balanced multi-specialty clinical curriculum (cardiology, nephrology, endocrinology, pulmonology) with an active oncology replay buffer.…

Open weights mit 3.8B parameters 131,072 tokens transformers

Model · Text generation

StandardOne-3B

Standard Thinking

Standard One scores a bounded set of answers for a supplied scenario and returns probabilities through POST /v1/systemone. It does not generate free-form response text. This repository contains the merged BF16 3B checkpoint; the server code is in StandardOne-8B. In the reported served evaluations, 3B has a lower median latency on the measured short-request profile; 8B scores higher on the public standard and hard tiers. See Benchmarks for the measurement conditions and limitations. The figure combines results from different measurement paths. See Benchmarks for served versus offline conditions; measured 24–26 September 2026. - Send a state and a bounded rubric to receive probabilities for…

Open weights apache-2.0 3.8B parameters 262,144 tokens transformers

Model · Text generation

StandardOne-3B-FP8

Standard Thinking

StandardOne-3B-FP8 is an FP8 (compressed-tensors, float8e4m3 weights, dynamic per-token activations) quantization of the released StandardOne-3B decision model. The language-model linear projections (q/k/v/o, gate/up/down) are quantized per-channel FP8 E4M3 with dynamic FP8 activations (llm-compressor's data-free FP8DYNAMIC recipe, no calibration data required); the vision tower, multi-modal projector, embeddings and lmhead are left unquantized in BF16. It was produced from source revision 68dafd17ead9b8cf6f85c4f08f7f2f3a1e7b9e5c of StandardOne-3B on 2026-09-25 using llm-compressor 0.14.0 (torch 2.14.0, transformers 5.17.0, compressed-tensors 0.19.0); results below. Served through SGLang…

Open weights apache-2.0 3.8B parameters 262,144 tokens transformers

Model · Text generation

NULLXES-SHINRA-4B-SMOKE

Maga

NULLXES SHINRA-4B-INSTRUCT is the Language Intelligence Layer of the NULLXES system. SHINRA is responsible for multilingual understanding, coding intelligence, instruction following, structured outputs, and agent preparation. This checkpoint is the instruction-tuned (and optionally DPO-aligned) 4B-class dense decoder. Proprietary ShinraForCausalLM (not a Llama / Mistral / Qwen / GPT-NeoX wrapper). RMSNorm → GQA+RoPE → residual → RMSNorm → SwiGLU → residual then final RMSNorm and tied LM head. Special tokens:. Generation stop is. Document stop is. Three stages. Pretrain → NULLXES SHINRA-4B-BASE SHINRAPRETRAINV1: 40% FineWeb-Edu, 20% code (python-edu + licensed Stack), 15% math/science…

Open weights other 3.9B parameters 32,768 tokens transformers

Model · Text generation

NULLXES-SHINRA-4B-INSTRUCT

Maga

Language Intelligence layer of the NULLXES Intelligence Stack. SHINRA Our llm. Release line 1. NULLXES SHINRA-4B-BASE — pretrain 2. NULLXES SHINRA-4B-INSTRUCT — instruction tuning ← this model 3. NULLXES SHINRA-4B-INSTRUCT (aligned) — DPO / preference optimization Parameter budget Architecture source: configs/shinra4b.yaml at 903a639e03bc. The total also matches the published safetensors metadata. Custom SentencePiece Unigram, trained in-house on a web + wiki + code mix. Special tokens trustremotecode=True is required: SHINRA ships a custom ShinraConfig and modeling code, not a reused architecture class. The HF inference widget cannot load custom code, hence inference: false. Data pipeline…

Open weights other 3.9B parameters 32,768 tokens transformers

Model · Text generation

Emendator

Aidan

Emendator is a byt5-xl model finetuned to correct OCR artifacts in Latin text. This model cannot provide completely faithful reconstruction for all orthographies - on a large scale, it will shift the distribution of tokens towards that which it has been trained on. This is to say: Emendator will take editorial liberties with your data. As such, use it only in circumstances when the primary concern is only to recover intelligible Latin, not to recover intelligible Latin of a particular style. The model is intended to be used on segments of 250 characters. Anything else will compromise performance. Original: "atque optimo viro, peterem; superavi tamen dignitate Catilinam, gratia Galbam. Quod…

Open weights cc-by-nc-4.0 3.7B parameters