What is Hugging Face Transformers, and why does every tool use it?

By Christophe Paka · Facts checked on 7 November 2026

You read about Unsloth for training, vLLM for serving and llama.cpp inside your chat app. A beginner on r/LocalLLM summed it up: "I'm not clear on which tool is meant for what."

If each tool needed its own version of a model, you would learn every tool from scratch and fetch every model again for each one.

The answer to what is Hugging Face Transformers clears this up. Transformers is a Python library that holds one shared definition for each model. If you only chat in Ollama or LM Studio, you never touch it. The figure below shows how training tools, inference engines and small machine apps all reuse it.

The Hub's Transformers checkpoints feed one shared model definition in Transformers, which training frameworks Axolotl, Unsloth and DeepSpeed, inference engines vLLM, TGI and SGLang, and the runtimes llama.cpp and mlx all reuse.
Figure 2.3 Training tools, inference engines and small machine apps all reuse one shared definition, so a model published once runs in many places.
Use this diagram on your site

Free to share in your blog post, docs, course or slides, as long as the credit link stays. Paste the code below where the figure should go.

How to read this figure

  1. Start at the Hub on top. The Hub holds the checkpoints: saved copies of a model's weights, the numbers it learned in training. The figure counts more than a million Transformers checkpoints there. Each one is a repo you load by its name.

  2. Find the shared definition in the middle. A model definition is the exact recipe for how a model is built. Transformers holds these recipes, and most of the open world reuses them instead of writing its own. So the tools around it read the same checkpoint with no translation.

  3. Follow the arrows left to training. The tools on the left are for fine tuning: teaching a ready model your own examples. You meet them only if you train. Unsloth squeezes memory and speed out of one graphics card, and Axolotl sets up a whole training run from one settings file. DeepSpeed is a third training tool. All start from the same definition and Hub checkpoint.

  4. Then right to the inference engines. Inference means running a trained model to get answers, and an inference engine is the program that does that math. vLLM, TGI and SGLang are engines built as servers: programs that answer many users at once over a network, one model for all. A single person on a laptop does not need them.

  5. End at the adjacent runtimes. llama.cpp and mlx sit below, adjacent: beside Transformers, not built on it. They run their own file formats, so the checkpoint is converted for them first, as a GGUF file for llama.cpp. llama.cpp is the engine inside Ollama and LM Studio. MLX is Apple's engine for Apple Silicon Macs. The caption sums up the trip.

Key takeaways

  • Skip Transformers until you want to build; chat apps need no Python.
  • Name the three parts of your own setup: the model file, the inference engine and the runner app.
  • Pick a model by its Hub checkpoint, then choose the tool for the job: train, serve or chat.

Worked example: one run, three parts

Running any model takes three parts. Think of a concert, with one real example of each.

  1. The model file is the sheet music. It holds the learned numbers and does nothing on its own.
  2. The inference engine is the pianist. llama.cpp, or Transformers itself in your Python code, reads the numbers and computes each word of the answer.
  3. The runner app is the concert hall. Ollama or LM Studio is the window and the commands around the engine.
  4. Type ollama run hf.co/user/repo. The app fetches the file from the Hub, then hands it to the engine, which writes the reply.

Result: Every name in the figure fills one of these three parts. You need none of them to start, because llama.cpp already sits inside your chat app. See the two rails from one Hub for the full picture.

Questions readers ask

Do I need Transformers to use Hugging Face models?

Not to chat. Ollama and LM Studio run a GGUF file with llama.cpp inside and need no Python. You need Transformers when you build a model into your own Python code: it loads and runs thousands of model types with the same few lines.

What is the difference between Ollama and llama.cpp?

llama.cpp is the engine: the free program that does the math of a model on an ordinary computer, even without a graphics card. Ollama is a runner app built around it, with the commands that fetch a model and start a chat.

What are vLLM, TGI and SGLang for?

They are inference engines built as servers, for one model and many users at once. You meet them when a model must answer many people, not one person on a laptop. They reuse the same model definitions and the same Hub checkpoints as the rest.

Sources: Transformers documentation (Hugging Face); Hugging Face docs index.

This figure is from Hugging Face Made Crystal Clear, chapter 2.

The chapter builds the idea step by step, with recipes you can follow, a Try it to check yourself, and every source.

Get the book

All diagrams