This content is still in French
The page itself is translated, but its detailed content is not yet. Hardware sheets, guides and catalogues are still shown in French: we would rather give you the original than a rough machine translation. View the French site
Compiler llama.cpp pour tirer le maximum du processeur
Étape 3 sur 7
Compiler
shell
git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
# Compilation CPU optimisée pour la machine locale
cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=ON
cmake --build build --config Release -j$(nproc)
ls build/bin/
Comptez cinq minutes sur un mini-PC, une vingtaine sur un Raspberry Pi. Vous obtenez notamment llama-cli, llama-server et llama-bench.
Avec un GPU NVIDIA (Jetson compris), ajoutez le support CUDA :
shell
cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON
cmake --build build --config Release -j$(nproc)
GGML_NATIVECette option produit un binaire taillé pour ce processeur. Il peut refuser de démarrer sur une autre machine. Si vous préparez une image à dupliquer sur un parc hétérogène, compilez sans cette option.