¿Qué es el formato de archivo GGUF?
Un archivo .gguf es un archivo de formato universal GGML, el contenedor binario utilizado por llama.cpp para almacenar un modelo de lenguaje grande. Georgi Gerganov y la comunidad de ggml lo introdujeron en agosto de 2023 como el sucesor de los formatos más antiguos GGML, GGMF y GGJT. Un solo archivo .gguf contiene los pesos del modelo, el tokenizador y cada hiperparámetro como metadatos de clave-valor tipados, por lo que no se necesitan archivos de configuración separados para cargar y ejecutar el modelo.
El formato está diseñado para ser autónomo, extensible y mapeable en memoria. Debido a que los metadatos se almacenan como pares clave-valor con espacios de nombres en lugar de una lista fija, se pueden agregar nuevos campos sin romper los lectores más antiguos. Los pesos suelen estar cuantizados, desde 2 bits hasta 8 bits e incluyendo K-quants como Q4_K_M, lo que permite que modelos de tamaño considerable se ejecuten en CPU y GPU de consumo. Cada archivo comienza con la cadena mágica de cuatro bytes GGUF, seguida de un número de versión; la versión actual es la 3.
Seguridad y protección
RIESGO: LOWGGUF is a data container for model weights and metadata, not an executable, so opening one does not run code by itself. The main practical risks are large file sizes and downloading models from untrusted sources; a malformed file could in theory exploit a bug in the loader, so use up-to-date inference tools and reputable model repositories.
Detalles del formato
en pocas palabras- Genome Graphical User Format - Rarely, .gguf has been used ad hoc by hobby projects for GUI layout data, unrelated to the machine-learning format described here.
Programas que abren archivos GGUF
.gguf models through a desktop GUI, with per-model quantization choices. .gguf file via a Modelfile and serve it for chat or API use with one command. .gguf model with llama-cli or llama-server, the reference implementation of the format. .gguf model to the local model folder and chat with it offline. .gguf model for text generation and roleplay with a self-contained executable. .gguf models with Apple Silicon acceleration through a desktop GUI. .gguf model via a Modelfile using Metal acceleration on Apple hardware. .gguf models with llama-cli, built with Metal support for Apple Silicon. .gguf models with CUDA, ROCm or CPU backends via llama-cli and llama-server. .gguf file with a Modelfile and serve it over the Ollama API. .gguf models through the llama.cpp loader in a browser-based interface. .gguf file's metadata, tensor list and quantization in the browser without downloading it. Detalles técnicos
especificación profunda| Encoding | Binary |
| Byte order | Little-endian by default; big-endian supported since version 3 |
| Container | Single-file container holding header, metadata key-value block, tensor info block and raw tensor data |
| Compression | None as a container; weights are stored using GGUF quantization schemes (Q2 through Q8, K-quants such as Q4_K_M, IQ variants, plus F16/BF16/F32) |
| Typical size | Roughly 0.5 GB to over 100 GB depending on parameter count and quantization level |
| Structure | Header (magic, version, tensor count, metadata count) then namespaced key-value metadata, then per-tensor info (name, dimensions, type, offset), then aligned raw tensor data. Default alignment is 32 bytes and must be a multiple of 8. |
| Integrity | No built-in checksum; the metadata block is self-describing and validated at load time |
| Platforms | Windows, macOS, Linux |
| Notes | A GGUF file is self-contained: it bundles the model weights, tokenizer and all hyperparameters as typed metadata, so no separate config files are needed. Metadata keys use lower_snake_case with period-separated namespaces and keys can be up to 65,535 bytes. Over 40 quantization types are supported. Large models can be sharded across multiple .gguf files with llama-gguf-split. |
| Lanzado | August 2023 |
| Última versión | Version 3 |
| Estándar abierto | Sí · libre de regalías |
| Especificación | github.com |
Conversiones de GGUF
Preguntas y respuestas de la comunidad
preguntado por usuariosAún no hay preguntas; sea el primero en preguntar sobre los archivos GGUF.
Preguntas frecuentes
¿Cómo abro un archivo GGUF?
llama.cpp. Estas herramientas leen el archivo .gguf y le permiten chatear con el modelo. Hacer doble clic en el archivo no servirá de nada por sí solo.¿Qué programa crea archivos GGUF?
llama.cpp, principalmente convert_hf_to_gguf.py, que convierte un modelo de Hugging Face en un .gguf, seguido opcionalmente por llama-quantize para reducirlo a una cuantización más pequeña como Q4_K_M.¿Qué significa el Q4_K_M en un nombre de archivo GGUF?
¿Puedo convertir un archivo GGUF de nuevo al modelo original?
.safetensors o pesos de PyTorch con scripts de la comunidad, pero debido a que la mayoría de los archivos GGUF están cuantizados, la conversión es «lossy» y no restaura los pesos originales exactos.¿Por qué mi archivo GGUF es tan grande?
.gguf contiene cada peso del modelo en un solo archivo. El tamaño del archivo escala con el número de parámetros y el nivel de cuantización, por lo que un modelo grande con una precisión mayor puede superar fácilmente las decenas de gigabytes.