arch(cccl): match Sub168 proven config + bench.py timeout pattern

CCCL sources read as design input:
- group_by.cuh: static vs dynamic unit_count → match proven config
- bench/bench.py: timeout + cache + graceful failure → cap default tokens
- transform_iterator.cu: lazy transform pipeline → message preprocessing

Changes:
1. computility-run.yaml: match Sub168's proven config exactly:
   - max-model-len: 100000 (not 32768, Sub168 used 100000 successfully)
   - Remove --max-num-batched-tokens (Sub168 didn't use it)
   - Remove --enable-chunked-prefill (Sub168 didn't use it)
   - Keep: max-num-seqs=1, gpu-mem=0.9, enable-prefix-caching

2. serving_chat.py: CCCL bench.py timeout pattern
   - Cap ALL requests without explicit max_tokens to 8192
   - Cap tool_call requests to 2048
   - Prevents NaN-damaged model from generating 99K tokens
   - Sub168 generates 139-2497 tokens per request
This commit is contained in:
project6-dev
2026-08-07 10:02:53 +00:00
parent 3342d18bcc
commit 1ba0dd3966
2 changed files with 13 additions and 18 deletions

View File

@@ -8,7 +8,7 @@ command:
- --served-model-name - --served-model-name
- llm - llm
- --max-model-len - --max-model-len
- '32768' - '100000'
- --gpu-memory-utilization - --gpu-memory-utilization
- '0.90' - '0.90'
- --trust-remote-code - --trust-remote-code
@@ -16,8 +16,6 @@ command:
- '4' - '4'
- --max-num-seqs - --max-num-seqs
- '1' - '1'
- --max-num-batched-tokens
- '4096'
- --disable-log-requests - --disable-log-requests
- --disable-frontend-multiprocessing - --disable-frontend-multiprocessing
- --enforce-eager - --enforce-eager
@@ -27,7 +25,6 @@ command:
- --reasoning-parser - --reasoning-parser
- qwen3 - qwen3
- --enable-prefix-caching - --enable-prefix-caching
- --enable-chunked-prefill
- --dtype - --dtype
- half - half
env: env:

View File

@@ -304,20 +304,18 @@ class OpenAIServingChat(OpenAIServing):
default_max_tokens = self.max_model_len - len( default_max_tokens = self.max_model_len - len(
prompt_inputs["prompt_token_ids"]) prompt_inputs["prompt_token_ids"])
# CCCL thread_reduce pattern: small request fast path. # CCCL bench.py timeout pattern: cap default_max_tokens.
# For tool_call requests, the expected output is just # When user doesn't specify max_tokens, default is
# <tool_call><function=name><parameter=...>...</tool_call> # max_model_len - prompt_len which can be ~99K tokens.
# which is typically <500 tokens. Capping default_max_tokens # NaN-damaged model generates endless garbage. Competitor
# prevents the model from generating 99900 tokens of garbage # Sub168 generates 139-2497 tokens per request.
# when NaN-damaged weights produce non-terminating output. # Cap tool_call at 2048 (XML is <500 tokens), others at 8192
# Only apply when user didn't explicitly set max_tokens. # (matches case_truncation requirement for full output).
if (_tool_call_active if request.max_tokens is None and default_max_tokens > 8192:
and request.max_tokens is None if _tool_call_active:
and default_max_tokens > 2048): default_max_tokens = min(default_max_tokens, 2048)
default_max_tokens = min(default_max_tokens, 2048) else:
logger.info( default_max_tokens = min(default_max_tokens, 8192)
"Tool call fast path: capping default_max_tokens to %d",
default_max_tokens)
if request.use_beam_search: if request.use_beam_search:
sampling_params = request.to_beam_search_params( sampling_params = request.to_beam_search_params(