PH

phi 3 22b 128k

PhiGGUF by mradermacherUpdated 2024-09-13
Download on Hugging Face
Parameters22B
Context128K
Layers64
Architecturephi3
Smallest quant8.1 GB
Quick answer

phi 3 22b 128k needs about 16.8 GB of memory at Q4_K_M (a 13.6 GB file) with an 8K context window, so it fits on a 24 GB GPU. This repository has 14 quants, from 8.1 GB (Q2_K) to 23.5 GB (Q8_0). Longer context needs more: at 32K tokens the KV cache alone adds about 10.7 GB.

Phi 3 22B 128K – 22B parameter LLM with 128k context

Phi 3 22B 128K is a 22B parameter language model with a trained context of 131072 tokens. It is released under the MIT license and available in multiple GGUF quantizations. The model supports a wide range of languages and tasks.

Good at

  • Large context handling
  • High token throughput
  • Versatile text generation

Limits

  • No vision support
  • Requires large VRAM for higher quants
  • No mixture of experts

Best for

  • Long‑form content creation
  • Complex reasoning tasks
  • Chatbot back‑ends

Who it’s for. Developers and researchers needing a large‑context LLM that can run on consumer hardware with appropriate quantization. The model is suitable for applications that require extensive context windows and can tolerate the trade‑off between precision and memory usage.

Quants & memory

QuantFileEst. memoryvs VRAMResultDownload
Q2_K8.1 GB 11.3 GB
Too big Get file →
IQ3_XS9.2 GB 12.4 GB
Too big Get file →
IQ3_S9.6 GB 12.8 GB
Too big Get file →
Q3_K_S9.6 GB 12.8 GB
Too big Get file →
IQ3_M10.2 GB 13.4 GB
Too big Get file →
Q3_K_M11.0 GB 14.1 GB
Too big Get file →
Q3_K_L11.9 GB 15.0 GB
Too big Get file →
IQ4_XS11.9 GB 15.1 GB
Too big Get file →
Q4_K_S12.6 GB 15.8 GB
Too big Get file →
Q4_K_M13.6 GB 16.8 GB
Too big Get file →
Q5_K_S15.2 GB 18.4 GB
Too big Get file →
Q5_K_M16.0 GB 19.2 GB
Too big Get file →
Q6_K18.2 GB 21.3 GB
Too big Get file →
Q8_023.5 GB 26.7 GB
Too big Get file →

For 8 GB VRAM, use Q2_K (file size 8.12 GB, estimated 11.3 GB memory). For 12 GB VRAM, Q3_K_S or IQ3_S (file size 9.58 GB, estimated 12.8 GB memory). For 16 GB VRAM, Q4_K_M (file size 13.57 GB, estimated 16.8 GB memory).

What GPU do you need for phi 3 22b 128k?

These figures add the file size, an fp16 KV cache at an 8K context window (worked out from this model’s own header) and about 0.5 GB for the runtime. They are estimates, so leave a little headroom, and expect to use less context or a smaller quant if you are right at the limit.

  • 4 GB VRAM: no quant fits at an 8K context.
  • 6 GB VRAM: no quant fits at an 8K context.
  • 8 GB VRAM: no quant fits at an 8K context.
  • 12 GB VRAM: the best quant that fits is Q2_K (8.1 GB file, about 11.3 GB in use).
  • 16 GB VRAM: the best quant that fits is Q4_K_S (12.6 GB file, about 15.8 GB in use).
  • 24 GB VRAM: the best quant that fits is Q6_K (18.2 GB file, about 21.3 GB in use).
  • 32 GB VRAM: the best quant that fits is Q8_0 (23.5 GB file, about 26.7 GB in use).

Which phi 3 22b 128k quant should you choose?

Q4_K_M is the usual starting point for phi 3 22b 128k: it balances file size and quality well. Here it is a 13.6 GB file.

The Q8_0 file is 23.5 GB, about 1.7 times the size of Q4_K_M. It keeps the weights closer to the original, which only matters if you have the memory to spare.

If memory is tight, the smallest file is Q2_K at 8.1 GB, with the quality trade-offs that come with fewer bits. Use it only when memory is very tight. Expect a clear drop in quality, which is usually worse on small models and easier to live with on large ones.

New to quant names? Read GGUF quantization explained.

Specifications

Architecture from the GGUF header

Architecturephi3
Parameters22B
Layers64
Trained context131,072 tokens
KV cache (fp16)320 KB per token

Source

Quantized bymradermacher
FamilyPhi
Licensemit
Downloads (HF)1,494
Last updated2024-09-13

Frequently asked questions about phi 3 22b 128k

How much VRAM does phi 3 22b 128k need?

About 16.8 GB at Q4_K_M with an 8K context window. That is the 13.6 GB file, plus the KV cache and roughly 0.5 GB of runtime overhead. Smaller quants need less and longer context needs more.

Can I run phi 3 22b 128k on an 8 GB GPU?

Not at an 8K context. The smallest file needs about 11.3 GB, so you would need a larger GPU or CPU offloading.

What is the file size of phi 3 22b 128k GGUF?

It depends on the quant: Q2_K is 8.1 GB, IQ3_XS is 9.2 GB, IQ3_S is 9.6 GB, Q3_K_S is 9.6 GB, IQ3_M is 10.2 GB, Q3_K_M is 11.0 GB and 8 more.

What context length does phi 3 22b 128k support?

The GGUF header lists a trained context length of 131,072 tokens (128K). The KV cache grows with the context you use: about 2.7 GB at 8K and 10.7 GB at 32K.

Where can I download phi 3 22b 128k GGUF?

The files are on Hugging Face in the mradermacher/phi-3-22b-128k-GGUF repository. The download buttons on this page open the file on Hugging Face. ggufmodels.com does not host any model files.

What license does phi 3 22b 128k use?

Hugging Face lists the license as mit. Licenses can differ between the quantized files and the original model, so check the repository and the base model before commercial use.

Can I run Phi 3 22B 128K on 8 GB VRAM?

Yes, using the Q2_K quantization which requires approximately 11.3 GB of VRAM at 8k context.

Does the model support vision tasks?

No, the model does not have vision capabilities.

What license applies to this model?

The model is released under the MIT license.

Similar models

Browse all →

More from mradermacher

All by mradermacher →

More Phi models

All Phi →

Other medium models

All medium models →