Lvllm / tests
AGENTS.md475 starsChanged 12 days agoApache-2.0View on GitHub
- Test real objects on the lightest real path. Construct vLLM objects with their real constructors; do not stand them in with SimpleNamespace or MagicMock, set private attributes, or patch methods to reach a state. Mock only external services. Pick the cheapest setup that exercises the change: a layer or kernel test does not need vllm_runner, and single-rank parallel state is enough when parallelism is irrelevant. A fix to user-visible behavior needs at least one regression test through LLM (vllm_runner)…
1 other project uses a version of this; 1 new project in the last 4 weeks, against 0 the 4 before.
Adopted by
Surging: 1 new project took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- vllm-project/vllmword for word, first seen Oct 25, 2026
Other versions1 project uses a version of this.
Word for word · 1
- vllm-project/vllm★ 97k100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rust/AGENTS.mdAGENTS.md
- check-api-compatSkill
- ci-fails-buildkiteSkill
- debug-imaSkill
- kernel-microbenchmarkSkill
- model-microbenchmarkSkill
- model-recipesSkill
- pr-checklistSkill
- transformers-upgradeSkill
- triton-kernel-writingSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Show the failure before the fix: When the bug is reproducible, run the new test on the base commit (rebuild if the fix touches csrc/) and …
- Very specific: line 17
Never buy a green CI: Do not add flaky/reruns, retry loops, skip, xfail, lowered thresholds, wider atol/rtol, or deletions to make a test …
- Distinctive: line 23
Deterministic and exact by construction: Use greedy or seeded sampling.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
tests
- Test real objects on the lightest real path. Construct vLLM objects with
their real constructors; do not stand them in with
SimpleNamespaceorMagicMock, set private attributes, or patch methods to reach a state. Mock only external services. Pick the cheapest setup that exercises the change: a layer or kernel test does not needvllm_runner, and single-rank parallel state is enough when parallelism is irrelevant. A fix to user-visible behavior needs at least one regression test throughLLM(vllm_runner) orRemoteOpenAIServer, with real weights when loading is involved. A test that only assertsassert_called*or "no exception" guards nothing. - Show the failure before the fix. When the bug is reproducible, run the new
test on the base commit (rebuild if the fix touches
csrc/) and confirm it fails for the reported reason, then passes with the fix. Paste both commands and the relevant output in the PR; "fails before" without output is not evidence. - Never buy a green CI. Do not add
flaky/reruns, retry loops,skip,xfail, lowered thresholds, wideratol/rtol, or deletions to make a test pass. Find out whether the failure is caused by your change or also happens on main (.buildkite/scripts/rerun-test.sh,docs/contributing/ci/failures.md); the only exception isxfail(strict=True)linking an open issue for a bug on main. - Deterministic and exact by construction. Use greedy or seeded sampling.
Assert equality where the result is exact (a change that must not alter
output is compared against the code it replaces, not another reference), and
keep tolerances as tight as the math allows. vLLM is not batch invariant by default: batch size, chunked
prefill, prefix caching, backend, and TP size can flip greedy tokens, so
compare against a reference with
check_logprobs_close/check_embeddings_close, or requireVLLM_BATCH_INVARIANT=1for exact equality. Never synchronize with a fixedsleep; poll an explicit condition with a timeout, and force race orderings with events. - No personal-account checkpoints. Tests must not load models from
personal Hugging Face accounts; see
docs/contributing/model/tests.md(Model loading) for moving them intovllm-project. - Make sure CI runs it. A test no step in
.buildkite/test_areas/*.yamlselects never runs, which looks like passing. Check that the step'scommandsand pytest markers (core_model,slow_test,distributed) select the test and itssource_file_dependenciescover the changed files; update the step if not. When a command names more than one test path (including--ignore/--deselect), write it as a>-block withpytest -v -son the first line and one path per line, so concurrent PRs adding tests do not conflict on the same line.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

