PR #5267 ยท based on main ยท permalinks pinned to head 67c4c0c0 (this PR) and base 488ff3b9
AsyncLLM client; the engine that schedules and runs the GPU is one separate process they all share. The tokens a call has decoded so far are kept in the frontend's own copy of vLLM's request state, so a cut reads them there without asking the engine. That is why a call's tokens live only in the frontend that took its request. Dotted words have a short explanation: hover or tap them.token_capture.control_timeout_s for it.Gym's list names 3 calls: c1 is running on frontend A, c2 is running on frontend B, and c3 has not reached the worker yet. Gym's request lands on B. Nobody chooses this: all frontends wait on one shared socket, and the operating system hands each new connection to whichever frontend accepts it first.
Count the โ marks: one frontend logs 1 (the call not yet arrived), two frontends log 4, because each warns about the call the other one holds. With 4 frontends and about 230 live calls, that is about 690 warning lines per cut, and the one real "not arrived yet" warning is lost among them. The receipt is still right: the merge turns a call nobody saved into a failure ack.
| Question | Answer from the code |
|---|---|
| Where do the two paths meet? | Every frontend runs the same run_cut as one frontend did before. The new part is only around it: FrontendCutFanOut starts the cuts, and merge_cut_receipts merges them. That merge moved here from the Dynamo frontend, which already fans one cut out over several engines the same way. |
| Can the peer call go to another node? | No. Each frontend binds its private port on 127.0.0.1 (L1801). All frontends of a worker live on one node. |
| Who learns the peers' ports? | At startup the owner frontend collects every frontend's private URL and sends the full list to all of them (L821-L826), so any frontend can lead a cut. |
| What else is now per frontend? | Cut settings go to child frontends with the capture command (L1069), so each child also starts its own prefix-writer actor (1 CPU). flush also reaches children (L2315), and prefix counts are summed over frontends (L2328). |
Before (one frontend only)
# the frontend's serving event loop def checkpoint_generation_cut(inventory): check bearer token return run_cut(inventory) # unknown call โ failure ack + โ
After
# any frontend's serving event loop def checkpoint_generation_cut(inventory): check bearer token if not peers: # 1 frontend: path unchanged return run_cut(inventory) deadline = now + control_timeout_s # one deadline for every frontend cuts = [task(run_cut(inventory) โ saved acks), # mine; โ for every call I don't hold (C5) *[task(POST url/frontend) for url in peers]] # each peer runs the same run_cut done, late = wait(cuts, until=deadline) # all at once cancel(late); warn "N of M frontends late" # their calls regenerate return merge_cut_receipts(inventory, done) # unsaved call โ failure ack
Real code: checkpoint_generation_cut, FrontendCutFanOut.run_cut, frontend_generation_cut.
media_family to child frontends, which VLM capture needs, and test that the forwarded settings match the function (C1). Share one fan-out helper with Dynamo, so one slow frontend can't fail the whole cut (C7, with a worked draft). Add a CI run with 2 frontends (C2). Bring the description and benchmark up to this design (C6).C6 โ description + benchmark ยท generation_cut_route.py:156 C5 โ false warnings ยท generation_cut_route.py:205 C1 โ media_family + settings test ยท vllm_worker_async.py:1073 C7 โ one shared fan-out helper ยท generation_cut_route.py:176 C2 โ CI run with 2 frontends ยท nemo-gym-integration.md:84
These links open for others once the review is published.