alt.freeweights.phi / phi-4-GGUF
From: bartowski <huggingface.co/bartowski>Newsgroups: alt.freeweights.phiSubject:

phi-4-GGUF

Date: 2026-11-15Commit: 19cd65fSigned: 2DC28CC7B26A283B ✓

Text generation model. Gguf weights, 290 GB in all. Published by bartowski under MIT.

phi290GBphi-4-GGUFggufpermissive
FactsParamsnot statedSize290 GBFormatsggufTasktext generationLicenseMITFrom sourcepermissive
$ fw get bartowski/phi-4-GGUF
# manifest sha256 9caeb0a26eb9… · 290 GB · 30 files
$ fw verify ./phi-4-GGUF bartowski/phi-4-GGUF
From sourceHosted (signed)bartowski/phi-4-GGUFLast check: 2026-11-15 04:45 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Quantized of phi-4.

Works with

Convert with

Overview

Size
290 GB
Weights
4.49 GB (smallest of 26 GGUF variants)
Parameters
not stated
Formats
gguf
Task
text generation
License
MIT (permissive)
Files
30, each with a sha256
Publisher
bartowski
Added
2026-11-15
Section
alt.freeweights.phi
Lineage

Original release from the publisher.

Base model: microsoft/phi-4

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 04:45 UTCpassed

Model card

From the publisher at commit 19cd65f. Shown as plain text with links; images open at the publisher.

Llamacpp imatrix Quantizations of phi-4#

Using llama.cpp release b4456 for quantization.

Original model: https://huggingface.co/microsoft/phi-4

All quants made using imatrix option with dataset from here

Run them in LM Studio

Prompt format#

<|im_start|>system<|im_sep|>{system_prompt}<|im_end|><|im_start|>user<|im_sep|>{prompt}<|im_end|><|im_start|>assistant<|im_sep|>

What's new:#

Tokenizer fixes as recommended by the unsloth team

Download a file (not the whole branch) from below:#

FilenameQuant typeFile SizeSplitDescription
phi-4-f32.gguff3258.64GBtrueFull F32 weights.
phi-4-f16.gguff1629.32GBfalseFull F16 weights.
phi-4-Q8_0.ggufQ8_015.58GBfalseExtremely high quality, generally unneeded but max available quant.
phi-4-Q6_K_L.ggufQ6_K_L12.28GBfalseUses Q8_0 for embed and output weights. Very high quality, near perfect, recommended.
phi-4-Q6_K.ggufQ6_K12.03GBfalseVery high quality, near perfect, recommended.
phi-4-Q5_K_L.ggufQ5_K_L10.92GBfalseUses Q8_0 for embed and output weights. High quality, recommended.
phi-4-Q5_K_M.ggufQ5_K_M10.60GBfalseHigh quality, recommended.
phi-4-Q5_K_S.ggufQ5_K_S10.15GBfalseHigh quality, recommended.
phi-4-Q4_K_L.ggufQ4_K_L9.43GBfalseUses Q8_0 for embed and output weights. Good quality, recommended.
phi-4-Q4_1.ggufQ4_19.27GBfalseLegacy format, similar performance to Q4_K_S but with improved tokens/watt on Apple silicon.
phi-4-Q4_K_M.ggufQ4_K_M9.05GBfalseGood quality, default size for most use cases, recommended.
phi-4-Q4_K_S.ggufQ4_K_S8.44GBfalseSlightly lower quality with more space savings, recommended.
phi-4-Q4_0.ggufQ4_08.41GBfalseLegacy format, offers online repacking for ARM and AVX CPU inference.
phi-4-IQ4_NL.ggufIQ4_NL8.38GBfalseSimilar to IQ4_XS, but slightly larger. Offers online repacking for ARM CPU inference.
phi-4-Q3_K_XL.ggufQ3_K_XL8.38GBfalseUses Q8_0 for embed and output weights. Lower quality but usable, good for low RAM availability.
phi-4-IQ4_XS.ggufIQ4_XS7.94GBfalseDecent quality, smaller than Q4_K_S with similar performance, recommended.
phi-4-Q3_K_L.ggufQ3_K_L7.93GBfalseLower quality but usable, good for low RAM availability.
phi-4-Q3_K_M.ggufQ3_K_M7.36GBfalseLow quality.
phi-4-IQ3_M.ggufIQ3_M6.91GBfalseMedium-low quality, new method with decent performance comparable to Q3_K_M.
phi-4-Q3_K_S.ggufQ3_K_S6.50GBfalseLow quality, not recommended.
phi-4-IQ3_XS.ggufIQ3_XS6.25GBfalseLower quality, new method with decent performance, slightly better than Q3_K_S.
phi-4-Q2_K_L.ggufQ2_K_L6.05GBfalseUses Q8_0 for embed and output weights. Very low quality but surprisingly usable.
phi-4-Q2_K.ggufQ2_K5.55GBfalseVery low quality but surprisingly usable.
phi-4-IQ2_M.ggufIQ2_M5.11GBfalseRelatively low quality, uses SOTA techniques to be surprisingly usable.
phi-4-IQ2_S.ggufIQ2_S4.73GBfalseLow quality, uses SOTA techniques to be usable.
phi-4-IQ2_XS.ggufIQ2_XS4.49GBfalseLow quality, uses SOTA techniques to be usable.

