Fix parallel validation, remove ngram-mod
- Rewrite validation script with temp files for true parallel curl requests - Both prompts now complete 1024 tokens each (was cutting first short) - Remove ngram-mod from spec pipeline (was -1.2 tok/s regression) - True parallel throughput: 15.68 tok/s across 2 streams
This commit is contained in:
1 parent
2426ca563a
commit
471e963350
3 files changed
+19
-13
No files matched your search
@@ -6,7 +6,7 @@ After=network.target
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=dank
|
User=dank
|
||||||
Group=dank
|
Group=dank
|
||||||
ExecStart=/home/dank/llama.cpp/build/bin/llama-server --hf-repo unsloth/Qwen3.6-27B-MTP-GGUF:Q8_0 --spec-draft-hf Alittlehammmer/Qwen3.6-27B-DFlash-GGUF-llama.cpp:Q8_0 --spec-type draft-dflash,ngram-mod --spec-draft-n-max 16 --device ROCm0 --spec-draft-device ROCm0 --gpu-layers all --fit on --fit-target 512 --parallel 3 --ctx-size 131072 --batch-size 4096 --port 8080 --host 0.0.0.0 --threads 16 --load-mode none
|
ExecStart=/home/dank/llama.cpp/build/bin/llama-server --hf-repo unsloth/Qwen3.6-27B-MTP-GGUF:Q8_0 --spec-draft-hf Alittlehammmer/Qwen3.6-27B-DFlash-GGUF-llama.cpp:Q8_0 --spec-type draft-dflash --spec-draft-n-max 16 --device ROCm0 --spec-draft-device ROCm0 --gpu-layers all --fit on --fit-target 512 --parallel 3 --ctx-size 131072 --batch-size 4096 --port 8080 --host 0.0.0.0 --threads 16 --load-mode none
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ echo ""
|
|||||||
exec "${SERVER_BIN}" \
|
exec "${SERVER_BIN}" \
|
||||||
--hf-repo "${TARGET_REPO}" \
|
--hf-repo "${TARGET_REPO}" \
|
||||||
--spec-draft-hf "${DRAFT_REPO}" \
|
--spec-draft-hf "${DRAFT_REPO}" \
|
||||||
--spec-type draft-dflash,ngram-mod \
|
--spec-type draft-dflash \
|
||||||
--spec-draft-n-max "${DRAFT_N_MAX}" \
|
--spec-draft-n-max "${DRAFT_N_MAX}" \
|
||||||
--device ROCm0 \
|
--device ROCm0 \
|
||||||
--spec-draft-device ROCm0 \
|
--spec-draft-device ROCm0 \
|
||||||
|
|||||||
+17
-11
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Validation test for llama.cpp DFlash+MTP server
|
# Validation test for llama.cpp DFlash server
|
||||||
# Sends a simple prompt and measures generation speed (tokens/sec)
|
# Sends 2 parallel prompts and measures generation speed (tokens/sec)
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
PORT="${LLAMA_PORT:-8080}"
|
PORT="${LLAMA_PORT:-8080}"
|
||||||
@@ -31,7 +31,11 @@ echo ""
|
|||||||
echo "Sending 2 parallel validation prompts..."
|
echo "Sending 2 parallel validation prompts..."
|
||||||
START_TIME=$(date +%s%N)
|
START_TIME=$(date +%s%N)
|
||||||
|
|
||||||
RESPONSE1=$(curl -s \
|
TMP1=$(mktemp)
|
||||||
|
TMP2=$(mktemp)
|
||||||
|
trap "rm -f $TMP1 $TMP2" EXIT
|
||||||
|
|
||||||
|
curl -s \
|
||||||
-X POST "http://${HOST}:${PORT}/v1/chat/completions" \
|
-X POST "http://${HOST}:${PORT}/v1/chat/completions" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{
|
-d "{
|
||||||
@@ -41,9 +45,10 @@ RESPONSE1=$(curl -s \
|
|||||||
\"max_tokens\": ${MAX_TOKENS},
|
\"max_tokens\": ${MAX_TOKENS},
|
||||||
\"temperature\": 0.7,
|
\"temperature\": 0.7,
|
||||||
\"top_p\": 0.95
|
\"top_p\": 0.95
|
||||||
}" &)
|
}" > "$TMP1" &
|
||||||
|
PID1=$!
|
||||||
|
|
||||||
RESPONSE2=$(curl -s \
|
curl -s \
|
||||||
-X POST "http://${HOST}:${PORT}/v1/chat/completions" \
|
-X POST "http://${HOST}:${PORT}/v1/chat/completions" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{
|
-d "{
|
||||||
@@ -53,22 +58,23 @@ RESPONSE2=$(curl -s \
|
|||||||
\"max_tokens\": ${MAX_TOKENS},
|
\"max_tokens\": ${MAX_TOKENS},
|
||||||
\"temperature\": 0.7,
|
\"temperature\": 0.7,
|
||||||
\"top_p\": 0.95
|
\"top_p\": 0.95
|
||||||
}" &)
|
}" > "$TMP2" &
|
||||||
|
PID2=$!
|
||||||
|
|
||||||
wait
|
wait $PID1 $PID2
|
||||||
|
|
||||||
END_TIME=$(date +%s%N)
|
END_TIME=$(date +%s%N)
|
||||||
|
|
||||||
# Extract token counts and timing from responses
|
# Extract token counts and timing from responses
|
||||||
COMPLETION_TOKENS1=$(echo "$RESPONSE1" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['usage']['completion_tokens'])" 2>/dev/null || echo "0")
|
COMPLETION_TOKENS1=$(python3 -c "import json; d=json.load(open('$TMP1')); print(d['usage']['completion_tokens'])" 2>/dev/null || echo "0")
|
||||||
COMPLETION_TOKENS2=$(echo "$RESPONSE2" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['usage']['completion_tokens'])" 2>/dev/null || echo "0")
|
COMPLETION_TOKENS2=$(python3 -c "import json; d=json.load(open('$TMP2')); print(d['usage']['completion_tokens'])" 2>/dev/null || echo "0")
|
||||||
TOTAL_TOKENS=$((COMPLETION_TOKENS1 + COMPLETION_TOKENS2))
|
TOTAL_TOKENS=$((COMPLETION_TOKENS1 + COMPLETION_TOKENS2))
|
||||||
TOTAL_TIME_MS=$(( (END_TIME - START_TIME) / 1000000 ))
|
TOTAL_TIME_MS=$(( (END_TIME - START_TIME) / 1000000 ))
|
||||||
|
|
||||||
if [ "$TOTAL_TOKENS" -eq 0 ]; then
|
if [ "$TOTAL_TOKENS" -eq 0 ]; then
|
||||||
echo "FAIL: No tokens generated or response parse error"
|
echo "FAIL: No tokens generated or response parse error"
|
||||||
echo "Response1: $RESPONSE1"
|
echo "Response1: $(cat $TMP1)"
|
||||||
echo "Response2: $RESPONSE2"
|
echo "Response2: $(cat $TMP2)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user