Zubnet AIAprenderWiki › GGUF
Infraestrutura

GGUF

GGML Unified Format
O formato de arquivo padrão para rodar modelos de linguagem quantizados localmente via llama.cpp, Ollama e outras ferramentas de inferência local. Arquivos GGUF contêm os pesos do modelo em formato quantizado (reduzindo precisão de 16-bit para 4-bit ou 8-bit), junto com metadados como vocabulário, detalhes de arquitetura e parâmetros de quantização — tudo necessário para carregar e rodar o modelo em um único arquivo.

Por que importa

GGUF é o formato que tornou a IA local prática. Antes dele, rodar modelos localmente exigia setups complexos com PyTorch, CUDA e memória GPU específica. GGUF empacota tudo em um arquivo que llama.cpp ou Ollama podem carregar diretamente — em CPU, Apple Silicon, GPUs gaming, em qualquer lugar. Se você vê um modelo no Hugging Face com nomes de arquivo como “Q4_K_M.gguf”, é um modelo pronto para uso local.

Deep Dive

GGUF succeeded GGML (the original format), adding a more extensible metadata system and support for new quantization types. A typical model release includes multiple GGUF variants at different quantization levels: Q2_K (smallest, lowest quality), Q4_K_M (popular sweet spot), Q5_K_M (better quality, larger), Q6_K, Q8_0 (near-original quality, largest). The naming convention tells you the bit-width and quantization method.

Quantization Variants

The "K" in Q4_K_M refers to k-quant methods that use different bit-widths for different layers based on their sensitivity — attention layers might get higher precision than feed-forward layers. The "M" means "medium" (between "S" for small/aggressive and "L" for large/conservative). Q4_K_M typically preserves 95%+ of the original model quality while reducing file size by 4x compared to FP16. For most users, Q4_K_M or Q5_K_M is the right choice.

The Ecosystem

GGUF has become the lingua franca of local AI. Community members quantize new models to GGUF within hours of release and upload them to Hugging Face. Ferramentas like llama.cpp, Ollama, LM Studio, GPT4All, and kobold.cpp all support GGUF natively. This ecosystem is why you can download a 70B model at 4-bit quantization (about 40 GB) and run it on a MacBook Pro with 64 GB RAM in under a minute from download to first response.

Conceitos relacionados

← Todos os termos
← Generative AI GNN →