LL

Llama 2

LlamaGGUF by dineshjainUpdated 2024-06-14
Download on Hugging Face
Parameters6.74B
Context2K
Layers26
Architecturellama
Smallest quant2.4 GB
Quick answer

Llama 2 needs about 5.6 GB of memory at Q5_0 (a 2.4 GB file) with an 8K context window, so it fits on a 6 GB GPU. This repository has 2 quants, from 2.4 GB (Q5_0) to 7.2 GB (Q8_0).

Llama 2 is a 6.74B-parameter Llama model in GGUF format, quantized by dineshjain. Its trained context length is 2K tokens. The repository has 2 quant files, from 2.4 GB (Q5_0) to 7.2 GB (Q8_0).

Quants & memory

QuantFileEst. memoryvs VRAMResultDownload
Q5_02.4 GB 3.6 GB
Fits Get file →
Q8_07.2 GB 8.3 GB
Too big Get file →

What GPU do you need for Llama 2?

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: the best quant that fits is Q5_0 (2.4 GB file, about 5.6 GB in use).
  • 8 GB VRAM: the best quant that fits is Q5_0 (2.4 GB file, about 5.6 GB in use).
  • 12 GB VRAM: the best quant that fits is Q8_0 (7.2 GB file, about 10.4 GB in use).

Which Llama 2 quant should you choose?

Q5_0 (2.4 GB) is the middle option in this repository. Closer to the original model than 4-bit, for a moderate increase in size. A good pick when you have memory to spare.

New to quant names? Read GGUF quantization explained.

Specifications

Architecture from the GGUF header

Architecturellama
Parameters6.74B
Layers26
Trained context2,048 tokens
KV cache (fp16)325 KB per token

Source

Quantized bydineshjain
FamilyLlama
Licenseapache-2.0
Downloads (HF)6
Last updated2024-06-14

Frequently asked questions about Llama 2

How much VRAM does Llama 2 need?

About 5.6 GB at Q5_0 with an 8K context window. That is the 2.4 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 Llama 2 on an 8 GB GPU?

Yes, with Q5_0: the 2.4 GB file needs about 5.6 GB at 8K context. Larger quants in this repository do not fit in 8 GB.

What is the file size of Llama 2 GGUF?

It depends on the quant: Q5_0 is 2.4 GB, Q8_0 is 7.2 GB.

What context length does Llama 2 support?

The GGUF header lists a trained context length of 2,048 tokens (2K). The KV cache grows with the context you use: about 2.7 GB at 8K and 0.7 GB at 2K.

Where can I download Llama 2 GGUF?

The files are on Hugging Face in the dineshjain/Llama-2-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 Llama 2 use?

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

Similar models

Browse all →

More from dineshjain

All by dineshjain →

More Llama models

All Llama →

Other small models

All small models →