interplane-mv
INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority.
Brought by drakestapleton
interplane-mv / qualification / captures / qwen35-sglang / NOTES.md
| 1 | # Qwen3.5 9B on SGLang: captured outputs and qualification (2026-10-04) |
| 2 | |
| 3 | Facts only. Each `NAME.json` holds `request` (exact body), `endpoint`, `status`, `response` (exact raw body; for streams the SSE text), `sha256_response`. Requests are the Ollama capture bodies (qualification/captures/qwen35-ollama) with only `model` changed, temperature 0, seed 42, same 4-tool set. Names mirror the Ollama set; extras: `*-noparser` (server relaunched without `--tool-call-parser`), `f*-completions-*` (raw prompt via `/v1/completions`, replaces Ollama `/api/generate raw`), `f*-chat-text-*` (the same instruction as a chat system message, no `tools`), `k1`, `k2` (the Rust probe's own prompts). |
| 4 | |
| 5 | ## Environment |
| 6 | - DGX Spark GB10 (compute capability 12.1), driver 580.173.02, CUDA 13.0, Linux 7.0.0-1019-nvidia aarch64. Host has no pip SGLang; Option 2 used. |
| 7 | - SGLang: Docker `lmsysorg/sglang:latest-cu130` (multi-arch, arm64 variant pulled), image digest sha256:06e4f2ed21afde4ff513cda65070124e727ba23ccaeff7712b8c40e1097d611f, in-image `sglang 0.5.20`, torch 2.13.0+cu130 (CUDA 13.0). Attention backend auto-selected: flashinfer. No source build, no resolver problems (Option 1 was not attempted). |
| 8 | - Model: `Qwen/Qwen3.5-9B` safetensors bf16, HF revision c202236235762e1c871ad0ccb60c8ee5ba337b9a, 4 shards, 19 GB on disk (`hf download`). Official `chat_template.jinja` is used (no custom template). |
| 9 | - Launch: `docker run -d --name sglang-qwen35 --gpus all --network host --ipc=host -v ~/.cache/huggingface:/root/.cache/huggingface lmsysorg/sglang:latest-cu130 python3 -m sglang.launch_server --model-path Qwen/Qwen3.5-9B --port 18082 --host 127.0.0.1 --reasoning-parser qwen3 --context-length 32768 --mem-fraction-static 0.5 --tool-call-parser qwen3_coder`. |
| 10 | - Parser names offered by this build: tool-call `{auto,apertus2509,cohere_command4,deepseekv3,deepseekv31,deepseekv32,deepseekv4,dots,glm,glm45,glm47,gpt-oss,k2_horizon,kimi_k2,kimi_k3,lfm2,ling3,llama3,mimo,minicpm5,mistral,muse,poolside_v1,pythonic,qwen,qwen25,qwen3_coder,spark25,step3,step3p5,minimax-m2,minimax-m3,nanbeige,trinity,interns1,hermes,hunyuan,gigachat3,gemma4,inkling}`; reasoning `{...,qwen3,qwen3-thinking,...}`. There is no `qwen35` name; `qwen3_coder` was chosen because it is the XML `<function=...><parameter=...>` form the Ollama captures show Qwen3.5 emitting. `auto` and the other names were NOT tried (UNVERIFIED which of them also work). |
| 11 | - Other jobs were on the GPU during runs (Ollama, a llama.cpp lane): decode was ~7 tok/s at times, so durations in reports are not a benchmark. |
| 12 | |
| 13 | ## Probe results (reports/qwen35-9b-sglang-0.5.20.probe.json and .probe.rust.json) |
| 14 | Python: 14/14 PASS, all four profiles compatible. Rust: 12 PASS, `chat.basic` FAIL, `json.structured` FAIL; `interplane.core.0.1` incompatible, the other profiles compatible. Verdicts differ because the two probes send different prompts, not because of a harness bug: the Rust chat.basic prompt ("Reply with one short sentence about the sea.", max_tokens 2048) makes Qwen3.5 think for the whole budget (k1: finish_reason length, content "", 2048 reasoning tokens). Same for the Rust JSON prompt (k2). Python's prompts ("Reply with the single word: ready", "...answer set to 42") finished within budget. A rerun of the Rust pair reproduced both FAILs (first Rust run timed out on json.structured at 300 s under GPU contention; rerun at 900 s got "content is not valid JSON"). Probe is descriptive; the server was not modified between probe runs. |
| 15 | |
| 16 | ## Matrix (same-prompt captures, parser on unless stated) |
| 17 | | Capability | Verdict | Evidence | |
| 18 | |---|---|---| |
| 19 | | chat.basic | PASS (Python) / FAIL (Rust, reasoning budget) | j1-basic; k1 | |
| 20 | | tools.openai (native tool_calls) | PASS | 01-native: one tool_call read_file `{"path": "README.md"}`; ids `call_<24hex>`; content `"\n\n"` | |
| 21 | | tools.parallel | PASS | 02-native-multi: 2 tool_calls | |
| 22 | | tools.text_qwen35 | PASS: XML passes through as content, not converted | f1-chat-text-one-call, f1-completions-one-call; same with parser off (`-noparser`) | |
| 23 | | tool replay | PASS | g1-native-result-replay (final answer quotes result); g2-completions-result-replay | |
| 24 | | streaming | PASS, fragmented tool call | h1-streaming: 48 reasoning chunks then 4 tool_call chunks (name with empty arguments first, then argument pieces), finish `tool_calls`; h2 (reasoning_effort none): 6 chunks, no reasoning | |
| 25 | | unknown tool | PASS (no tool call) | 04-native-unknown: prose listing available tools | |
| 26 | | malformed args | FAIL-CLOSED at request: HTTP 400 "Assistant tool call function.arguments must be valid JSON." | m1-malformed-arguments-replay (a replayed assistant call with invalid JSON; model-side malformed output was not elicited, UNKNOWN) | |
| 27 | | reasoning | PASS, field `reasoning_content` | 05a (not `reasoning` as on Ollama) | |
| 28 | | reasoning.disable | PASS via `chat_template_kwargs.enable_thinking=false` | 05d, 05d2; also `reasoning_effort:"none"` works (05c, h2); `think:false` ignored (05b still reasons); `separate_reasoning:false` does NOT disable, it moves reasoning text into `content` (05e); with enable_thinking false plus separate false: no reasoning (05f) | |
| 29 | | json.structured | PASS (Python) / FAIL (Rust, reasoning budget) | probe reports; k2 | |
| 30 | | context 8k/16k/32k | PASS (Python and Rust) | probe reports | |
| 31 | | models.list | PASS | i1-models | |
| 32 | |
| 33 | ## Behavior specific to SGLang (not Ollama/llama.cpp) |
| 34 | - With `--reasoning-parser qwen3` the answer `content` begins with `"\n\n"` (03: `"\n\nThe capital of France is Paris."`), and tool-call responses have content `"\n\n"`, not `""`. |
| 35 | - Tool-call parser only acts when the request has `tools`. Without `tools` (f1-chat-text) the `<tool_call>` XML stays in content even with the parser on. With the parser off and `tools` present, the XML also stays in content and `tool_calls` is null (01-native-noparser, 02-native-multi-noparser). |
| 36 | - Raw `/v1/completions` returns the model's own `<think>\n\n</think>\n\n` prefix inline (f1-completions); with the prompt ending `<|im_start|>assistant\n` the model sometimes opens `<think>` itself (g2). |
| 37 | - f5 (unknown tool asked in raw form) differs per path: completions emitted a `list_dir` XML call after prose; chat text refused in prose. |
| 38 | - Determinism across repeated runs was not tested. |
| 39 | |
| 40 | ## Limits |
| 41 | - Only `qwen3_coder` was tested for tool parsing; not the `qwen`/`qwen25`/`hermes`/`auto` names. |
| 42 | - bf16 weights, not the Q4_K_M of the Ollama capture, so differences vs Ollama mix engine and quantization effects. |
| 43 | - Server left running: container `sglang-qwen35`, host port 127.0.0.1:18082 (container PID 290206 at the time of writing, with `--tool-call-parser qwen3_coder`). |
| 44 | |
| 45 | ## Update 2026-10-04: Rust probe after alignment is 14/14 |
| 46 | The Rust 12/14 result in "Probe results" and the two Rust FAIL cells in the matrix above describe |
| 47 | the run made before the probes were aligned. After alignment (identical request bodies in the Rust |
| 48 | and Python probes), the Rust probe was rerun against the same SGLang server and passed 14/14, all |
| 49 | profiles compatible. That report is `qualification/reports/qwen35-9b-sglang-0.5.20.probe.rust.json`, |
| 50 | merged to main in e34160f. The earlier 12/14 report is kept as |
| 51 | `qualification/reports/qwen35-9b-sglang-0.5.20.probe.rust.pre-alignment.json`. Rust and Python |
| 52 | now agree on this backend (`STATUS.md`). |