Repository navigation
Agent race page: granite-switch SR against stock vLLM LoRA - #156
Draft
AlonMalach wants to merge 1 commit into
Draft
AlonMalach wants to merge 1 commit into
AlonMalach wants to merge 1 commit into
Conversation
docs/agent_race.html replays recorded races between two ways of serving agents that switch adapters, on one GPU: granite-switch's Shadow Residual, whose K/V come from the base model so a switch needs no new request, and stock vLLM serving the same 64 adapters as LoRAs, which ends the request, waits the round trip to the agent and prefills the context again at every switch. Like docs/race_live.html, it opens straight from disk: its five races are embedded in it. Granite 4.1 3B at b7e5421, one A100-80GB, vLLM 0.26.0: the paper's ReAct agents, classic5, 64 agents, 16 at a time, 128-1,024 tokens SR 90.4 s stock vLLM 282.4 s 3.1x fixed steps, 16 agents, 512 SR 28.4 s 91.8 s 3.2x fixed steps, 64 agents, 512 SR 114.4 s 365.0 s 3.2x fixed steps, 64 agents, 1,024 SR 129.1 s 747.7 s 5.8x fixed steps, 64 agents, mixed SR 89.4 s 335.9 s 3.8x The page opens on the ReAct race: the outcome, why (prompt tokens computed again, requests, context already cached), its settings, a track per lane, and the race. The rest is behind buttons: how it works (the agent as a state machine, its steps, each lane at a switch), the models, the metrics, and the other races. docs/generation/generate_race_diagram.py draws the page's diagrams, and writes them as images of their own (docs/media/agent_race_*.svg). The code that runs and records races stays with the adapter benchmark, on feature/adapter-benchmark, whose harness it runs on; docs/AGENT_RACE.md says so. .pre-commit-config.yaml: the page is exempt from the 500 KB file-size check, as uv.lock is: it is about 7 MB because its races are embedded. Signed-off-by: AlonMalach <alonmalach@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This branch has not been deployed
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.
What this adds
A race page,
docs/agent_race.html: agents that switch adapters as they work, on one GPU, served two ways and replayed side by side. Like the ALORA-vs-LoRA race (docs/race_live.html), it opens straight from disk: its five races are embedded in it.gs-sr-vllmlora-vllmThe page opens on the demo race: the paper's ReAct agents (above), 64 per lane, 16 at a time, 128 to 1,024 tokens each. It shows the outcome, three numbers on why, the race's settings, a track per lane, and the race:
SR finished 3.1× sooner. Everything else is behind buttons: how it works (the experiment, its diagrams, what an adapter switching (rtt) takes), the models (each lane's base model, adapters, rank and modules), the metrics, and four more races.
The five races
Granite 4.1 3B at b7e5421, one A100-80GB, vLLM 0.26.0:
The fixed-steps agents are the adapter benchmark's switching workload: 32-token steps, a new adapter at each, a tool call after every 256 tokens.
What the page shows that the runs do not do: SR is shown switching on the same schedule as stock vLLM. The switch itself is not implemented yet, so the runs kept one adapter per agent; on the GPU, SR costs the same either way, because its K/V come from the base model. The page says so.
What is and isn't in this PR
docs/media/agent_race_*.svg), their generator (docs/generation/generate_race_diagram.py, which reproduces them byte for byte), anddocs/AGENT_RACE.md.feature/adapter-benchmark(PR Agent race: granite-switch SR against stock vLLM LoRA, agents switching adapters #145);docs/AGENT_RACE.mdsays where it lives.docs/, so this page is opened from a clone..pre-commit-config.yaml: the page is exempt from the 500 KB file-size check, asuv.lockis: it is about 7 MB because its races are embedded.CLAUDE.md:docs/AGENT_RACE.mdin the documentation list.Testing