frank-default-small: enable tool calling (--enable-auto-tool-choice --tool-call-parser qwen3_xml)
Clients send tool_choice=auto; without these flags vLLM rejects with HTTP 400. The Avesed chat template renders the Qwen3 XML tool format, so qwen3_xml is the matching parser.
This commit is contained in:
1 parent
57264f7faa
commit
5108af11aa
2 files changed
+17
-1
No files matched your search
@@ -39,6 +39,13 @@ NGRAM_LOOKUP_MAX=5
|
|||||||
NGRAM_LOOKUP_MIN=1
|
NGRAM_LOOKUP_MIN=1
|
||||||
NUM_SPEC_TOKENS=5
|
NUM_SPEC_TOKENS=5
|
||||||
|
|
||||||
|
# Tool calling. Clients (pi, OpenWebUI) send tool_choice=auto; without
|
||||||
|
# --enable-auto-tool-choice vLLM rejects it with HTTP 400. The Avesed
|
||||||
|
# chat template renders tools in the Qwen3 XML format, so the qwen3_xml
|
||||||
|
# parser is the matching one.
|
||||||
|
ENABLE_AUTO_TOOL_CHOICE=1
|
||||||
|
TOOL_CALL_PARSER=qwen3_xml
|
||||||
|
|
||||||
# RDNA flash-attention for the vision encoder (and general FA paths).
|
# RDNA flash-attention for the vision encoder (and general FA paths).
|
||||||
# Without this, the mm encoder falls back to torch SDPA and the warmup
|
# Without this, the mm encoder falls back to torch SDPA and the warmup
|
||||||
# OOMs (256 GiB score matrix at max_model_len; measured 2026-08-17).
|
# OOMs (256 GiB score matrix at max_model_len; measured 2026-08-17).
|
||||||
|
|||||||
@@ -33,12 +33,20 @@ fi
|
|||||||
: "${NGRAM_LOOKUP_MAX:=5}"
|
: "${NGRAM_LOOKUP_MAX:=5}"
|
||||||
: "${NGRAM_LOOKUP_MIN:=1}"
|
: "${NGRAM_LOOKUP_MIN:=1}"
|
||||||
: "${NUM_SPEC_TOKENS:=5}"
|
: "${NUM_SPEC_TOKENS:=5}"
|
||||||
|
: "${ENABLE_AUTO_TOOL_CHOICE:=1}"
|
||||||
|
: "${TOOL_CALL_PARSER:=qwen3_xml}"
|
||||||
|
|
||||||
if [[ ! -x "$VLLM_BIN" ]]; then
|
if [[ ! -x "$VLLM_BIN" ]]; then
|
||||||
echo "missing vllm binary: $VLLM_BIN" >&2
|
echo "missing vllm binary: $VLLM_BIN" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
TOOL_ARGS=()
|
||||||
|
if [[ "${ENABLE_AUTO_TOOL_CHOICE}" == "1" ]]; then
|
||||||
|
TOOL_ARGS+=(--enable-auto-tool-choice)
|
||||||
|
TOOL_ARGS+=(--tool-call-parser "${TOOL_CALL_PARSER}")
|
||||||
|
fi
|
||||||
|
|
||||||
exec "$VLLM_BIN" serve "$MODEL" \
|
exec "$VLLM_BIN" serve "$MODEL" \
|
||||||
--host "$BIND_ADDR" \
|
--host "$BIND_ADDR" \
|
||||||
--port "$LISTEN_PORT" \
|
--port "$LISTEN_PORT" \
|
||||||
@@ -50,4 +58,5 @@ exec "$VLLM_BIN" serve "$MODEL" \
|
|||||||
--gpu-memory-utilization "$GPU_MEMORY_UTILIZATION" \
|
--gpu-memory-utilization "$GPU_MEMORY_UTILIZATION" \
|
||||||
--speculative-config "{\"method\":\"ngram\",\"prompt_lookup_max\":$NGRAM_LOOKUP_MAX,\"prompt_lookup_min\":$NGRAM_LOOKUP_MIN,\"num_speculative_tokens\":$NUM_SPEC_TOKENS}" \
|
--speculative-config "{\"method\":\"ngram\",\"prompt_lookup_max\":$NGRAM_LOOKUP_MAX,\"prompt_lookup_min\":$NGRAM_LOOKUP_MIN,\"num_speculative_tokens\":$NUM_SPEC_TOKENS}" \
|
||||||
--reasoning-parser qwen3 \
|
--reasoning-parser qwen3 \
|
||||||
--trust-remote-code
|
--trust-remote-code \
|
||||||
|
"${TOOL_ARGS[@]}"
|
||||||
Reference in new issue
Block a user