Commit Graph

3 Commits

Author SHA1 Message Date
Claude
e0fe46a46f arch(CRITICAL): deploy ALL base engine patches — paged_attn, xformers, sequence, scheduler
CCCL segmented_sort.cu AST chain → traced back to base engine zip →
discovered base patch_ops.sh deploys 10+ files we were missing.

Missing patches that caused real failures:
1. paged_attn.py — Triton context_attention_fwd HANGS BI-V100 GPUs permanently.
   Base engine replaces it with _forward_prefix_pytorch pure-PyTorch fallback.
   WITHOUT THIS: GPU hang on any prefix-cached request → timeout → 0 score.

2. patch_xformers_sdpa_seq.py — head_dim=256 > cudnnFlashAttn 128 limit.
   Qwen3.5 uses head_dim=256. Without this bypass, attention crashes.

3. sequence.py — completion_tokens inflation under chunked prefill.
   Bug: get_output_token_ids_to_return(delta=True) with num_new_tokens=0
   returns the ENTIRE prompt. 10K prompt × 3 chunks = 30K false tokens.

4. scheduler.py — num_cached_tokens tracking for prefix caching.

5. mamba_cache.py — GatedDeltaNet state management.

6. patch_model_runner.py — prefix_cache_hit stays True in chunked-prefill
   chunk 2+, causing undersized block_tables and crash.

Also: conditional qwen3_5.py deployment (CCCL JIT pattern) — if Docker
image already has a working qwen3_5.py (with corex integration), don't
overwrite it. Only deploy ours if the image version is missing.
2026-08-08 10:48:01 +00:00
dylanyunlon
821c59500d [CLEANUP] Remove 13 dead patch scripts — only 1 remains (transformers registration)
Removed (replaced by full-file cp in patch_ops.sh):
  - patch_model_runner.py → replaced by model_runner.py (1932 lines)
  - patch_xformers_sdpa_seq.py → replaced by xformers.py (901 lines)
  - patch_xformers_sdpa_seq_kernel.py → was unused
  - patch_xformers_sdpa_batch.py → was unused
  - patch_xformers_sdpa_batch_kernel.py → was unused
  - patch_vllm_qwen3_5.py → replaced by registry.py (455 lines)
  - patch_vllm_tool_parser.py → replaced by tool_parsers_init.py
  - patch_enable_triton.py → was unused
  - patch_head256_triton.py → was unused
  - patch_ixformer_native.py → was unused
  - patch_paged_attention_v2.py → was unused
  - patch_triton_tuning.py → was unused
  - patch_vectorized_decode.py → was unused

Remaining: patch_transformers_qwen3_5.py (1 script, unavoidable — modifies
pip-installed transformers which is version-specific)

Architecture: 13 blind string-replace scripts → 0. All base modifications
are now full-file replacements with complete source context.
2026-08-05 08:39:54 +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