Repository navigation
Conversation
With `--atom-grpc-session`, both gRPC routers send ATOM requests over each instance's Session instead of a Generate call per request: the single path and each relay and chunked leg go through `AtomCalls::start`. A chat first calls `PrepareStructuredOutput` and copies its four derived fields into the request's sampling. Without the flag nothing changes. `atom/mesh/README.md` describes ATOM gRPC workers and the flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 21, 2026
Closed
Closed
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 13/14 of the stack proposed in #3657. No blocking issues.
Why
atomesh sent each request to an ATOM worker on a Generate call of its own, so the per-instance Session carried nothing. A relay request opened one call on P and another on D, where a Session carries every request to an instance on one call.
What changed
--atom-grpc-sessionsetsRouterConfig.atom_grpc_session;GrpcRouter::newandGrpcPDRouter::newbuild their engine with it (GrpcEngine::with_atom_session).AtomCalls::startis the one per-request call: the single path and each relay and chunked leg go through it, over a Generate call by default or the instance's Session with the flag.StructuredOutputcalls PrepareStructuredOutput first and copies its four derived fields into the request's sampling.request_specturns the GenerateRequest into the RequestSpec the Session sends, its kv_transfer_params an engine_v1 Value.AtomStream::openlost its callers and is removed.atom/mesh/README.mddescribes ATOM gRPC workers and the flag.Review focus
Testing
The flag reaches the router config. Over an in-process Session stub, a chat runs after ATOM prepares its structured output, relay runs D once P completes, and chunked runs both legs at once and answers after P.
jasen/atom-grpc-13-mesh-session-routing@ 5a5823c: withatom-engine, 1412 lib and 303 integration tests passed. cargo fmt clean; clippy adds no warning of this PR's code.GPU results
On DeepSeek-V4.1-Flash 6P16D, AgentX at 1,228 concurrent sessions, TTFT over gRPC is at parity with HTTP: it is bound by the prefill queue. No request failed.
GPU numbers
DeepSeek-V4.1-Flash, 6P16D (P TP2 DP2, D TP4 DP4, shared Mooncake Store), AgentX C1228 for 900 s, two runs per configuration, mean of the two. atomesh's prompt encoding came from
ROCm/ATOM#3596(fastokens) and its V4.1 chat render fromROCm/ATOM#3597, neither part of this stack; the stack's code was the integration branch at this stack's part 14.HTTP's two TTFT means were 0.34 s apart, more than either gRPC difference. GSM8K (lm_eval, 1,319 questions, 1P1D, twice each): gRPC 0.930 and 0.929, HTTP 0.927 and 0.930. Prompt token parity between atomesh's render and ATOM's HTTP chat: 59 of 59 (21 GSM8K, 38 AgentX and tool-call prompts).
Follow-ups
none
Stack
ATOM serves
atom.grpc.v1.AtomEnginebeside its HTTP server (token ids in, token ids out, ATOM's P/D flow unchanged), and atomesh routes to ATOM gRPC workers, over a Generate call per request or one Session per instance. Bottom to top:1 and 2 stand alone; 6 to 13 need only part 3 of the Python side; 14 changes both sides of the Session.
Evidence
In
atom/mesh(rustc and clippy 1.100.0), at 5a5823c:Clippy against main cccc96a (warnings matched by message and file):
Against the PR below (part 12):
🤖 Generated with Claude Code