Files
homelab/ansible/roles/llm-inference-multimodel/templates/llama-server-toolcall.service.j2

45 lines
1.9 KiB
Django/Jinja

[Unit]
Description=llama-server (tool-calling) — Mistral-Small-24B-Instruct-2501 Q3_K_M (OpenAI-compatible inference)
After=network.target nvidia-persistenced.service
Wants=nvidia-persistenced.service
[Service]
Type=simple
User={{ llm_service_user }}
Group={{ llm_service_user }}
Environment="HOME=/home/{{ llm_service_user }}"
ExecStart={{ llm_binary_path }} \
--model {{ llm_toolcall_model_path }} \
--host {{ llm_bind_address }} \
--port {{ llm_toolcall_port }} \
--ctx-size {{ llm_toolcall_ctx_size }} \
--n-gpu-layers {{ llm_toolcall_gpu_layers }} \
--parallel {{ llm_toolcall_parallel }} \
--jinja \
--chat-template-file {{ llm_toolcall_chat_template_file }} \
--metrics
# --jinja + --chat-template-file: Mistral-Small-24B-Instruct-2501's own
# embedded chat template has NO tool-calling support (verified via /props ->
# chat_template_caps.supports_tools=false). We serve Mistral-Nemo-Instruct-
# 2407's tool-calling-capable Jinja template instead (same Mistral instruct
# format family, adds [AVAILABLE_TOOLS]/[TOOL_CALLS] handling). See
# docs/validation-log.md for the investigation and validation probe results.
# NOTE: --host is the private LAN IP (10.1.71.130 by default), NOT 0.0.0.0.
# NOTE: --parallel 1 is deliberate (plan §1/§2) — tool-calling profiles are
# single-session-at-a-time per Claude Code profile; lower parallelism reduces
# KV overhead and lowers hallucination surface from context bleed between
# concurrent slots.
# IMPORTANT: this endpoint MUST pass the plan §7 validation harness
# (docs/validation-log.md in this role) before any Claude Code / tool-calling
# Hermes profile is pointed at it. Mistral-Small shares lineage concerns
# flagged for Qwen2.5/Qwen3 hallucinated tool_calls — do not assume safety.
Restart=on-failure
RestartSec=10
TimeoutStartSec=600
StandardOutput=journal
StandardError=journal
SyslogIdentifier=llama-server-toolcall
[Install]
WantedBy=multi-user.target