« Llama-swap » : différence entre les versions
De Le Wiki de Lug
Autres actions
| Ligne 54 : | Ligne 54 : | ||
=== Exemples modèle unique == | === Exemples modèle unique == | ||
==== [[Beellama.cpp#Qwen3.6-27B-UD-Q4_K_XL_+_kvcache_Q8_Q8_(2x_12_Go_de_VRAM)|Qwen3.8-27B Context 144384 Kvarn6/Kvarn6 (2x 12 Go de VRAM)]] ==== | |||
<font color = grey>... | |||
models:</font> | |||
"Qwen3.8-27B": | |||
name: "Qwen3.8-27B" | |||
capabilities: | |||
in: | |||
- text | |||
- image | |||
out: | |||
- text | |||
tools: true | |||
context: 144384 | |||
cmd: | | |||
/opt/beellama.cpp/build/bin/llama-server | |||
-m /opt/models/Qwen3.8-27B/UD-Q4_K_XL/Qwen3.8-27B-UD-Q4_K_XL.gguf | |||
--mmproj /opt/models/Qwen3.8-27B/UD-Q4_K_XL/mmproj-BF16.gguf | |||
--no-mmproj-offload | |||
--image-min-tokens 1024 | |||
-ngl 999 | |||
-sm tensor | |||
-ts 1/1 | |||
-t 4 | |||
-tb 4 | |||
-b 1024 | |||
-ub 1024 | |||
-c 144384 | |||
-np 1 | |||
-fa on | |||
--load-mode none | |||
-ctk kvarn6 | |||
-ctv kvarn6 | |||
--kv-tail-tokens 1024 | |||
--spec-type ngram-mod,draft-mtp | |||
--spec-ngram-mod-n-match 24 | |||
--spec-ngram-mod-n-min 12 | |||
--spec-ngram-mod-n-max 48 | |||
--spec-draft-n-max 3 | |||
--spec-draft-n-min 0 | |||
--spec-draft-p-min 0.75 | |||
--reasoning on | |||
--reasoning-preserve | |||
--jinja | |||
--chat-template-file /opt/models/Qwen-Fixed-Chat-Templates/chat_template.jinja | |||
--chat-template-kwargs '{"preserve_thinking": true}' | |||
--reasoning-format deepseek | |||
--reasoning-budget 16192 | |||
--reasoning-budget-message "D'accord, assez réfléchi, plus d'attente. Passons à l'action." | |||
--slot-save-path /kv_cache/ | |||
--temp 1.0 | |||
--top-k 20 | |||
--top-p 0.95 | |||
--min-p 0.0 | |||
--presence-penalty 0.0 | |||
--repeat-penalty 1.0 | |||
--host 127.0.0.1 | |||
--port ${PORT} | |||
==== [[Beellama.cpp#Qwen3.8-27B_Context_144384_Kvarn6/Kvarn6_-_tail_1024_-_MTP_+_n-gam_(24_Go_de_VRAM)|Qwen3.8-27B Context 144384 Kvarn6/Kvarn6 (24_Go_de_VRAM)]] ==== | ==== [[Beellama.cpp#Qwen3.8-27B_Context_144384_Kvarn6/Kvarn6_-_tail_1024_-_MTP_+_n-gam_(24_Go_de_VRAM)|Qwen3.8-27B Context 144384 Kvarn6/Kvarn6 (24_Go_de_VRAM)]] ==== | ||
Version du 25 août 2026 à 15:37
Installation
Debian
# apt update && apt upgrade # apt install -y nodejs npm golang-go # cd /opt # git clone https://github.com/mostlygeek/llama-swap.git # cd llama-swap # make clean all
- On crée le service SystemD :
# vi /etc/systemd/system/llama-swap.service
[Unit] Description=llama-swap After=network.target [Service] Type=simple ExecStart=/opt/llama-swap/build/llama-swap-linux-amd64 --config /etc/llama-swap/config.yaml --listen 0.0.0.0:8080 Restart=on-failure RestartSec=3 [Install] WantedBy=multi-user.target
systemctl daemon-reload systemctl enable --now llama-swap
Configuration
- Si nécessaire, on crée le dossier :
# mkdir /etc/llama-swap
- On édite le fichier de configuration :
# vi /etc/llama-swap/config.yaml
- Exemple de configuration de base :
apiKeys: - "CLE_API_1" - "CLE_API_2" logLevel: info healthCheckTimeout: 500 globalTTL: 0 unloadTimeout: 10 logToStdout: both
= Exemples modèle unique
...
models:
"Qwen3.8-27B":
name: "Qwen3.8-27B"
capabilities:
in:
- text
- image
out:
- text
tools: true
context: 144384
cmd: |
/opt/beellama.cpp/build/bin/llama-server
-m /opt/models/Qwen3.8-27B/UD-Q4_K_XL/Qwen3.8-27B-UD-Q4_K_XL.gguf
--mmproj /opt/models/Qwen3.8-27B/UD-Q4_K_XL/mmproj-BF16.gguf
--no-mmproj-offload
--image-min-tokens 1024
-ngl 999
-sm tensor
-ts 1/1
-t 4
-tb 4
-b 1024
-ub 1024
-c 144384
-np 1
-fa on
--load-mode none
-ctk kvarn6
-ctv kvarn6
--kv-tail-tokens 1024
--spec-type ngram-mod,draft-mtp
--spec-ngram-mod-n-match 24
--spec-ngram-mod-n-min 12
--spec-ngram-mod-n-max 48
--spec-draft-n-max 3
--spec-draft-n-min 0
--spec-draft-p-min 0.75
--reasoning on
--reasoning-preserve
--jinja
--chat-template-file /opt/models/Qwen-Fixed-Chat-Templates/chat_template.jinja
--chat-template-kwargs '{"preserve_thinking": true}'
--reasoning-format deepseek
--reasoning-budget 16192
--reasoning-budget-message "D'accord, assez réfléchi, plus d'attente. Passons à l'action."
--slot-save-path /kv_cache/
--temp 1.0
--top-k 20
--top-p 0.95
--min-p 0.0
--presence-penalty 0.0
--repeat-penalty 1.0
--host 127.0.0.1
--port ${PORT}