Repository navigation
Commit bb1be4f
committed
[TRTLLM-16460][feat] trtllm_modeling_v2: isolated roles and steered operators, features wait for the core, multi-node sessions, prior art first, disagg proven by the tree's own test, tune after onboarding
How a run executes. Workers ran with the user's plugins and skills, ended
their turn BLOCKED while a job queued, and built feature work on a core
nobody had seen boot; operators steered by flooding the planner; a session
could not span nodes; and the workers' source rule kept them from the tests,
targets, kernel libraries and other engines that had solved their task.
Disaggregation was proven by a witness whose second leg each run had to
write, rebuilding a launcher the engine already ships; a KV-dtype variant
needed an anchor no reference implementation can measure; and the tune
campaign raced the onboarding it was meant to follow.
Roles and operators
- Roles load the run's own skills only. BackendConfig.plugins=False starts
Codex with features.plugins and features.apps off; preflight's agent probe
records the skills each backend's session loads, every role disables those
the run does not ship, and the probe record keeps the list for a resumed
run.
- A job waiting in the spool is not the site's failure: the GPU-work section
and the BLOCKED decisions say to work on and poll. A reopened task whose
branch holds no commit the integration head lacks moves to that head;
uncommitted edits stay.
- `feedback` refuses a message over 1200 characters (evidence goes in a file
it names). A message rides with the planner's next turn or the event
window, `--now` wakes a turn at once, and one still waiting is read before
the run is delivered. The README says the operator steers only through
feedback and never cancels the run's own jobs.
- Until a core boot check passes, the orchestrator holds back every assemble
or feature task whose ref is a feature unit or a variant; kernel and
investigate tasks are not held. The planner prompt says so.
- The stall cap's help and docstrings say what resets it: a task done, a
change landed or a contract check turning green.
Sizing and nodes
- environment.gpu_memory_gib states each device's memory. The intake lint
reads the checkpoint's weight bytes (its safetensors index, else its
files) and the fewest devices one engine's weights fit on (at most 60% of
each device): member-too-narrow names a member below that width,
disagg-placement (was disagg-two-nodes) whether disaggregation's two
engines fit the nodes one gates session holds, and session-nodes-unneeded
(info) a multi-node session no check needs.
- A session of `nodes: N` is one allocation running its entry on each node,
a watcher of the spool on every one. A job submitted with `--nodes N`
(header `nodes=N`) holds N whole nodes of one allocation: the admitting
watcher leads and records N-1 live peers, each drains and stops admitting
GPU work, and once all are ready every node runs the script under
MV2FLOW_JOB_NODES, MV2FLOW_JOB_NODE_RANK, MV2FLOW_JOB_HOSTS and
MV2FLOW_JOB_MASTER. A failed part stops the others, a lost node fails the
job, and the receipt waits for every part and names the first that
failed. One multi-node job holds a spool's nodes at a time.
Prior art first
- A packaged skill, trtllm-modeling-v2-features, maps block reuse, chunked
prefill, disaggregation, KV-cache dtype, CUDA graphs and the overlap
scheduler, multimodal inputs and speculative decoding: what the engine
owns and what the target must honour, where the code and tests are, a
testing ladder from CPU checks to the flow's gates, and each proof's blind
spots. Paths and symbols only; a test holds every path it names to the
tree. The feature tag loads it.
- Every worker is sent to the prior art before writing: TensorRT-LLM's unit,
accuracy and perf tests (reproduce with one test through the spool, and
start from their configurations rather than a new launcher, server,
transport or harness), the ModelingV2 targets and built-in models, kernel
libraries (FlashInfer, CUTLASS) and other engines (vLLM, SGLang). What is
taken lands on this engine's terms: catalog entries, adapted code keeping
its license header and naming its origin, values from the checkpoint, the
HuggingFace reference as the ground truth of the math, source_embargo
paths unread.
- Prompts and the feature skill send an agent to a thing by the symbol that
finds it and to tree_map.md, not by a fixed path; ModelingV2's own package
and tests are one constant each (MODELING_V2_PACKAGE, CATALOG_TESTS_DIR).
An embargo is set only when a request asks for one: in a product run
everything is prior art. The tune campaign likewise renders an embargo
only when one is set, and other engines' kernels and strategies are prior
art its turns may adapt.
- The planner plans no task that rebuilds what the engine and its tests
provide and names the closest test and target; investigate reproduces
in-tree first; the survey weighs other engines' kernels for each step's
rung; a new kernel starts from the closest existing one; spec/INTAKE.md reads
how other engines serve the model; an embargo says what it leaves open.
Oracles
- The witnesses (disagg equivalence, host_offload residency, kv_quant,
decoder and encoder replay) and the logit gate are removed, with
accuracy.witness, accuracy.logits, accuracy.boot.greedy, `anchor:
pending`, `benchmark_members: sampled` and the witness-contrast lint
rules. Each unit owes its boot and accuracy, a speculator its acceptance
gate; an anchor not measured yet is a placeholder in reference_yaml.
- disagg owes one check, gate `disagg` (checks/disagg.py): the target's
disaggregated-serving accuracy test, written beside the tree's own (they
serve through `trtllm-serve disaggregated`, launch_disaggregated_llm) and
named by accuracy.disagg.test. The gate runs that node once, at the
member the request validates fully, from its pytest root as CI does, on
one node (the tree's launcher starts every worker on one host): two
engines' devices at the member's width, at most a node's
(accuracy.disagg.devices overrides, never past a node), under
accuracy.disagg.env, and passes only when every test it selects passed:
a skip fails it. The flow deploys nothing of its own, and a variant of
disagg owes nothing. Lint and preflight block devices past a node;
disagg-placement warns when two engines of the checkpoint do not fit the
node (ENGINE_WEIGHT_FRACTION is 0.75: a 344-GiB checkpoint served two
277-GiB devices per engine).
- derive names the node id beside the disagg_launcher anchor
(Test<architecture>::test_auto_dtype) and takes the site's
defaults.disagg; the lint notes a test not yet in the tree
(disagg-test-pending) and leaves disagg out of the CUDA-graph rules, its
test configuring its own engines. The requirements matrix treats the
members the test does not run at, a variant of disagg and a pair of
features as the spec's own choice; a member only disagg uses adds no
column.
- accuracy.anchor is `recorded` (a row of reference_yaml, a low
placeholder until a measured one replaces it) or, for a configuration
variant, `relative`: its unit's own score at the same member on the same
target, the default for a variant that names no row of its own. The
contract runs the unit's benchmark first (Check.after; verdicts keep the
measured score); the floor is k x SE of the difference of the two runs.
A variant's discriminators are layered over the unit's. Preflight
refuses an anchor table the checkout holds uncommitted (each check reads
it from a commit) and a relative variant whose unit's benchmark the
contract does not run at its member.
- derive builds the features a goal names (a drafter or tower the
checkpoint carries and the goal does not is left out, and said), turns
`kv=bf16/fp8/nvfp4` into a base dtype and one accuracy-only variant per
other dtype, sizes max_batch_size to the goal's concurrency, and asks
rather than guesses for accuracy.model_key (config.json names no model)
and the concurrencies to tune at.
- The planner's turn names the start member: the cheapest member one
engine of the checkpoint fits, not tp1.
- The tests are slimmed: merged where they set up the same thing, removed
where another test asserts the same behavior.
Tune
- The campaign starts once onboarding is complete (every required check
has passed), not after the core's inner checks, and the run is
delivered when it ends (goal, budget or ideas spent); full support no
longer tells it to wrap up.
- It measures one baseline, which must serve the target (modeling_v2:
require), and starts: no perf smoke, no stock reference
(perf.reference), no noise repeats (perf.noise_repeats). perf.goal is
ratio_to_baseline and/or pct_of_sol. With nothing kept, the wrap-up
does not measure the baseline tree again.
Signed-off-by: Wanli Jiang <35160485+Wanli-Jiang@users.noreply.github.com>1 parent 23fe300 commit bb1be4f
130 files changed
Lines changed: 4233 additions & 8349 deletions
File tree
- agent-flow
- agent_flow
- backends
- workflows/trtllm_modeling_v2
- agents
- prompts
- skills/trtllm-modeling-v2-features
- references
- checks
- harness
- infra/compute
- operators
- run
- execution
- startup
- validation
- workspace
- spec
- tune
- tests
- workflows/trtllm_modeling_v2
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
237 | 246 | | |
238 | 247 | | |
239 | 248 | | |
240 | 249 | | |
241 | 250 | | |
242 | 251 | | |
| 252 | + | |
243 | 253 | | |
244 | 254 | | |
245 | 255 | | |
246 | 256 | | |
247 | 257 | | |
| 258 | + | |
248 | 259 | | |
249 | 260 | | |
250 | 261 | | |
| |||
259 | 270 | | |
260 | 271 | | |
261 | 272 | | |
262 | | - | |
| 273 | + | |
263 | 274 | | |
264 | 275 | | |
265 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
| |||
69 | 79 | | |
70 | 80 | | |
71 | 81 | | |
72 | | - | |
73 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
74 | 86 | | |
75 | 87 | | |
76 | 88 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
80 | 92 | | |
81 | 93 | | |
82 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | | - | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | | - | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
31 | 39 | | |
32 | 40 | | |
33 | 41 | | |
| |||
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
54 | 82 | | |
55 | 83 | | |
56 | 84 | | |
| |||
163 | 191 | | |
164 | 192 | | |
165 | 193 | | |
166 | | - | |
167 | | - | |
168 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
169 | 198 | | |
170 | 199 | | |
171 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
0 commit comments