Commit Graph

6 Commits

Author SHA1 Message Date
Claude
e0344b1730 fix(critical): disable thinking for tool_call requests — fixes d03_tool_call FAIL
Root cause: When tool_choice=auto + tools present, the model enters
<think>...</think> mode by default. On BI-V100 hardware, decode is slow
enough that thinking consumes the entire max_tokens budget, and the model
finishes (finish=stop) before ever emitting <tool_call> XML.

Sub168 reference: d03 in 2.12s with tools=1, finish=tool_calls
Our sub509: d03 in 49.04s with tools=0, finish=stop — FAIL

Fix: Two-layer defense:
1. protocol.py normalize_messages: when tools active + tool_choice=auto
   and thinking not explicitly set, auto-set enable_thinking=False
2. qwen3coder_tool_parser.py adjust_request: same logic as defense-in-depth
3. baseline.muh synced with actual computility-run.yaml
2026-08-07 07:45:28 +00:00
Claude
2c353da28b fix(protocol): reduce HTTP 400 errors for replay — accept tool_choice=none + extra fields
1. tool_choice='none' now accepted per OpenAI spec (strip and continue).
   Previously raised ValueError, causing 400 on replay requests.

2. Pydantic extra='forbid' → extra='ignore'. Real-world replay requests
   from Tencent API contain fields like service_tier, store, metadata,
   reasoning_effort etc. that our model doesn't declare. forbid rejects
   them all; ignore silently drops them.

Sub 168 had 77 http_400 errors in replay — these two fixes should
eliminate most of them, improving successful request count and score.

CCCL tuning_transform.cuh pattern: accept all valid input configurations
gracefully (policy_selector handles unknown cc values with fallback).
2026-08-07 07:12:35 +00:00
Claude
cbd1f08a3e fix(protocol): clamp max_tokens to available context — fix t3_max_tokens_max HTTP 400
When max_tokens >= max_model_len, vLLM engine rejects the request.
Clamp to (max_model_len - prompt_tokens) in both to_sampling_params
and to_beam_search_params so oversized max_tokens values degrade
gracefully instead of returning HTTP 400.

CCCL logical.cu pattern: handle boundary conditions (empty range,
overflow) gracefully instead of hard-failing.
2026-08-07 07:07:40 +00:00
Claude
16f0b30d2e fix(critical): 3 bugs causing 0.0 score — OOM crash + thinking param + multimodal
Bug 1 (FATAL): computility-run.yaml max-model-len 256000 → 131072,
gpu-memory-utilization 0.95 → 0.90, max-num-batched-tokens 4096 → 8192.
Server OOM'd on t2_n_2, killed all subsequent modules (replay=0, opencompass=0).

Bug 2 (functional): protocol.py thinking={enable:true/false} was accepted
but NEVER mapped to chat_template_kwargs.enable_thinking. Qwen3 template
never received the parameter → t1a, t1c, d07, d10 all FAIL.

Bug 3 (functional): chat_utils.py _placeholder_str didn't handle qwen3_5
model_type for multimodal → d05_multimodal HTTP 400 TypeError.

Expected: functional pass rate 0.41 → 0.90+, server stays alive for all
4 modules, total score 0.0 → 60000+ (matching reference sub 168).
2026-08-07 07:05:40 +00:00
dylanyunlon
539fe7745b fix(protocol): accept max_completion_tokens + thinking + tool_calls messages
CCCL test_namespace_wrapped.cu pattern: accept alternate names for same concept.

Three fixes from competition evaluator log analysis (submission 168/500):

1. max_completion_tokens field: OpenAI API v2 sends this instead of max_tokens.
   Evaluator sends values 8192/32768/65536. Previously rejected with HTTP 400
   'Extra inputs not permitted'. Now accepted and mapped to max_tokens.

2. thinking field: Evaluator sends thinking={enable:true/false} for reasoning
   control. Previously rejected as extra input. Now accepted as Optional[dict].

3. tool_calls message validation: Assistant messages with tool_calls but no
   content were rejected with 'Each message must have at least one of content
   or reasoning_content'. Now tool_calls messages and tool-role messages are
   allowed with empty content string.

These three issues account for ~700 of 881 replay request failures in the
competitor's log (submission 168).
2026-08-07 06:46:07 +00:00
dylanyunlon
ef6abf3dc7 [DEPLOY] Complete submission: baseline + all optimizations
Adds ALL files needed for Dockerfile build:
  - qwen3_6_scripts/ (baseline patches + our optimizations)
  - vllm/ (full vllm package)
  - paged_attention_v2_pytorch.py (V2 with single-bmm optimization)
  - Dockerfile + computility-run.yaml

Our optimizations vs baseline:
  1. paged_attn.py: pre-gathered context KV (eliminates 194 gather calls),
     Triton try/fallback, V2 heuristic, threshold 32K→64K
  2. paged_attention_v2_pytorch.py: fills NotImplementedError,
     single-bmm Phase 1 (195 launches → 3)
  3. patch_enable_triton.py: HAS_TRITON=True with safety fallback
  4. patch_triton_tuning.py: BLOCK=64, NUM_WARPS=4 for BI-V100
  5. computility-run.yaml: gpu-memory-utilization 0.9→0.95,
     max-num-batched-tokens 8192→16384

This repo can now be submitted to dev.modelhub.org.cn as-is.
2026-07-30 16:06:20 +00:00