
Choosing AI model formats on Hugging Face lets you run compressed models on your computer at roughly a quarter of their original size. A format is the way an AI model is stored for an app to open and run. Below Bart shows how compression trades some answer quality for lower memory use. Discover how to match formats to your hardware, read compression labels and leave enough memory for your conversation.
Hugging Face Model Formats: How to Choose
TL;DR Key Takeaways :
- GGUF is a starting format for Windows or Linux, while MLX is often faster on Apple silicon Macs with M1 or newer chips.
- Four-bit quantization cuts model size by roughly 75% compared with FP16, although reduced precision can affect answer quality.
- Q4_K_M is a starting choice, while Q6 or Q8 are options if you have spare memory and want to test performance.
- Leave a few gigabytes free for conversation memory: an 8 GB model can leave about 4 GB on a computer with 12 GB available.
- Apps must support the downloaded format: free LM Studio supports both GGUF and MLX, with MLX available on Apple silicon Macs.
Companies such as Qwen, Google and DeepSeek typically upload full versions of their open models to Hugging Face, the main site for sharing models. Community members also publish versions converted for different computers and apps.
A file name can tell you how much the model has been compressed, which method was used and what format your app must support. Depending on your machine and setup, a mismatched version may fail to load, run slowly or use too much memory.
Choose a Format for Your Hardware
GGUF is a starting point for Windows or Linux computers, including machines with NVIDIA or AMD graphics cards, and it can also run without a graphics card. Made for the free llama.cpp engine, it can split a model between graphics memory and system memory, although a model split this way will run slightly slower. GGUF was the original format most people used at home.
For an Apple silicon Mac, start with an MLX version. Apple made MLX for Macs with M1 or newer chips, and it is often faster than GGUF on Apple silicon. MLX file names often use “4-bit” or “8-bit” rather than Q4 or Q8 to indicate their precision.
NVFP4 is NVIDIA’s four-bit format for newer hardware, including RTX 50 series cards and DGX Spark devices; NVIDIA makes the chips in most AI graphics cards. Newer NVIDIA chips can run NVFP4 directly, and a speed benefit is expected on those devices, though older NVIDIA cards get no such boost. It takes about as much memory as Q4, can appear in a GGUF file name and runs on Mac GPUs in newer llama.cpp builds.
Use Q Numbers to Pick a Size
An AI model contains billions of numbers called parameters. A full-precision version usually stores them using 16 bits each, known as FP16; a 27-billion-parameter model at that precision takes about 54 GB.
Quantization reduces the precision of those numbers to shrink the model. Moving from 16 bits to four bits cuts the model’s size by roughly 75%, though the reduction in precision can affect answer quality.
Start with Q4_K_M, then try Q6 or Q8 if you have memory to spare and want to see whether the model performs better. Q8 is about half the original size, Q6 is smaller, and Q4 is roughly a quarter of the original size. Q8 quality is nearly identical to the original, while widely used Q4 has a small quality drop that most people cannot really distinguish.
Q3 and Q2 take even less space, but answers may become noticeably worse; consider them if the model will not otherwise fit and you still want to try it.
Leave a few gigabytes free for the conversation rather than filling all available memory with the model, since leaving no room for conversation memory can slow the model and make it forget. For example, a computer with 16 GB of memory might have only 12 GB available for this work, making an 8 GB model a choice that leaves about 4 GB for the conversation.
Read the Letters After the Q Number
Letters in a file name describe the quantization recipe, which can retain more precision for important parameters while compressing others more. In Q4_K_M, K denotes that approach and M means medium; S, L and XL mean small, large and extra large. K is the method most people try to use today.
A Q4_K_L file is slightly bigger than Q4_K_M and keeps a few more numbers precise. Once you know which Q level fits, the M or L version is worth considering if you have enough memory.
Names beginning with IQ, such as IQ2 and IQ3, use another approach intended for models compressed to very small sizes, where IQ holds up better under extreme compression. On Macs, oMLX also uses names such as OQ4 and OQ25 for MLX versions, using a similar idea; a final E, as in OQ4E, indicates extra care was taken to retain precision in important numbers.
Unsloth uses UD in file names for its dynamic recipe, which decides how much to compress each layer. Unsloth is one of the most popular uploaders, while bartowski and mlx-community are also frequently seen. Anyone can publish model versions on Hugging Face, and some versions do not work well.
Match the File to an App
Your app must support the format you download: a GGUF engine cannot open an MLX model, and an MLX engine cannot open a GGUF model. LM Studio is a free starting app that searches Hugging Face, labels files according to whether they fit your machine and supports both formats; it also has a model catalog of its own.
LM Studio supports GGUF through llama.cpp on Mac, Windows and Linux, and MLX on Apple silicon Macs. The buttonless llama-server underlies LM Studio and Ollama and is usually first to support brand-new models and formats. LM Studio’s Mac version requires macOS 14 or later and does not support Intel-based Macs; on Windows, the maker recommends at least 16 GB of RAM and 4 GB of dedicated graphics memory.
Ollama runs models in the background and supports GGUF and MLX, using MLX by default on Macs where supported, while oMLX is designed for MLX models on a Mac and built to run them all day. One command starts an Ollama model and lets other AI apps connect automatically.
All four apps can serve models to coding editors and AI agents, allowing other apps to communicate with local models as they would with ChatGPT or Claude without data leaving the computer. For a Windows computer with an NVIDIA card, GGUF in LM Studio or Ollama is a starting point; GGUF in LM Studio is also an option for a supported Intel laptop or a machine with AMD graphics.
Recognize Other File Formats
Safetensors files are typically the large, full-precision versions from which other formats are made, and are mostly intended for servers. Most apps used to run models at home cannot open them, so check before downloading a file simply because it carries the model’s name.
GPTQ and AWQ are compressed formats aimed at graphics-card servers using vLLM to serve many people at once, while FP8 is an eight-bit format used mostly on servers. GGUF can do the same job at home and is simpler to use there than GPTQ or AWQ.
EXL2 and EXL3 are for ExLlama, which can be fast when the whole model fits on one NVIDIA card; ONNX and OpenVINO are designed to run across different chips, including those in Intel AI laptops.
Check Support for New Models
A newly released model may need an app or engine update before it will run. Bart notes that DeepSeek V4 Flash did not initially run in oMLX, but worked after an engine update.
If a new model still fails after you update the app, the underlying engine may need a later update too. Search and download require an internet connection, even though LM Studio can run a downloaded model locally without one. Before choosing a file, Bart recommends checking that you trust its uploader, since the downloaded model will run on your machine.
In our view, the format matters more than the Q number. The recommendation to start with Q4_K_M and consider Q6 or Q8 only with spare memory reflects that difference in priorities. A mismatched format means the model will not open in your app at all, while a slightly off Q number is usually a gentle tradeoff between size and sharpness.
A model chosen for your machine can serve more than a chat window, giving your coding tools and AI assistants a shared local foundation. If you want to run AI on your own computer, matching Hugging Face model formats to your hardware and app is an approach well worth trying.
Discover other guides from our vast content that could be of interest on running local AI models.
- Build a personal AI assistant running on your laptop with LM Studio
- KoboldCpp vs Ollama: Which Tool is Better for Running Local AI Models?
- What is Hugging Face and why does it matter?
- How to Run OpenAI GPT-OSS AI Locally with Hugging Face Transformers
- Skip Subscriptions, Set up Fast Local AI for Coding, Study, and Brainstorming
Media Credit: Bart Explains Local AI
Disclosure: Some of our articles include affiliate links. If you buy something through one of these links, Geeky Gadgets may earn an affiliate commission. Learn about our Disclosure Policy.