CoolFace
Modelpublic

DhruvalLabs/Phi-3-mini-4k-instruct-GGUF

sourceHugging Facemitupdated 3mo agoView on Hugging Face
0likes98downloads
Model Card

<div align="center">

Phi-3-mini-4k-instruct — GGUF Quantizations

![Model on HF](https://huggingface.co/Dhptl/Phi-3-mini-4k-instruct-GGUF) ![Original Model](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) ![quant-kit](https://github.com/DhruvalPtl/quant-kit)

Quantized GGUF versions of [microsoft/Phi-3-mini-4k-instruct](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct)

Works with [llama.cpp](https://github.com/ggerganov/llama.cpp) · [Ollama](https://ollama.ai) · [LM Studio](https://lmstudio.ai) · [Open WebUI](https://openwebui.com) · [Jan](https://jan.ai)

Quantized by [Dhptl](https://huggingface.co/Dhptl) on June 18, 2026 using [quant-kit](https://github.com/DhruvalPtl/quant-kit)

</div>


⚖️ The Pareto Frontier — Efficiency vs Intelligence

Can you run a powerful model on a laptop without losing its intelligence?

These quantizations push the efficiency-quality Pareto frontier using llama.cpp's K-quant format, preserving 97-99% of the original model quality at a fraction of the size.

BenchmarkOriginal (FP16)Q4_K_MQuality Retained
MMLU ProSee [original card](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct)Run benchmarks~97-99%
HellaSwagSee [original card](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct)Run benchmarks~97-99%
ARC ChallengeSee [original card](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct)Run benchmarks~97-99%
TruthfulQASee [original card](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct)Run benchmarks~97-99%
GSM8KSee [original card](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct)Run benchmarks~97-99%

📦 Available Files

FilenameSizeRAM RequiredQuantQualityBest For
Phi-3-mini-4k-instruct-Q2_K.gguf1.40 GB~2.9 GBQ2_K⭐Extreme compression, significant quality loss.
Phi-3-mini-4k-instruct-Q3_K_L.gguf2.05 GB~3.5 GBQ3_K_L⭐⭐⭐Slightly better than Q3KM, still a compromise.
Phi-3-mini-4k-instruct-Q3_K_M.gguf1.83 GB~3.3 GBQ3_K_M⭐⭐⭐Very small file. Quality drop noticeable.
Phi-3-mini-4k-instruct-Q3_K_S.gguf1.57 GB~3.1 GBQ3_K_S⭐⭐Very high compression, high quality loss.
Phi-3-mini-4k-instruct-Q4_K_M.gguf2.23 GB~3.7 GBQ4_K_M ✅ Recommended⭐⭐⭐⭐Best balance of size and quality. Recommended for most users.
Phi-3-mini-4k-instruct-Q4_K_S.gguf2.05 GB~3.6 GBQ4_K_S⭐⭐⭐½Good speed/size balance, slight quality loss.
Phi-3-mini-4k-instruct-Q5_K_M.gguf2.57 GB~4.1 GBQ5_K_M⭐⭐⭐⭐½Better quality than Q4, slightly larger. Great if you have the RAM.
Phi-3-mini-4k-instruct-Q5_K_S.gguf2.46 GB~4.0 GBQ5_K_S⭐⭐⭐⭐Large but accurate.
Phi-3-mini-4k-instruct-Q6_K.gguf2.92 GB~4.4 GBQ6_K⭐⭐⭐⭐⭐Near-perfect quality, very large.
Phi-3-mini-4k-instruct-Q8_0.gguf3.78 GB~5.3 GBQ8_0⭐⭐⭐⭐⭐Closest to original quality. Use when RAM is not a concern.

💡 Which file should I download?

  • —Most users: Phi-3-mini-4k-instruct-Q4_K_M.gguf — best balance of size and quality
  • —High RAM (32GB+): Phi-3-mini-4k-instruct-Q8_0.gguf — near-original quality
  • —Low RAM (8GB): Phi-3-mini-4k-instruct-Q3_K_M.gguf — fits in 8GB with room to spare

⚡ Speed Benchmarks

Run `python benchmark.py --model Phi-3-mini-4k-instruct` to generate speed results.


🧠 Quality Benchmarks

Run `kaggle_bench.ipynb` on Kaggle to benchmark this model.


🚀 How to Use

Ollama

bash
ollama run dhptl/phi-3-mini-4k-instruct

LM Studio / Jan / Open WebUI

Search for Dhptl/Phi-3-mini-4k-instruct in the model browser.

llama.cpp CLI

bash
# Download the binary from https://github.com/ggerganov/llama.cpp/releases
./llama-cli \
  -m Phi-3-mini-4k-instruct-Q4_K_M.gguf \
  -p "You are a helpful assistant." \
  --conversation \
  -n 512

Python — llama-cpp-python

python
from llama_cpp import Llama

llm = Llama(
    model_path="./Phi-3-mini-4k-instruct-Q4_K_M.gguf",
    n_gpu_layers=-1,   # -1 = offload everything to GPU
    n_ctx=4096,
)

response = llm.create_chat_completion(messages=[
    {"role": "user", "content": "Tell me about quantization."}
])
print(response["choices"][0]["message"]["content"])

🔍 About GGUF Quantization

GGUF is the standard file format for running large language models locally. Quantization reduces the number of bits per weight:

FormatBits/weightSize vs FP16Quality
Q2_K~2.616%⭐
Q3KM~3.321%⭐⭐⭐
Q4KM~4.528%⭐⭐⭐⭐ ← sweet spot
Q5KM~5.635%⭐⭐⭐⭐½
Q8_0~8.553%⭐⭐⭐⭐⭐

💬 Community & Feedback

Found an issue? Have a question? Open a Discussion in the Community tab above.

If these quantizations were useful, please consider:

  • —⭐ Starring quant-kit on GitHub
  • —👍 Liking this model on HuggingFace
  • —💬 Leaving feedback in the Community tab