Skip to content

feat(qwen35): launch only on the step contract - #981

Open
xiaguan wants to merge 1 commit into
mainfrom
feat/qwen35-step-contract
Open

feat(qwen35): launch only on the step contract#981
xiaguan wants to merge 1 commit into
mainfrom
feat/qwen35-step-contract

Conversation

@xiaguan

@xiaguan xiaguan commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Qwen3.5 ModelLine::launch returns LaunchedEngine::Stepped only; Qwen35Scheduler implements submit/step/metrics. This crate no longer has a dual EngineHandle path.
  • Tests rewritten onto Engine / EngineHarness; crate-internal scheduler tests talk the contract only.
  • GPU: PEGAINFER_TEST_MODEL_PATH=/data/models/Qwen3.5-4Be2e_scheduler + sampling_behavior + chunked_prefill: 4 passed, 1 ignored (TP2, one GPU). e2e load aligned to 8 slots (HEAD already scheduled at 8; load was still MAX_BATCH=64 and OOM'd 16GB).
  • Lib tests 90 passed / 7 ignored; clippy -D warnings --all-targets passed.
  • CUDA/cuBLAS bind on first step of the driver thread; overlap wait stays inside step.
  • Frontend legacy modules are not deleted (glm52/kimi/dsv2/gemma4 still Handle).

Test plan

  • cargo test --release -p pegainfer-qwen35 --features qwen35 --lib
  • cargo clippy --release -p pegainfer-qwen35 --features qwen35 --all-targets -- -D warnings
  • GPU gates with PEGAINFER_TEST_MODEL_PATH=/data/models/Qwen3.5-4B: e2e_scheduler, sampling_behavior, chunked_prefill
  • serving_tp2 when 2 GPUs are available (ignored on one GPU)

Made with Cursor

Cut Qwen3.5 off EngineHandle/TokenEvent so ModelLine::launch returns
LaunchedEngine::Stepped and Qwen35Scheduler owns submit/step/metrics.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 83c128e09f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +165 to +166
Ok(Engine {
schedulers: vec![spawn_scheduler("qwen35-scheduler", scheduler)],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore the scheduler startup handshake

When CUDA context binding or decode GEMM tuning fails, spawn_scheduler returns immediately and start_with_capacity still returns Ok(Engine) before bind_if_needed runs on the driver thread. The driver then exits asynchronously, but the stepped bridge can still register and allow HTTP to bind, so startup appears successful and requests fail instead of the launch being rejected as before. Preserve a startup result channel or otherwise wait for the driver's initial bind/tune before returning the engine.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant