Skip to content

armgit / sie

Public Imported from GitHub
0

Open-source inference server and production cluster for all the models your agent needs.

perf(models): add a 16-request CUDA-graph H100 profile for Qwen3.8-27B-FP8 (#454)

svonava409fee6709ed
diff --git a/packages/sie_server/models/Qwen__Qwen3.8-27B-FP8.yaml b/packages/sie_server/models/Qwen__Qwen3.8-27B-FP8.yaml
index 02199a1fb..b7d23e48c 100644
--- a/packages/sie_server/models/Qwen__Qwen3.8-27B-FP8.yaml
+++ b/packages/sie_server/models/Qwen__Qwen3.8-27B-FP8.yaml
@@ -183,6 +183,69 @@ profiles:
- "--cuda-graph-max-bs-decode"
- "1"
+ # H100-80GB batch lane: the h100-256k launch shape without speculation,
+ # admitting up to 16 running requests with CUDA graphs captured for every
+ # decode batch size through 16. Speculation stays off so xgrammar enforces
+ # every constrained token, which makes this the concurrent grammar-safe
+ # native-window lane. Measured on one H100 80GB with a ~670-token json_schema
+ # request: 72 tok/s decode at batch 1 against 11.6 on the bare route, and
+ # 148 requests/min at 8 in flight against 44. Standalone so its grammar twin
+ # inherits only this shape.
+ h100-256k-batch:
+ grammar_profile: h100-256k-batch-no-spec
+ max_output_tokens: 32768
+ max_batch_tokens: 262144
+ compute_precision: bfloat16
+ adapter_path: sie_server.adapters.sglang.cuda13:SGLangCuda13Adapter
+ kv_budget_tokens: 262144
+ adapter_options:
+ loadtime:
+ max_seq_length: 262144
+ mem_fraction_static: 0.85
+ served_model_name: Qwen/Qwen3.8-27B-FP8
+ attention_backend: fa3
+ grammar_backend: xgrammar
+ tool_call_parser: qwen3_coder
+ extra_env:
+ SGLANG_JIT_DEEPGEMM_FAST_WARMUP: "1"
+ speculative:
+ enabled: false
+ extra_launch_args:
+ - "--mm-process-config"
+ - '{"image":{"min_pixels":65536,"max_pixels":1003520}}'
+ - "--kv-cache-dtype"
+ - "bfloat16"
+ - "--mamba-ssm-dtype"
+ - "bfloat16"
+ - "--mamba-radix-cache-strategy"
+ - "extra_buffer"
+ - "--disable-overlap-schedule"
+ - "--page-size"
+ - "64"
+ - "--chunked-prefill-size"
+ - "32768"
+ - "--max-prefill-tokens"
+ - "32768"
+ - "--max-running-requests"
+ - "16"
+ - "--cuda-graph-max-bs-decode"
+ - "16"
+ runtime:
+ first_chunk_timeout_s: 900
+ inter_chunk_timeout_s: 30
+ overall_timeout_s: 1800
+ default_sampling:
+ temperature: 0.7
+ top_p: 0.8
+ top_k: 20
+ presence_penalty: 1.5
+ stop_tokens:
+ - "<|im_end|>"
+ # Constrained-decoding identity for the batch lane; identical because the
+ # parent is already non-speculative and grammar-safe.
+ h100-256k-batch-no-spec:
+ extends: h100-256k-batch
+
# H100-80GB thinking: the h100-256k launch shape without speculation, plus
# the qwen3 reasoning parser and the strict-thinking lane so a premature EOS
# cannot leave the answer inside the private reasoning channel. The chat
diff --git a/packages/sie_server/tests/config/test_qwen38_generation_profiles.py b/packages/sie_server/tests/config/test_qwen38_generation_profiles.py
index df8363928..c9613953b 100644
--- a/packages/sie_server/tests/config/test_qwen38_generation_profiles.py
+++ b/packages/sie_server/tests/config/test_qwen38_generation_profiles.py
@@ -1,7 +1,9 @@
from __future__ import annotations
from pathlib import Path
+from typing import Any
+from sie_server.core.grammar_routing import resolve_grammar_serving_model
from sie_server.core.loader import expand_profile_variants, load_model_config
_MODEL_ID = "Qwen/Qwen3.8-27B-FP8"
@@ -51,6 +53,8 @@ def test_qwen38_uses_the_pinned_official_fp8_checkpoint() -> None:
"h200-256k-no-spec",
"rtx-pro-6000-256k",
"rtx-pro-6000-256k-no-spec",
+ "h100-256k-batch",
+ "h100-256k-batch-no-spec",
"h100-256k-thinking",
"h100-256k-thinking-no-spec",
"thinking",
@@ -201,3 +205,63 @@ def test_qwen38_thinking_profiles_are_the_h100_native_shape_without_speculation(
}
assert profile.runtime | {"default_sampling": None} == answer_only.runtime | {"default_sampling": None}
assert profile.kv_budget_tokens == profile.max_batch_tokens == _NATIVE_CONTEXT
+
+
+class _ConfigRegistry:
+ def __init__(self) -> None:
+ self._configs = expand_profile_variants([load_model_config(_MODEL_PATH)])
+
+ def has_model(self, name: str) -> bool:
+ return name in self._configs
+
+ def get_config(self, name: str) -> Any:
+ return self._configs[name]
+
+
+def test_qwen38_h100_batch_profile_is_the_native_no_spec_launch_with_sixteen_graphed_requests() -> None:
+ config = load_model_config(_MODEL_PATH)
+ configs = expand_profile_variants([config])
+ single = config.resolve_profile("h100-256k-no-spec")
+ batch = config.resolve_profile("h100-256k-batch")
+ twin = config.resolve_profile("h100-256k-batch-no-spec")
+
+ assert batch.grammar_profile == "h100-256k-batch-no-spec"
+ assert twin.grammar_profile is None
+ assert twin.loadtime == batch.loadtime
+ assert twin.runtime == batch.runtime
+ assert batch.loadtime["speculative"] == {"enabled": False}
+ assert "disable_cuda_graph" not in batch.loadtime
+ assert batch.adapter_path == _ADAPTER
+ assert batch.kv_budget_tokens == batch.max_batch_tokens == _NATIVE_CONTEXT
+ assert batch.runtime == single.runtime
+
+ # The only launch differences from the single-admission H100 lane: up to
+ # 16 running requests, with decode CUDA graphs captured through batch 16.
+ args = list(batch.loadtime["extra_launch_args"])
+ assert args[args.index("--max-running-requests") + 1] == "16"
+ assert args[args.index("--cuda-graph-max-bs-decode") + 1] == "16"
+ single_args = list(single.loadtime["extra_launch_args"])
+ for flag in ("--max-running-requests", "--cuda-graph-max-bs-decode"):
+ args[args.index(flag) + 1] = single_args[single_args.index(flag) + 1]
+ assert args == single_args
+ assert batch.loadtime | {"extra_launch_args": None} == single.loadtime | {"extra_launch_args": None}
+
+ for name in ("h100-256k-batch", "h100-256k-batch-no-spec"):
+ variant = configs[f"{_MODEL_ID}:{name}"]
+ assert variant.tasks.generate is not None
+ assert variant.tasks.generate.context_length == _NATIVE_CONTEXT
+ assert variant.tasks.generate.max_output_tokens == _NATIVE_OUTPUT_CAP
+ assert variant.tasks.generate.chat_template_kwargs == {"enable_thinking": False}
+
+
+def test_qwen38_h100_batch_grammar_requests_stay_on_the_batch_launch() -> None:
+ registry = _ConfigRegistry()
+
+ assert (
+ resolve_grammar_serving_model(registry, f"{_MODEL_ID}:h100-256k-batch")
+ == f"{_MODEL_ID}:h100-256k-batch-no-spec"
+ )
+ assert (
+ resolve_grammar_serving_model(registry, f"{_MODEL_ID}:h100-256k-batch-no-spec")
+ == f"{_MODEL_ID}:h100-256k-batch-no-spec"
+ )