MLX server: prompt cache limit (memory); restart after the T01 test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
@@ -20,6 +20,7 @@ All jobs are detached (parent PID 1). They do not stop when the Claude Code sess
|
||||
| DeepSeek filter W6A (last task G0125) | `xargs python3 -m harness.empirical ... --run-base 15000` | 57246 / 57253 | `runs/emp_deepseek6a.log` | about 18:45 |
|
||||
| DeepSeek filter W7A (11 tasks, budget-60 reruns) | `xargs ... --run-base 17000 (list runs/stage1/w7a.txt)` | 59503 / 59510 | `runs/emp_deepseek7a.log` | about 19:45 |
|
||||
| Night chain | `train/night_chain.sh` | 60017 | `runs/stage1/night_chain.log` | see below |
|
||||
| Server restart with prompt cache limit (after the T01 test; new server PID in the log) | `train/restart_server.sh` | 60447 | `runs/stage1/restart_server.log` | after the T01 test |
|
||||
|
||||
Night chain (`train/night_chain.sh`):
|
||||
1. When W6A ends: starts W7B (13 DeepSeek reruns, list `runs/stage1/w7b.txt`, log `runs/emp_deepseek7b.log`,
|
||||
|
||||
11
train/restart_server.sh
Executable file
11
train/restart_server.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# Restart the MLX server with the prompt cache limit when the T01 test (PID 59414) has ended,
|
||||
# before the night chain starts the baseline. Log: runs/stage1/restart_server.log
|
||||
cd "$(dirname "$0")/.."
|
||||
while kill -0 59414 2>/dev/null; do sleep 20; done
|
||||
echo "$(date '+%F %T') T01 test ended; restart server"
|
||||
kill 59352; while kill -0 59352 2>/dev/null; do sleep 2; done
|
||||
nohup train/serve.sh > runs/stage1/server.log 2>&1 &
|
||||
echo "$(date '+%F %T') new server PID $!"
|
||||
i=0; until curl -s -m 2 http://127.0.0.1:8080/v1/models >/dev/null 2>&1 || [ $i -ge 60 ]; do sleep 5; i=$((i+1)); done
|
||||
echo "$(date '+%F %T') server ready: $(curl -s -m 2 http://127.0.0.1:8080/v1/models | head -c 80)"
|
||||
@@ -1,11 +1,13 @@
|
||||
#!/bin/sh
|
||||
# Serve the base model (no adapter) with mlx_lm.server. Settings: train/README.md.
|
||||
# Usage: train/serve.sh [--adapter-path PATH]
|
||||
# Prompt cache limit: without it the cache grew to 7.9 GB in 15 min (2026-10-03); A4H needs 22 GB.
|
||||
cd "$(dirname "$0")/.."
|
||||
exec train/.venv/bin/mlx_lm.server \
|
||||
--model "$HOME/models/Qwen3.8-27B-4bit" \
|
||||
--host 127.0.0.1 --port 8080 \
|
||||
--temp 0.2 --top-p 0.95 --top-k 20 --min-p 0 \
|
||||
--max-tokens 32768 \
|
||||
--prompt-cache-size 4 --prompt-cache-bytes 6000000000 \
|
||||
--chat-template-args '{"enable_thinking": true, "reasoning_effort": "medium"}' \
|
||||
"$@"
|
||||
|
||||
Reference in New Issue
Block a user