Embed/output weights#

Some of these quants (Q3_K_XL, Q4_K_L etc) are the standard quantization method with the embeddings and output weights quantized to Q8_0 instead of what they would normally default to.

Downloading using huggingface-cli#

Click to view download instructions

First, make sure you have hugginface-cli installed:

pip install -U "huggingface_hub[cli]"

Then, you can target the specific file you want:

huggingface-cli download bartowski/phi-4-GGUF --include "phi-4-Q4_K_M.gguf" --local-dir ./

If the model is bigger than 50GB, it will have been split into multiple files. In order to download them all to a local folder, run:

huggingface-cli download bartowski/phi-4-GGUF --include "phi-4-Q8_0/*" --local-dir ./

You can either specify a new local-dir (phi-4-Q8_0) or download them all in place (./)

ARM/AVX information#

Previously, you would download Q4_0_4_4/4_8/8_8, and these would have their weights interleaved in memory in order to improve performance on ARM and AVX machines by loading up more data in one pass.

Now, however, there is something called "online repacking" for weights. details in this PR. If you use Q4_0 and your hardware would benefit from repacking weights, it will do it automatically on the fly.

As of llama.cpp build b4282 you will not be able to run the Q4_0_X_X files and will instead need to use Q4_0.

Additionally, if you want to get slightly better quality for , you can use IQ4_NL thanks to this PR which will also repack the weights for ARM, though only the 4_4 for now. The loading time may be slower but it will result in an overall speed incrase.

