Zubnet AIApprendreWiki › llama.cpp
Outils

llama.cpp

Une librairie open-source C/C++ pour faire tourner l'inférence LLM sur du hardware consommateur, créée par Georgi Gerganov. llama.cpp effectue de l'inférence quantizée sans avoir besoin de CUDA, PyTorch ou Python — elle tourne sur CPU, Apple Silicon et GPU grand public. Ça a été le premier outil à rendre le fait de faire tourner de grands modèles de langage localement accessible aux développeurs normaux et aux enthousiastes.

Pourquoi c'est important

llama.cpp a démarré la révolution de l'IA locale. Avant elle, faire tourner un modèle de langage demandait des GPU NVIDIA coûteux et des setups Python complexes. llama.cpp a montré que les modèles quantizés pouvaient tourner sur un MacBook ou même un Raspberry Pi avec une qualité acceptable. Elle a fait naître un écosystème entier (Ollama, LM Studio, kobold.cpp) et a rendu le « self-hosted AI » une vraie option.

Deep Dive

Gerganov released llama.cpp in March 2023, days after Meta released LLaMA. The initial version could run LLaMA-7B on a MacBook using 4-bit quantization — something previously considered impractical. The project grew rapidly, adding support for dozens of architectures (Mistral, Qwen, Phi, Gemma, Command-R), multiple quantization methods (GGML, then GGUF), and hardware acceleration for Metal (Apple), Vulkan (cross-platform GPU), and CUDA (NVIDIA).

Why C++ Matters

The choice of C/C++ was deliberate: no Python runtime, no PyTorch dependency, minimal system requirements. This enables deployment on embedded systems, mobile devices, and servers without GPU infrastructure. The binary is self-contained — download the executable, download a GGUF model file, and you're running. This simplicity is what enabled the local AI ecosystem to grow so quickly.

Server Mode

llama.cpp includes a server mode that exposes an OpenAI-compatible API, making it a drop-in replacement for cloud APIs in development. Many developers use llama.cpp server locally for development and testing, switching to cloud APIs only for production. This keeps development costs near zero and avoids sending sensitive data to external services during development.

Concepts liés

← Tous les termes
← Liquid AI Logits →