Skip to content

feat(concurrency): concurrent paged serving - #594

Merged
davide221 merged 1 commit into
Luce-Org:mainfrom
Graffioh:codex/concurrent-paged-serving
Aug 17, 2026
Merged

davide221 merged 1 commit into
Luce-Org:mainfrom
Graffioh:codex/concurrent-paged-serving

Conversation

@Graffioh

@Graffioh Graffioh commented Aug 10, 2026 •

Copy link
Copy Markdown
Collaborator

Dependency

Builds on #555, which provides the paged K/V allocator, paged-attention operator, and single-request Qwen paged-decode foundation.

Summary

Adds concurrent paged serving for Qwen behind the existing paged-attention path.

  • Introduces model-neutral SeqEngine, StepPlan, and StepResult contracts.
  • Adds scheduler-owned admission, fair automatic prefill distribution, request retirement, cancellation handling, and slow-client buffering.
  • Derives idle and mixed prefill capacity from engine-advertised limits instead of exposing scheduler-internal token-budget flags.
  • Batches live Qwen decode rows and supports fused prefill/decode lowering.
  • Stores recurrent state per sequence with explicit row-to-slot mapping.
  • Reserves prompt capacity atomically and derives paged-K/V capacity from available memory.
  • Adds host, kernel, contract, and end-to-end parallel-serving coverage.
  • Extends CI to exercise concurrent-serving kernels while retaining current DeepSeek4 coverage.

Impact

Multiple requests can share one Qwen backend without run-to-completion serialization. Slot lifecycle, paged K/V ownership, recurrent state, sampling state, and response delivery remain isolated per request.

The normal serving interface stays small: users select maximum concurrency and may override K/V pool capacity, while the engine supplies appropriate idle and mixed prefill limits automatically.

Validation

  • git diff --check
  • test_seq_batch_plan: 41 checks passed
  • Full HIP test_server_unit target built successfully for gfx1151
  • Focused server configuration and /props tests passed
  • CUDA configuration from current main
  • Focused CUDA build progressed through the modified core and concurrent-serving kernel sources without errors; the full GPU template build was not completed locally

TODO future

  • shared paged prefixes

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 64 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread server/src/server/scheduler.cpp Resolved
Comment thread server/src/server/server_main.cpp Resolved
Comment thread server/src/common/seq_slot_manager.cpp Resolved
Comment thread server/CMakeLists.txt Resolved
Comment thread server/src/common/backend_args.h Resolved
Comment thread server/src/common/seq_step_validation.h Resolved
Comment thread server/test/test_client_send_buffer.cpp Resolved
Comment thread server/test/seq_engine_contract.h Resolved
@Graffioh
Graffioh force-pushed the codex/concurrent-paged-serving branch 3 times, most recently from 7a84ce1 to e785eeb Compare August 10, 2026 12:25
Comment thread README.md Resolved
@Graffioh
Graffioh force-pushed the codex/concurrent-paged-serving branch 6 times, most recently from 09e7938 to 7270fd0 Compare August 11, 2026 09:13

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 67 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread server/src/qwen35/graph_builders.cpp Resolved
Comment thread server/src/server/http_server.cpp Resolved
Comment thread server/src/server/server_main.cpp Resolved
Comment thread server/src/qwen35/qwen35_backend.h Resolved
Comment thread server/src/internal.h Resolved
Comment thread server/test/test_batched_gdn.cpp Resolved
Comment thread server/src/server/server_main.cpp Resolved
Comment thread .github/workflows/ci.yml Resolved
@Graffioh
Graffioh force-pushed the codex/concurrent-paged-serving branch 2 times, most recently from b7cfd24 to 7eae5fe Compare August 14, 2026 14:05
@Graffioh Graffioh changed the title feat(serving): concurrent paged serving feat(concurrency): concurrent paged serving Aug 14, 2026
@davide221
davide221 force-pushed the codex/concurrent-paged-serving branch from 7eae5fe to 3803f50 Compare August 17, 2026 10:03
@davide221
davide221 force-pushed the codex/concurrent-paged-serving branch from 3803f50 to e120140 Compare August 17, 2026 10:09
@davide221
davide221 merged commit 00fff06 into Luce-Org:main Aug 17, 2026
7 of 9 checks passed
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.

2 participants