« Ik llama.cpp » : différence entre les versions
Autres actions
| (29 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 31 : | Ligne 31 : | ||
Installer les dépendances nécessaires : | Installer les dépendances nécessaires : | ||
# apt update && apt upgrade | # apt update && apt upgrade | ||
# apt install build-essential git libcurl4-openssl-dev curl libgomp1 cmake | # apt install build-essential git libcurl4-openssl-dev curl libgomp1 cmake ccache | ||
=== Récupération du projet === | === Récupération du projet === | ||
# cd /opt | # cd /opt | ||
| Ligne 96 : | Ligne 97 : | ||
==== Compilation avec support CUDA ==== | ==== Compilation avec support CUDA ==== | ||
Quelques dépendances : | |||
# apt install libnccl2 libnccl-dev | |||
Connaître les versions de nvcc installées : | Connaître les versions de nvcc installées : | ||
# find /usr /opt -name nvcc 2>/dev/null | # find /usr /opt -name nvcc 2>/dev/null | ||
| Ligne 102 : | Ligne 105 : | ||
# cd /opt/ik_llama.cpp | # cd /opt/ik_llama.cpp | ||
# export CUDACXX=/usr/local/cuda-<font color=blue>13.3</font>/bin/nvcc | # export CUDACXX=/usr/local/cuda-<font color=blue>13.3</font>/bin/nvcc | ||
# cmake -B build -DGGML_NATIVE=ON -DGGML_CUDA=ON -DGGML_CUDA_FA_ALL_QUANTS=ON | # cmake -B build -DGGML_NATIVE=ON -DGGML_CUDA=ON -DGGML_CUDA_FA_ALL_QUANTS=ON -DCMAKE_BUILD_TYPE=Release <font color=green>-DLLAMA_OPENSSL=ON</font> -DGGML_LTO=ON | ||
# cmake --build build --config Release -j$(nproc) | # cmake --build build --config Release -j$(nproc) | ||
|} | |} | ||
| Ligne 150 : | Ligne 153 : | ||
# export CUDACXX=/usr/local/cuda-13.3/bin/nvcc | # export CUDACXX=/usr/local/cuda-13.3/bin/nvcc | ||
# cmake -B build -DGGML_NATIVE=ON -DGGML_CUDA=ON -DGGML_CUDA_FA_ALL_QUANTS=ON | # cmake -B build -DGGML_NATIVE=ON -DGGML_CUDA=ON -DGGML_CUDA_FA_ALL_QUANTS=ON -DCMAKE_BUILD_TYPE=Release <font color=green>-DLLAMA_OPENSSL=ON</font> -DGGML_LTO=ON | ||
# cmake --build build --config Release -j$(nproc) | # cmake --build build --config Release -j$(nproc) | ||
| Ligne 312 : | Ligne 315 : | ||
* 2x 3060 12gb | * 2x 3060 12gb | ||
==== Q5_K_XL context max (262144) ==== | ==== Q5_K_XL context max (262144) ==== | ||
{{Méta bandeau | |||
| niveau = information | |||
| icône = important | |||
| texte = | |||
Test effectué sans les optimisations <code>-DGGML_CUDA_FA_ALL_QUANTS=ON</code> et <code>-DCMAKE_BUILD_TYPE=Release</code> | |||
}} | |||
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-35B-A3B-GGUF/UD-Q5_K_XL/Qwen3.6-35B-A3B-UD-Q5_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -gr --n-cpu-moe 28 --defer-experts -t 6 -tb 6 -b 4096 -ub 4096 -c 262144 --cache-ram 2048 --no-mmap -ctk q8_0 -ctv q8_0 --k-cache-hadamard --v-cache-hadamard -n 8 -nrep 1 | # /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-35B-A3B-GGUF/UD-Q5_K_XL/Qwen3.6-35B-A3B-UD-Q5_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -gr --n-cpu-moe 28 --defer-experts -t 6 -tb 6 -b 4096 -ub 4096 -c 262144 --cache-ram 2048 --no-mmap -ctk q8_0 -ctv q8_0 --k-cache-hadamard --v-cache-hadamard -n 8 -nrep 1 | ||
| Ligne 323 : | Ligne 332 : | ||
==== Q6_K_XL context max (262144) ==== | ==== Q6_K_XL context max (262144) ==== | ||
{{Méta bandeau | |||
| niveau = information | |||
| icône = important | |||
| texte = | |||
Test effectué sans les optimisations <code>-DGGML_CUDA_FA_ALL_QUANTS=ON</code> et <code>-DCMAKE_BUILD_TYPE=Release</code> | |||
}} | |||
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-35B-A3B-GGUF/UD-Q6_K_XL/Qwen3.6-35B-A3B-UD-Q6_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -gr --n-cpu-moe 30 --defer-experts -t 6 -tb 6 -b 4096 -ub 4096 -c 262144 --cache-ram 2048 --no-mmap -ctk q8_0 -ctv q8_0 --k-cache-hadamard --v-cache-hadamard -n 8 -nrep 1 | # /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-35B-A3B-GGUF/UD-Q6_K_XL/Qwen3.6-35B-A3B-UD-Q6_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -gr --n-cpu-moe 30 --defer-experts -t 6 -tb 6 -b 4096 -ub 4096 -c 262144 --cache-ram 2048 --no-mmap -ctk q8_0 -ctv q8_0 --k-cache-hadamard --v-cache-hadamard -n 8 -nrep 1 | ||
| Ligne 332 : | Ligne 347 : | ||
~ggml_backend_cuda_context: have 490 graphs | ~ggml_backend_cuda_context: have 490 graphs | ||
~ggml_backend_cuda_context: have 631 graphs | ~ggml_backend_cuda_context: have 631 graphs | ||
==== Q6_K_XL context long (131072) ==== | ==== Q6_K_XL context long (131072) ==== | ||
{{Méta bandeau | |||
| niveau = information | |||
| icône = important | |||
| texte = | |||
Test effectué sans les optimisations <code>-DGGML_CUDA_FA_ALL_QUANTS=ON</code> et <code>-DCMAKE_BUILD_TYPE=Release</code> | |||
}} | |||
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-35B-A3B-GGUF/UD-Q6_K_XL/Qwen3.6-35B-A3B-UD-Q6_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -gr --n-cpu-moe 26 --defer-experts -t 6 -tb 6 -b 4096 -ub 4096 -c 131072 --cache-ram 2048 --no-mmap -ctk q8_0 -ctv q8_0 --k-cache-hadamard --v-cache-hadamard -n 8 -nrep 1 | # /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-35B-A3B-GGUF/UD-Q6_K_XL/Qwen3.6-35B-A3B-UD-Q6_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -gr --n-cpu-moe 26 --defer-experts -t 6 -tb 6 -b 4096 -ub 4096 -c 131072 --cache-ram 2048 --no-mmap -ctk q8_0 -ctv q8_0 --k-cache-hadamard --v-cache-hadamard -n 8 -nrep 1 | ||
| Ligne 342 : | Ligne 364 : | ||
~ggml_backend_cuda_context: have 463 graphs | ~ggml_backend_cuda_context: have 463 graphs | ||
~ggml_backend_cuda_context: have 628 graphs | ~ggml_backend_cuda_context: have 628 graphs | ||
=== unsloth/Qwen3.6-27B-GGUF === | === unsloth/Qwen3.6-27B-GGUF === | ||
* i5 9600k | * i5 9600k | ||
* 32gb RAM | * 32gb RAM | ||
* 2x 3060 12gb | * 2x 3060 12gb | ||
==== Q4_K_S context long (131072) ==== | ==== Bonus Qwen 3.6 : Avec chat_template.jinja corrigé ==== | ||
[https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates Source] | |||
# mkdir -p /opt/models/Qwen-Fixed-Chat-Templates | |||
# hf download froggeric/Qwen-Fixed-Chat-Templates --local-dir /opt/models/Qwen-Fixed-Chat-Templates | |||
Rajouter dans le service : | |||
<font color = grey>... | |||
--jinja \</font> | |||
--chat-template-file /opt/models/Qwen-Fixed-Chat-Templates/chat_template.jinja \ | |||
<font color = grey>...</font> | |||
==== Q4_K_S context long (131072) (24 Go de VRAM)==== | |||
{{Méta bandeau | |||
| niveau = information | |||
| icône = important | |||
| texte = | |||
Test effectué sans les optimisations <code>-DGGML_CUDA_FA_ALL_QUANTS=ON</code> et <code>-DCMAKE_BUILD_TYPE=Release</code> | |||
}} | |||
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-27B-GGUF/Q4_K_S/Qwen3.6-27B-Q4_K_S.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -t 6 -tb 6 -b 1024 -ub 512 -gr -c 131072 --no-mmap -ctk q8_0 -ctv q8_0 -n 2 -nrep 1 | # /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-27B-GGUF/Q4_K_S/Qwen3.6-27B-Q4_K_S.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -t 6 -tb 6 -b 1024 -ub 512 -gr -c 131072 --no-mmap -ctk q8_0 -ctv q8_0 -n 2 -nrep 1 | ||
| Ligne 399 : | Ligne 438 : | ||
--host 192.168.1.123 \ | --host 192.168.1.123 \ | ||
--port 8080 | --port 8080 | ||
Restart= | Restart=on-failure | ||
RestartSec=5 | RestartSec=5 | ||
| Ligne 405 : | Ligne 444 : | ||
WantedBy=multi-user.target | WantedBy=multi-user.target | ||
</pre> | </pre> | ||
==== Q4_K_XL contexte long 131072 — KV Cache Q4/Q4 + Hadamard ==== | |||
==== Q4_K_XL contexte long 131072 — KV Cache Q4/Q4 + Hadamard (24 Go de VRAM)==== | |||
{{Méta bandeau | |||
| niveau = information | |||
| icône = important | |||
| texte = | |||
Test effectué sans les optimisations <code>-DGGML_CUDA_FA_ALL_QUANTS=ON</code> et <code>-DCMAKE_BUILD_TYPE=Release</code> | |||
}} | |||
[https://www.reddit.com/r/LocalAIStack/comments/1udk2vp/running_qwen36_27b_35b_locally_with_llamacpp/ source] | [https://www.reddit.com/r/LocalAIStack/comments/1udk2vp/running_qwen36_27b_35b_locally_with_llamacpp/ source] | ||
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-27B-GGUF/Q4_K_XL/Qwen3.6-27B-UD-Q4_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -t 6 -tb 6 -b 1024 -ub 1024 -gr -c 131072 --no-mmap -ctk q4_0 -ctv q4_0 --k-cache-hadamard --v-cache-hadamard -n 2 -nrep 1 | # /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-27B-GGUF/Q4_K_XL/Qwen3.6-27B-UD-Q4_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -t 6 -tb 6 -b 1024 -ub 1024 -gr -c 131072 --no-mmap -ctk q4_0 -ctv q4_0 --k-cache-hadamard --v-cache-hadamard -n 2 -nrep 1 | ||
| Ligne 466 : | Ligne 512 : | ||
--host 192.168.1.123 \ | --host 192.168.1.123 \ | ||
--port 8080 | --port 8080 | ||
Restart= | Restart=on-failure | ||
RestartSec=5 | RestartSec=5 | ||
| Ligne 472 : | Ligne 518 : | ||
WantedBy=multi-user.target | WantedBy=multi-user.target | ||
</pre> | </pre> | ||
==== Q4_K_XL contexte long 131072 — KV Cache Q5/Q4 + Hadamard ==== | ==== Q4_K_XL contexte long 131072 — KV Cache Q5/Q4 + Hadamard ==== | ||
{{Méta bandeau | |||
| niveau = information | |||
| icône = important | |||
| texte = | |||
Test effectué sans les optimisations <code>-DGGML_CUDA_FA_ALL_QUANTS=ON</code> et <code>-DCMAKE_BUILD_TYPE=Release</code> | |||
}} | |||
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-27B-GGUF/Q4_K_XL/Qwen3.6-27B-UD-Q4_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -t 6 -tb 6 -b 1024 -ub 1024 -gr -c 131072 --no-mmap -ctk q5_0 -ctv q4_0 --k-cache-hadamard --v-cache-hadamard -n 2 -nrep 1 | # /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-27B-GGUF/Q4_K_XL/Qwen3.6-27B-UD-Q4_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -t 6 -tb 6 -b 1024 -ub 1024 -gr -c 131072 --no-mmap -ctk q5_0 -ctv q4_0 --k-cache-hadamard --v-cache-hadamard -n 2 -nrep 1 | ||
| Ligne 482 : | Ligne 535 : | ||
~ggml_backend_cuda_context: have 505 graphs | ~ggml_backend_cuda_context: have 505 graphs | ||
~ggml_backend_cuda_context: have 973 graphs | ~ggml_backend_cuda_context: have 973 graphs | ||
Avec les optimisations <code>-DGGML_CUDA_FA_ALL_QUANTS=ON</code> et <code>-DCMAKE_BUILD_TYPE=Release</code> : identique, le modèle étant déjà limité par la puissance GPU. | |||
==== Q4_K_XL contexte long 147456 — KV Cache Q6/Q6 + Hadamard ==== | |||
{{Méta bandeau | |||
| niveau = information | |||
| icône = loupe | |||
| texte = | |||
Ici, l’option <code>--tensor-split 1.25,1</code> permet de mieux répartir l’utilisation de la VRAM entre les deux GPU. Cela réduit la charge sur le GPU le plus sollicité et permet à la fois d’augmenter la taille maximale du contexte et d’utiliser un cache KV de meilleure qualité, ici en <code>Q6/Q6</code>. | |||
}} | |||
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-27B-GGUF/Q4_K_XL/Qwen3.6-27B-UD-Q4_K_XL.gguf -ngl 999 -sm graph --tensor-split 1.25,1 --max-gpu 2 -t 6 -tb 6 -b 1024 -ub 1024 -gr -c 147456 --no-mmap -ctk q6_0 -ctv q6_0 --k-cache-hadamard --v-cache-hadamard -n 2 -nrep 1 | |||
* Résultat avec les GPU limités à une puissance de 130 W au lieu de 170 W : | |||
llama_print_timings: load time = 2636.89 ms | |||
llama_print_timings: sample time = 0.00 ms / 1 runs ( 0.00 ms per token, inf tokens per second) | |||
llama_print_timings: prompt eval time = 338216.21 ms / 147456 tokens ( 2.29 ms per token, 435.98 tokens per second) | |||
llama_print_timings: eval time = 18417.52 ms / 288 runs ( 63.95 ms per token, 15.64 tokens per second) | |||
llama_print_timings: total time = 356748.72 ms / 147744 tokens | |||
==== Q4_K_XL contexte long 131072 — KV Cache Q8/Q6 + Hadamard (24 Go de VRAM)==== | |||
{{Méta bandeau | |||
| niveau = information | |||
| icône = loupe | |||
| texte = | |||
Ici, l’option <code>--tensor-split 1.25,1</code> permet de mieux répartir l’utilisation de la VRAM entre les deux GPU. Cela réduit la charge sur le GPU le plus sollicité et permet à la fois d’augmenter la taille maximale du contexte et d’utiliser un cache KV de meilleure qualité, ici en <code>Q8/Q6</code>. | |||
}} | |||
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-27B-GGUF/Q4_K_XL/Qwen3.6-27B-UD-Q4_K_XL.gguf -ngl 999 -sm graph --tensor-split 1.25,1 --max-gpu 2 -t 6 -tb 6 -b 1024 -ub 1024 -gr -c 131072 --no-mmap -ctk q8_0 -ctv q6_0 --k-cache-hadamard --v-cache-hadamard -n 2 -nrep 1 | |||
* Résultat avec les GPU limités à une puissance de 130 W au lieu de 170 W : | |||
llama_print_timings: load time = 2616.25 ms | |||
llama_print_timings: sample time = 0.00 ms / 1 runs ( 0.00 ms per token, inf tokens per second) | |||
llama_print_timings: prompt eval time = 286781.23 ms / 131072 tokens ( 2.19 ms per token, 457.05 tokens per second) | |||
llama_print_timings: eval time = 15815.18 ms / 256 runs ( 61.78 ms per token, 16.19 tokens per second) | |||
llama_print_timings: total time = 302689.85 ms / 131328 tokens | |||
* Résultat avec les GPU limités à une puissance de 130 W au lieu de 170 W + LTO + nccl (+8 % en génération et +3,7 % en traitement du prompt) : | |||
llama_print_timings: load time = 4532.66 ms | |||
llama_print_timings: sample time = 0.00 ms / 1 runs ( 0.00 ms per token, inf tokens per second) | |||
llama_print_timings: prompt eval time = 276572.15 ms / 131072 tokens ( 2.11 ms per token, 473.92 tokens per second) | |||
llama_print_timings: eval time = 14644.47 ms / 256 runs ( 57.20 ms per token, 17.48 tokens per second) | |||
llama_print_timings: total time = 291309.90 ms / 131328 tokens | |||
===== | |||
[Unit] | |||
Description=ik_llama.cpp server | |||
After=network.target | |||
[Service] | |||
Type=simple | |||
User=root | |||
WorkingDirectory=/opt/ik_llama.cpp | |||
ExecStart=/opt/ik_llama.cpp/build/bin/llama-server \ | |||
-m /opt/models/Qwen3.6-27B-GGUF/Q4_K_XL/Qwen3.6-27B-UD-Q4_K_XL.gguf \ | |||
--mmproj /opt/models/Qwen3.6-27B-GGUF/Q4_K_S/mmproj-BF16.gguf \ | |||
-ngl 999 \ | |||
-sm graph \ | |||
--tensor-split 1.25,1 \ | |||
--max-gpu 2 \ | |||
-gr \ | |||
-t 4 \ | |||
-tb 4 \ | |||
-b 1024 \ | |||
-ub 1024 \ | |||
-c 131072 \ | |||
-np 1 \ | |||
-fa on \ | |||
--no-mmproj-offload \ | |||
--image-min-tokens 1024 \ | |||
--no-mmap \ | |||
-ctk q8_0 \ | |||
-ctv q6_0 \ | |||
--k-cache-hadamard \ | |||
--v-cache-hadamard \ | |||
--spec-type ngram-map-k4v:n_max=64,n_min=2,ngram_size_n=16,ngram_size_m=24,ngram_min_hits=1 \ | |||
--reasoning on \ | |||
--jinja \ | |||
--chat-template-file /opt/models/Qwen-Fixed-Chat-Templates/chat_template.jinja \ | |||
--chat-template-kwargs '{"preserve_thinking": true}' \ | |||
--reasoning-format none \ | |||
--reasoning-budget 16192 \ | |||
--reasoning-budget-message "D'accord, assez réfléchi, plus d'attente. Passons à l'action." \ | |||
--slot-save-path /kv_cache/ \ | |||
--ctx-checkpoints-interval 1024 \ | |||
--ctx-checkpoints 64 \ | |||
--temp 0.6 \ | |||
--top-k 20 \ | |||
--top-p 0.95 \ | |||
--min-p 0.0 \ | |||
--presence-penalty 0.0 \ | |||
--repeat-penalty 1.0 \ | |||
--host 192.168.1.123 \ | |||
--port 8080 \ | |||
--api-key-file /etc/ai/ssl/api-keys.txt \ | |||
--ssl-key-file /etc/ai/ssl/server.key \ | |||
--ssl-cert-file /etc/ai/ssl/server.crt | |||
Restart=on-failure | |||
RestartSec=5 | |||
[Install] | |||
WantedBy=multi-user.target | |||
Dernière version du 25 août 2026 à 09:13
Prérequis
- Un GPU est recommandé, idéalement NVIDIA avec le plus de VRAM possible. ik_llama.cpp met particulièrement l’accent sur CUDA, le multi-GPU et les configurations hybrides GPU/CPU. Comme llama.cpp, il permet de répartir une partie du modèle entre GPU et CPU si la VRAM est insuffisante, au prix d’une baisse de performances. Voir ce lien pour partager un GPU dans un LXC
- Les modèles peuvent fonctionner sur CPU uniquement, mais avec des performances très faibles pour les gros modèles, souvent inutilisables en pratique pour un usage interactif.
- VRAM recommandée : dépend du niveau d’offload GPU et de la taille du contexte utilisé. Pour un usage optimal, prévoir environ la taille du modèle quantifié + 1 à 3 Go pour le KV cache. Il est toutefois possible de réduire la VRAM nécessaire en déportant une partie du modèle en RAM.
- RAM recommandée : au minimum équivalente à la taille du modèle, idéalement 1,5 à 2 fois, notamment si une partie du modèle est exécutée sur CPU ou si l’on utilise une configuration hybride GPU/CPU.
- Espace disque à prévoir en fonction du ou des modèles que vous allez utiliser ou tester. Exemples :
- qwen2.5:7b (Q4) ≈ 4–5 Go
- qwen2.5:14b (Q4) ≈ 8–10 Go
- llama3:70b (Q4) ≈ 35–40 Go
- Utiliser un SSD/NVMe améliore fortement les temps de chargement des modèles.
- CPU / vCPU recommandés :
- Avec GPU : 4 à 8 vCPU recommandés, notamment pour la gestion du serveur, du KV cache et d’un éventuel offload partiel CPU.
- Sans GPU : prévoir au minimum 8 à 16 vCPU, les performances restant très limitées sur les modèles importants.
- Note : Q4 correspond au niveau de quantization, c’est-à-dire une réduction de la précision numérique du modèle afin de diminuer son utilisation en mémoire, notamment en VRAM. Les niveaux vont généralement de Q1 à Q8 : Q8 est le plus précis, proche du modèle original, mais aussi le plus gourmand en ressources. À l’inverse, Q1 est très léger mais fortement dégradé. En pratique, Q4 ou Q5 est généralement considéré comme le meilleur compromis entre performances, consommation de VRAM et qualité de réponse.
Installation
Prérequis système
Installer les dépendances nécessaires :
# apt update && apt upgrade # apt install build-essential git libcurl4-openssl-dev curl libgomp1 cmake ccache
Récupération du projet
# cd /opt # git clone https://github.com/ikawrakow/ik_llama.cpp
Compilation
Choisir une seule méthode de compilation selon le matériel disponible.
| Méthode | Description | Recommandation |
|---|---|---|
| CPU uniquement | Compilation sans accélération GPU. | Non testé / déconseillé pour de gros modèles. |
| GPU NVIDIA CUDA | Compilation avec accélération GPU via CUDA. | Recommandé avec une carte NVIDIA compatible. |
En cas de changement de méthode de compilation, supprimer le dossier de compilation avant de relancer CMake :
# rm -rf /opt/ik_llama.cpp/build
| Option A — CPU uniquement |
|---|
|
Cette méthode ne nécessite pas de GPU compatible, mais les performances seront limitées. # cd /opt/ik_llama.cpp # cmake -B build -DGGML_NATIVE=ON # cmake --build build --config Release -j$(nproc) Si processeur avec instructions AVX512 (certains CPU Zen 4 / Zen 5 etc..) : (Source) # cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DGGML_NATIVE=ON \
-DGGML_AVX512=ON \
-DGGML_AVX512_VBMI=ON \
-DGGML_AVX512_VNNI=ON \
-DGGML_AVX512_BF16=ON
# cmake --build build --config Release
|
| Option B — GPU NVIDIA CUDA |
|---|
|
Cette méthode est recommandée avec une carte NVIDIA compatible CUDA. Installation du support GPU NVIDIA CUDA(Optionnel) Vérifier la dernière version disponible du paquet cuda-keyring : # curl https://developer.download.nvidia.com/compute/cuda/repos/debian13/x86_64/ | grep keyring Installer le dépôt CUDA NVIDIA : # cd /opt # wget https://developer.download.nvidia.com/compute/cuda/repos/debian13/x86_64/cuda-keyring_1.1-1_all.deb # dpkg -i cuda-keyring_1.1-1_all.deb # apt update Installer le toolkit CUDA : # apt install -y cuda-toolkit Compilation avec support CUDAQuelques dépendances : # apt install libnccl2 libnccl-dev Connaître les versions de nvcc installées : # find /usr /opt -name nvcc 2>/dev/null Compiler llama.cpp avec le support CUDA : # cd /opt/ik_llama.cpp # export CUDACXX=/usr/local/cuda-13.3/bin/nvcc # cmake -B build -DGGML_NATIVE=ON -DGGML_CUDA=ON -DGGML_CUDA_FA_ALL_QUANTS=ON -DCMAKE_BUILD_TYPE=Release -DLLAMA_OPENSSL=ON -DGGML_LTO=ON # cmake --build build --config Release -j$(nproc) |
Emplacement des binaires
Les binaires seront disponibles dans :
/opt/ik_llama.cpp/build/bin/
Support de SSL
On installe les dépendances si nécessaire :
# apt update && apt upgrade # apt install -y build-essential cmake ninja-build libssl-dev pkg-config
Il faut rajouter -DLLAMA_OPENSSL=ON aux options de compilation, exemple avec CUDA :
# cmake -B build -DGGML_NATIVE=ON -DGGML_CUDA=ON -DLLAMA_OPENSSL=ON
Après compilation, on peut vérifier que le binaire est bien lié à OpenSSL :
# ldd /opt/ik_llama.cpp/build/bin/llama-server | grep -Ei 'ssl|crypto'
On doit voir apparaître libssl et libcrypto. Si rien n’apparaît, le support SSL n’a pas été compilé correctement.
Mise à jour
Pour mettre à jour ik_llama.cpp, arrêter d'abord les services ou processus qui utilisent les binaires :
# pkill -f llama-server
Se placer dans le dossier du projet :
# cd /opt/ik_llama.cpp
Récupérer la dernière version du dépôt :
# git pull
Par sécurité, supprimer l'ancien dossier de compilation avant de recompiler :
# rm -rf build
Recompiler avec la même méthode que lors de l'installation.
Mise à jour CPU uniquement
# cmake -B build -DGGML_NATIVE=ON # cmake --build build --config Release -j$(nproc)
Mise à jour GPU NVIDIA CUDA
Si nécessaire, vérifier le chemin de nvcc :
# find /usr /opt -name nvcc 2>/dev/null
Puis recompiler avec CUDA :
# export CUDACXX=/usr/local/cuda-13.3/bin/nvcc # cmake -B build -DGGML_NATIVE=ON -DGGML_CUDA=ON -DGGML_CUDA_FA_ALL_QUANTS=ON -DCMAKE_BUILD_TYPE=Release -DLLAMA_OPENSSL=ON -DGGML_LTO=ON # cmake --build build --config Release -j$(nproc)
Les nouveaux binaires seront disponibles dans :
/opt/ik_llama.cpp/build/bin/
Vérifier la version compilée :
# /opt/ik_llama.cpp/build/bin/llama-server --version
Configuration
Se reporter à la page de llama.cpp
Particularités de ik_llama
Télécharger un modèle
Préférer le téléchargement via le client Hugging Face
Multi-GPU via sm graph
ik_llama.cpp dispose d'un mode de répartition multi-GPU spécifique appelé graph.
Contrairement au mode classique layer, qui répartit les couches du modèle entre les GPU, le mode graph cherche à répartir le graphe de calcul lui-même entre plusieurs GPU. L'objectif est de mieux utiliser plusieurs cartes en parallèle, notamment lorsque le modèle est trop gros pour une seule carte ou lorsque plusieurs GPU doivent travailler simultanément.
Ce mode est surtout intéressant avec plusieurs GPU. Sur une seule carte graphique, il n'a généralement pas d'intérêt.
Vérifier la disponibilité de l'option
Les options disponibles peuvent varier selon la version compilée. Vérifier d'abord que le binaire supporte bien le mode graph :
# /opt/ik_llama.cpp/build/bin/llama-server --help | grep -i "split"
ou :
# /opt/ik_llama.cpp/build/bin/llama-server --help | grep -i "graph"
Exemple simple avec deux GPU
Exemple avec deux GPU identiques :
# /opt/ik_llama.cpp/build/bin/llama-server \
-m /models/modele.gguf \
-ngl 999 \
-sm graph \
--tensor-split 12,12 \
-c 4096 \
-fa
Les valeurs de --tensor-split sont des proportions. Pour deux GPU identiques, on peut utiliser :
# --tensor-split 12,12
ou simplement :
# --tensor-split 1,1
Les deux indiquent une répartition équilibrée.
Exemple avec GPU de tailles différentes
Exemple avec une carte de 24 Go et une carte de 12 Go :
# /opt/ik_llama.cpp/build/bin/llama-server \
-m /models/modele.gguf \
-ngl 999 \
-sm graph \
--tensor-split 24,12 \
-c 4096 \
-fa
Cela indique à ik_llama.cpp de répartir davantage de charge vers la carte disposant de plus de VRAM.
Sélectionner les GPU visibles
Il est possible de limiter les GPU visibles avec CUDA_VISIBLE_DEVICES.
Exemple pour n'utiliser que les GPU physiques 1 et 2 :
# CUDA_VISIBLE_DEVICES=1,2 /opt/ik_llama.cpp/build/bin/llama-server \
-m /models/modele.gguf \
-ngl 999 \
-sm graph \
--tensor-split 1,1 \
-c 4096 \
-fa
Attention : lorsque CUDA_VISIBLE_DEVICES est utilisé, les GPU sont renumérotés par CUDA.
Ainsi :
# CUDA_VISIBLE_DEVICES=1,2
signifie que le GPU physique 1 devient le GPU 0 pour ik_llama.cpp, et que le GPU physique 2 devient le GPU 1.
Choisir le GPU principal
Le paramètre --main-gpu permet de choisir le GPU principal utilisé par llama.cpp / ik_llama.cpp pour certaines allocations.
Exemple :
# /opt/ik_llama.cpp/build/bin/llama-server \
-m /models/modele.gguf \
-ngl 999 \
-sm graph \
--tensor-split 1,1 \
--main-gpu 0 \
-c 4096 \
-fa
Si le GPU 0 est utilisé par l'affichage ou par un autre service, il peut être utile de tester un autre GPU principal.
Benchmark
Comparer d'abord un seul GPU :
# CUDA_VISIBLE_DEVICES=0 /opt/ik_llama.cpp/build/bin/llama-bench \
-m /models/modele.gguf \
-ngl 999 \
-c 4096 \
-fa
Puis deux GPU en mode graph :
# CUDA_VISIBLE_DEVICES=0,1 /opt/ik_llama.cpp/build/bin/llama-bench \
-m /models/modele.gguf \
-ngl 999 \
-sm graph \
--tensor-split 1,1 \
-c 4096 \
-fa
Les valeurs à comparer sont principalement :
pp : prompt processing tg : token generation
Surveillance de la VRAM
Pendant les tests, surveiller l'utilisation mémoire :
# watch -n 1 nvidia-smi
En cas d'erreur CUDA out of memory, essayer :
- réduire
-c; - réduire
-b; - réduire
-ub; - ajuster
--tensor-split; - réduire
-ngl; - utiliser un quant plus léger.
Remarques
- Le mode
graphest surtout utile en multi-GPU. - Les gains dépendent fortement du modèle, du quant, du PCIe, du contexte et du nombre de GPU.
- Deux GPU identiques sont plus simples à configurer.
- Avec des GPU différents, il peut être nécessaire de tester plusieurs valeurs de
--tensor-split. - Le mode
graphpeut évoluer rapidement selon les versions de ik_llama.cpp. Il est donc recommandé de vérifier les options disponibles avec--helpaprès chaque mise à jour.
Tests en vrac
unsloth/Qwen3.6-35B-A3B-GGUF
- i5 9600k
- 32gb RAM
- 2x 3060 12gb
Q5_K_XL context max (262144)
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-35B-A3B-GGUF/UD-Q5_K_XL/Qwen3.6-35B-A3B-UD-Q5_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -gr --n-cpu-moe 28 --defer-experts -t 6 -tb 6 -b 4096 -ub 4096 -c 262144 --cache-ram 2048 --no-mmap -ctk q8_0 -ctv q8_0 --k-cache-hadamard --v-cache-hadamard -n 8 -nrep 1
llama_print_timings: load time = 251.16 ms llama_print_timings: sample time = 0.00 ms / 1 runs ( 0.00 ms per token, inf tokens per second) llama_print_timings: prompt eval time = 478864.73 ms / 262144 tokens ( 1.83 ms per token, 547.43 tokens per second) llama_print_timings: eval time = 22001.10 ms / 512 runs ( 42.97 ms per token, 23.27 tokens per second) llama_print_timings: total time = 500956.66 ms / 262656 tokens ~ggml_backend_cuda_context: have 477 graphs ~ggml_backend_cuda_context: have 630 graphs
Q6_K_XL context max (262144)
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-35B-A3B-GGUF/UD-Q6_K_XL/Qwen3.6-35B-A3B-UD-Q6_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -gr --n-cpu-moe 30 --defer-experts -t 6 -tb 6 -b 4096 -ub 4096 -c 262144 --cache-ram 2048 --no-mmap -ctk q8_0 -ctv q8_0 --k-cache-hadamard --v-cache-hadamard -n 8 -nrep 1
llama_print_timings: load time = 173.76 ms llama_print_timings: sample time = 0.00 ms / 1 runs ( 0.00 ms per token, inf tokens per second) llama_print_timings: prompt eval time = 524310.41 ms / 262144 tokens ( 2.00 ms per token, 499.98 tokens per second) llama_print_timings: eval time = 24036.52 ms / 512 runs ( 46.95 ms per token, 21.30 tokens per second) llama_print_timings: total time = 548440.06 ms / 262656 tokens ~ggml_backend_cuda_context: have 490 graphs ~ggml_backend_cuda_context: have 631 graphs
Q6_K_XL context long (131072)
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-35B-A3B-GGUF/UD-Q6_K_XL/Qwen3.6-35B-A3B-UD-Q6_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -gr --n-cpu-moe 26 --defer-experts -t 6 -tb 6 -b 4096 -ub 4096 -c 131072 --cache-ram 2048 --no-mmap -ctk q8_0 -ctv q8_0 --k-cache-hadamard --v-cache-hadamard -n 8 -nrep 1
llama_print_timings: load time = 147.88 ms llama_print_timings: sample time = 0.00 ms / 1 runs ( 0.00 ms per token, inf tokens per second) llama_print_timings: prompt eval time = 192731.43 ms / 131072 tokens ( 1.47 ms per token, 680.08 tokens per second) llama_print_timings: eval time = 9863.68 ms / 256 runs ( 38.53 ms per token, 25.95 tokens per second) llama_print_timings: total time = 202622.70 ms / 131328 tokens ~ggml_backend_cuda_context: have 463 graphs ~ggml_backend_cuda_context: have 628 graphs
unsloth/Qwen3.6-27B-GGUF
- i5 9600k
- 32gb RAM
- 2x 3060 12gb
Bonus Qwen 3.6 : Avec chat_template.jinja corrigé
# mkdir -p /opt/models/Qwen-Fixed-Chat-Templates # hf download froggeric/Qwen-Fixed-Chat-Templates --local-dir /opt/models/Qwen-Fixed-Chat-Templates
Rajouter dans le service :
... --jinja \ --chat-template-file /opt/models/Qwen-Fixed-Chat-Templates/chat_template.jinja \ ...
Q4_K_S context long (131072) (24 Go de VRAM)
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-27B-GGUF/Q4_K_S/Qwen3.6-27B-Q4_K_S.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -t 6 -tb 6 -b 1024 -ub 512 -gr -c 131072 --no-mmap -ctk q8_0 -ctv q8_0 -n 2 -nrep 1
llama_print_timings: load time = 4721.53 ms llama_print_timings: sample time = 0.00 ms / 1 runs ( 0.00 ms per token, inf tokens per second) llama_print_timings: prompt eval time = 280210.46 ms / 131072 tokens ( 2.14 ms per token, 467.76 tokens per second) llama_print_timings: eval time = 28434.88 ms / 512 runs ( 55.54 ms per token, 18.01 tokens per second) llama_print_timings: total time = 308825.96 ms / 131584 tokens ~ggml_backend_cuda_context: have 505 graphs ~ggml_backend_cuda_context: have 973 graphs
systemd
[Unit]
Description=ik_llama.cpp server
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/ik_llama.cpp
ExecStart=/opt/ik_llama.cpp/build/bin/llama-server \
-m /opt/models/Qwen3.6-27B-GGUF/Q4_K_S/Qwen3.6-27B-Q4_K_S.gguf \
--mmproj /opt/models/Qwen3.6-27B-GGUF/Q4_K_S/mmproj-BF16.gguf \
-ngl 999 \
-sm graph \
--tensor-split 1,1 \
--max-gpu 2 \
-gr \
-t 6 \
-tb 6 \
-b 1024 \
-ub 512 \
-c 131072 \
-np 1 \
-fa on \
--no-mmproj-offload \
--image-min-tokens 1024 \
--no-mmap \
-ctk q8_0 \
-ctv q8_0 \
--reasoning on \
--jinja \
--chat-template-kwargs '{"preserve_thinking": true}' \
--reasoning-budget 8096 \
--reasoning-budget-message "D'accord, assez réfléchi, plus d'attente. Passons à l'action." \
--temp 0.6 \
--top-k 20 \
--top-p 0.95 \
--min-p 0.0 \
--presence-penalty 0.0 \
--repeat-penalty 1.0 \
--host 192.168.1.123 \
--port 8080
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Q4_K_XL contexte long 131072 — KV Cache Q4/Q4 + Hadamard (24 Go de VRAM)
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-27B-GGUF/Q4_K_XL/Qwen3.6-27B-UD-Q4_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -t 6 -tb 6 -b 1024 -ub 1024 -gr -c 131072 --no-mmap -ctk q4_0 -ctv q4_0 --k-cache-hadamard --v-cache-hadamard -n 2 -nrep 1
llama_print_timings: load time = 5881.19 ms llama_print_timings: sample time = 0.00 ms / 1 runs ( 0.00 ms per token, inf tokens per second) llama_print_timings: prompt eval time = 267129.32 ms / 131072 tokens ( 2.04 ms per token, 490.67 tokens per second) llama_print_timings: eval time = 14659.30 ms / 256 runs ( 57.26 ms per token, 17.46 tokens per second) llama_print_timings: total time = 281884.19 ms / 131328 tokens ~ggml_backend_cuda_context: have 505 graphs ~ggml_backend_cuda_context: have 973 graphs
systemd
[Unit]
Description=ik_llama.cpp server
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/ik_llama.cpp
ExecStart=/opt/ik_llama.cpp/build/bin/llama-server \
-m /opt/models/Qwen3.6-27B-GGUF/Q4_K_XL/Qwen3.6-27B-UD-Q4_K_XL.gguf \
--mmproj /opt/models/Qwen3.6-27B-GGUF/Q4_K_S/mmproj-BF16.gguf \
-ngl 999 \
-sm graph \
--tensor-split 1,1 \
--max-gpu 2 \
-gr \
-t 6 \
-tb 6 \
-b 1024 \
-ub 1024 \
-c 131072 \
-np 1 \
-fa on \
--no-mmproj-offload \
--image-min-tokens 1024 \
--no-mmap \
-ctk q4_0 \
-ctv q4_0 \
--k-cache-hadamard \
--v-cache-hadamard \
--spec-type ngram-map-k4v:n_max=64,n_min=2,ngram_size_n=16,ngram_size_m=24,ngram_min_hits=1 \
--reasoning on \
--jinja \
--chat-template-kwargs '{"preserve_thinking": true}' \
--reasoning-format none \
--reasoning-budget 16192 \
--reasoning-budget-message "D'accord, assez réfléchi, plus d'attente. Passons à l'action." \
--slot-save-path /kv_cache/ \
--ctx-checkpoints-interval 1024 \
--ctx-checkpoints 64 \
--temp 0.6 \
--top-k 20 \
--top-p 0.95 \
--min-p 0.0 \
--presence-penalty 0.0 \
--repeat-penalty 1.0 \
--host 192.168.1.123 \
--port 8080
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Q4_K_XL contexte long 131072 — KV Cache Q5/Q4 + Hadamard
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-27B-GGUF/Q4_K_XL/Qwen3.6-27B-UD-Q4_K_XL.gguf -ngl 999 -sm graph --tensor-split 1,1 --max-gpu 2 -t 6 -tb 6 -b 1024 -ub 1024 -gr -c 131072 --no-mmap -ctk q5_0 -ctv q4_0 --k-cache-hadamard --v-cache-hadamard -n 2 -nrep 1
llama_print_timings: load time = 5459.27 ms llama_print_timings: sample time = 0.00 ms / 1 runs ( 0.00 ms per token, inf tokens per second) llama_print_timings: prompt eval time = 269220.23 ms / 131072 tokens ( 2.05 ms per token, 486.86 tokens per second) llama_print_timings: eval time = 14890.44 ms / 256 runs ( 58.17 ms per token, 17.19 tokens per second) llama_print_timings: total time = 284203.71 ms / 131328 tokens ~ggml_backend_cuda_context: have 505 graphs ~ggml_backend_cuda_context: have 973 graphs
Avec les optimisations -DGGML_CUDA_FA_ALL_QUANTS=ON et -DCMAKE_BUILD_TYPE=Release : identique, le modèle étant déjà limité par la puissance GPU.
Q4_K_XL contexte long 147456 — KV Cache Q6/Q6 + Hadamard
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-27B-GGUF/Q4_K_XL/Qwen3.6-27B-UD-Q4_K_XL.gguf -ngl 999 -sm graph --tensor-split 1.25,1 --max-gpu 2 -t 6 -tb 6 -b 1024 -ub 1024 -gr -c 147456 --no-mmap -ctk q6_0 -ctv q6_0 --k-cache-hadamard --v-cache-hadamard -n 2 -nrep 1
- Résultat avec les GPU limités à une puissance de 130 W au lieu de 170 W :
llama_print_timings: load time = 2636.89 ms llama_print_timings: sample time = 0.00 ms / 1 runs ( 0.00 ms per token, inf tokens per second) llama_print_timings: prompt eval time = 338216.21 ms / 147456 tokens ( 2.29 ms per token, 435.98 tokens per second) llama_print_timings: eval time = 18417.52 ms / 288 runs ( 63.95 ms per token, 15.64 tokens per second) llama_print_timings: total time = 356748.72 ms / 147744 tokens
Q4_K_XL contexte long 131072 — KV Cache Q8/Q6 + Hadamard (24 Go de VRAM)
# /opt/ik_llama.cpp/build/bin/llama-sweep-bench -m /opt/models/Qwen3.6-27B-GGUF/Q4_K_XL/Qwen3.6-27B-UD-Q4_K_XL.gguf -ngl 999 -sm graph --tensor-split 1.25,1 --max-gpu 2 -t 6 -tb 6 -b 1024 -ub 1024 -gr -c 131072 --no-mmap -ctk q8_0 -ctv q6_0 --k-cache-hadamard --v-cache-hadamard -n 2 -nrep 1
- Résultat avec les GPU limités à une puissance de 130 W au lieu de 170 W :
llama_print_timings: load time = 2616.25 ms llama_print_timings: sample time = 0.00 ms / 1 runs ( 0.00 ms per token, inf tokens per second) llama_print_timings: prompt eval time = 286781.23 ms / 131072 tokens ( 2.19 ms per token, 457.05 tokens per second) llama_print_timings: eval time = 15815.18 ms / 256 runs ( 61.78 ms per token, 16.19 tokens per second) llama_print_timings: total time = 302689.85 ms / 131328 tokens
- Résultat avec les GPU limités à une puissance de 130 W au lieu de 170 W + LTO + nccl (+8 % en génération et +3,7 % en traitement du prompt) :
llama_print_timings: load time = 4532.66 ms llama_print_timings: sample time = 0.00 ms / 1 runs ( 0.00 ms per token, inf tokens per second) llama_print_timings: prompt eval time = 276572.15 ms / 131072 tokens ( 2.11 ms per token, 473.92 tokens per second) llama_print_timings: eval time = 14644.47 ms / 256 runs ( 57.20 ms per token, 17.48 tokens per second) llama_print_timings: total time = 291309.90 ms / 131328 tokens
[Unit]
Description=ik_llama.cpp server
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/ik_llama.cpp
ExecStart=/opt/ik_llama.cpp/build/bin/llama-server \
-m /opt/models/Qwen3.6-27B-GGUF/Q4_K_XL/Qwen3.6-27B-UD-Q4_K_XL.gguf \
--mmproj /opt/models/Qwen3.6-27B-GGUF/Q4_K_S/mmproj-BF16.gguf \
-ngl 999 \
-sm graph \
--tensor-split 1.25,1 \
--max-gpu 2 \
-gr \
-t 4 \
-tb 4 \
-b 1024 \
-ub 1024 \
-c 131072 \
-np 1 \
-fa on \
--no-mmproj-offload \
--image-min-tokens 1024 \
--no-mmap \
-ctk q8_0 \
-ctv q6_0 \
--k-cache-hadamard \
--v-cache-hadamard \
--spec-type ngram-map-k4v:n_max=64,n_min=2,ngram_size_n=16,ngram_size_m=24,ngram_min_hits=1 \
--reasoning on \
--jinja \
--chat-template-file /opt/models/Qwen-Fixed-Chat-Templates/chat_template.jinja \
--chat-template-kwargs '{"preserve_thinking": true}' \
--reasoning-format none \
--reasoning-budget 16192 \
--reasoning-budget-message "D'accord, assez réfléchi, plus d'attente. Passons à l'action." \
--slot-save-path /kv_cache/ \
--ctx-checkpoints-interval 1024 \
--ctx-checkpoints 64 \
--temp 0.6 \
--top-k 20 \
--top-p 0.95 \
--min-p 0.0 \
--presence-penalty 0.0 \
--repeat-penalty 1.0 \
--host 192.168.1.123 \
--port 8080 \
--api-key-file /etc/ai/ssl/api-keys.txt \
--ssl-key-file /etc/ai/ssl/server.key \
--ssl-cert-file /etc/ai/ssl/server.crt
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target