Click to view Q4_0_X_X information (deprecated

I'm keeping this section to show the potential theoretical uplift in performance from using the Q4_0 with online repacking.

Click to view benchmarks on an AVX2 system (EPYC7702)

modelsizeparamsbackendthreadstestt/s% (vs Q4_0)
qwen2 3B Q4_01.70 GiB3.09 BCPU64pp512204.03 ± 1.03100%
qwen2 3B Q4_01.70 GiB3.09 BCPU64pp1024282.92 ± 0.19100%
qwen2 3B Q4_01.70 GiB3.09 BCPU64pp2048259.49 ± 0.44100%
qwen2 3B Q4_01.70 GiB3.09 BCPU64tg12839.12 ± 0.27100%
qwen2 3B Q4_01.70 GiB3.09 BCPU64tg25639.31 ± 0.69100%
qwen2 3B Q4_01.70 GiB3.09 BCPU64tg51240.52 ± 0.03100%
qwen2 3B Q4_K_M1.79 GiB3.09 BCPU64pp512301.02 ± 1.74147%
qwen2 3B Q4_K_M1.79 GiB3.09 BCPU64pp1024287.23 ± 0.20101%
qwen2 3B Q4_K_M1.79 GiB3.09 BCPU64pp2048262.77 ± 1.81101%
qwen2 3B Q4_K_M1.79 GiB3.09 BCPU64tg12818.80 ± 0.9948%
qwen2 3B Q4_K_M1.79 GiB3.09 BCPU64tg25624.46 ± 3.0483%
qwen2 3B Q4_K_M1.79 GiB3.09 BCPU64tg51236.32 ± 3.5990%
qwen2 3B Q4_0_8_81.69 GiB3.09 BCPU64pp512271.71 ± 3.53133%
qwen2 3B Q4_0_8_81.69 GiB3.09 BCPU64pp1024279.86 ± 45.63100%
qwen2 3B Q4_0_8_81.69 GiB3.09 BCPU64pp2048320.77 ± 5.00124%
qwen2 3B Q4_0_8_81.69 GiB3.09 BCPU64tg12843.51 ± 0.05111%
qwen2 3B Q4_0_8_81.69 GiB3.09 BCPU64tg25643.35 ± 0.09110%
qwen2 3B Q4_0_8_81.69 GiB3.09 BCPU64tg51242.60 ± 0.31105%

Q4_0_8_8 offers a nice bump to prompt processing and a small bump to text generation

Which file should I choose?#

Click here for details

A great write up with charts showing various performances is provided by Artefact2 here

The first thing to figure out is how big a model you can run. To do this, you'll need to figure out how much RAM and/or VRAM you have.

If you want your model running as FAST as possible, you'll want to fit the whole thing on your GPU's VRAM. Aim for a quant with a file size 1-2GB smaller than your GPU's total VRAM.

If you want the absolute maximum quality, add both your system RAM and your GPU's VRAM together, then similarly grab a quant with a file size 1-2GB Smaller than that total.

Next, you'll need to decide if you want to use an 'I-quant' or a 'K-quant'.

If you don't want to think too much, grab one of the K-quants. These are in format 'QX_K_X', like Q5_K_M.

If you want to get more into the weeds, you can check out this extremely useful feature chart:

llama.cpp feature matrix

But basically, if you're aiming for below Q4, and you're running cuBLAS (Nvidia) or rocBLAS (AMD), you should look towards the I-quants. These are in format IQX_X, like IQ3_M. These are newer and offer better performance for their size.

These I-quants can also be used on CPU and Apple Metal, but will be slower than their K-quant equivalent, so speed vs performance is a tradeoff you'll have to decide.

The I-quants are not compatible with Vulcan, which is also AMD, so if you have an AMD card double check if you're using the rocBLAS build or the Vulcan build. At the time of writing this, LM Studio has a preview with ROCm support, and other inference engines have specific builds for ROCm.

Credits#

Thank you kalomaze and Dampf for assistance in creating the imatrix calibration dataset.

Thank you ZeroWw for the inspiration to experiment with embed/output.

Want to support my work? Visit my ko-fi page here: https://ko-fi.com/bartowski

Files

30 files · 290 GBWeights 4.49 GB (smallest of 26 GGUF variants). Sizes and sha256 from the signed manifest.
Show all 30 files with their sha256
FileSizesha256
.gitattributes3.06 KB332ad3620357f5f396922dc30c0906c224bd25f900de93a623655c59b64e8514
README.md13.1 KBa226c20970051b0366f92176bf640ce8f45d72201f8855ffaac9aee522db2a77
phi-4-IQ2_M.gguf5.11 GB1473b6d6e36b0e86c07db668d7d46a223c4f41fe5c08b7c578e5082fc044047d
phi-4-IQ2_S.gguf4.73 GB0706eff686aa012e372827fe5356f79a1c1256122953edc96b3bb7c42201c8e6
phi-4-IQ2_XS.gguf4.49 GBb6d2b06553e3eba1059b9ebbf38ea72d503f4ba27c2d64e96ea1fcbea7f7fe29
phi-4-IQ3_M.gguf6.91 GBd43cd45a2a0752a22fce64449c2a0032ed377c9d811305ae120c6b728ff0786d
phi-4-IQ3_XS.gguf6.25 GB714a7d8d8893444f1590e123da542f36293a6047f9233aeb50d4351545b26229
phi-4-IQ4_NL.gguf8.38 GBaeee5c2bc82b65865fe1c7f96afb6ca1b9de1e5d575c82cda613aa0b0b038f79
phi-4-IQ4_XS.gguf7.94 GB9dfc40682994853e5666d62cf949f73723faf76b80cfd8ea2108c32e170af404
phi-4-Q2_K.gguf5.55 GB84dcd928908d18f723cb9884ba7cd18791a3a0160c7d8bbb8cd6cbd1631394d4
phi-4-Q2_K_L.gguf6.05 GB9fbfe1a8f3323b609b934488b04460f0e396d3d7b9d53acb4cb4b38ced6d3eaa
phi-4-Q3_K_L.gguf7.93 GB71dc26236f31ed8a978041c22297a11cd2e4ed450dc5f28536b7f0b5ad3a8bb4
phi-4-Q3_K_M.gguf7.36 GB8bf3e36c72aec8107ed9942bc9f1c89f4b7786f17c795e305b5993426293d14f
phi-4-Q3_K_S.gguf6.50 GB2e2a31b748faa586d243c2e55ce7e35bcbcb68d0ec616e4c7747de77e72c1e11
phi-4-Q3_K_XL.gguf8.38 GB12012e64d92da2647f0bfb8d43c27c0b2ab95147dca763001dc2ad42c8e6e653
phi-4-Q4_0.gguf8.41 GB7c3e1b5bfb03bb4b13cf7ff4889676c5ad4ea92049352d8e1ded3f443f9b68c6
phi-4-Q4_1.gguf9.27 GB4a1e5c07a29ae5707e31536697696731eab56e3d797758f59ca9301a6aaf5044
phi-4-Q4_K_L.gguf9.43 GB184c7079893a4ad3c42bff175fb1570462696e94b8c30f1f6c1dc22e46103eb2
phi-4-Q4_K_M.gguf9.05 GB009aba717c09d4a35890c7d35eb59d54e1dba884c7c526e7197d9c13ab5911d9
phi-4-Q4_K_S.gguf8.44 GB17ee967737f161c78f30b8ce9218e9ada7a7ac54509a72c7baa2fc4f2c66dcc6
phi-4-Q5_K_L.gguf10.9 GBf5282bdab73d4763296bceca1ecaa123a1e63727530df697e1bf6b177383c7d8
phi-4-Q5_K_M.gguf10.6 GBb4b1ecedddfdd25a9c44c10a77bb118bcbb6a9004234286c7d4a4510c907f073
phi-4-Q5_K_S.gguf10.2 GBeb8dc62c49070a8ed1813dce69f09c161266a7f9ef0654dce9101a93e8a46455
phi-4-Q6_K.gguf12.0 GB537248da5492a9a34b1d811307c6b9226d9539a81653aa9bb0d7ec6104169320
phi-4-Q6_K_L.gguf12.3 GBe80468e5ada4904fe5b282424a8bd9863d5fcedea5ee5ebe2ea697d64027d272
phi-4-Q8_0.gguf15.6 GB68efc525888cc34fc2cb539c2f4409653d57994e35b3a5735d2a59b871871bf3
phi-4-f16.gguf29.3 GBf92820e6fec31c444795020c78e74b514f08455371bcf01977bc912c99bb4dba
phi-4-f32/phi-4-f32-00001-of-00002.gguf39.5 GBb9f9639a4cc14badb9cab426739e9af10b5eb74eda6a5fffce05a97f9d565377
phi-4-f32/phi-4-f32-00002-of-00002.gguf19.1 GBd8dab9ca46a9f1bc9ebfe44fdf38fd995022347da62226f63daac553f81b3cc3
phi-4.imatrix5.33 MB57fcf7e1beb22782d41003f1d0b6dcdd9698068de5f6902ca42f8b48421d5087
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
19cd65f97c pinned now2026-11-15 04:45 UTC30 files · 290 GB

Use it

$ fw get bartowski/phi-4-GGUF
# manifest sha256 9caeb0a26eb9… · 290 GB · 30 files
$ fw verify ./phi-4-GGUF bartowski/phi-4-GGUF
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/bartowski/phi-4-GGUF.json --dir ./phi-4-GGUF $ python3 fw.py verify ./phi-4-GGUF ./bartowski__phi-4-GGUF.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download bartowski/phi-4-GGUF --revision 19cd65f97c2f1712a81c506611d3f9c94b16a1e1 --local-dir ./phi-4-GGUF
llama.cppDownload one GGUF variant (phi-4-IQ2_XS, 4.49 GB), then serve it.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download bartowski/phi-4-GGUF --include "phi-4-IQ2_XS*" --local-dir ./phi-4-GGUF $ llama-server -m ./phi-4-GGUF/phi-4-IQ2_XS.gguf
OllamaMake an Ollama model from the downloaded file.
$ printf 'FROM ./phi-4-GGUF/phi-4-IQ2_XS.gguf\n' > Modelfile $ ollama create phi-4-gguf -f Modelfile

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
a226c20970051b0366f92176bf640ce8f45d72201f8855ffaac9aee522db2a77
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: bartowski <huggingface.co/bartowski>Newsgroups: alt.freeweights.phiSubject: phi-4-GGUFDate: 2026-11-15Commit: 19cd65fSigned: 2DC28CC7B26A283B ✓
Upstream
bartowski/phi-4-GGUF
Pinned commit
19cd65f97c2f1712a81c506611d3f9c94b16a1e1
Manifest
phi-4-GGUF.json · .minisig
Manifest sha256
9caeb0a26eb97836854106030ea17d4550099b465ae6d9bac41355430787f38f
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 04:45 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/bartowski/phi-4-GGUF.json $ curl -O https://freeweights.allternit.com/manifests/bartowski/phi-4-GGUF.json.minisig $ minisign -Vm phi-4-GGUF.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

microsoft/phi-4 · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download bartowski/phi-4-GGUF
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. phi-4-GGUF.json. Provenance. Takedown history: none.
From: BAAI <huggingface.co/BAAI>Subject: bunny-phi-2-siglip-lora
From: microsoft <huggingface.co/microsoft>Subject: MediPhi
From: microsoft <huggingface.co/microsoft>Subject: MediPhi-Clinical
From: microsoft <huggingface.co/microsoft>Subject: MediPhi-Guidelines
From: microsoft <huggingface.co/microsoft>Subject: MediPhi-Instruct
From: microsoft <huggingface.co/microsoft>Subject: MediPhi-MedCode