vxpu/planner: choose speculative depth and wire separate draft model through CLI #972
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #972"
general
weight: 0.35
justinsb
vxpu/proto: add median draft and verify timings to PlanExecutionStatsAdd optional
median_draft_ms(field 12) andmedian_verify_ms(field 13) toPlanExecutionStatsalongside the per-position draft/accepted counts from #954 (decode_steps = 9,drafted_by_position = 10,accepted_by_position = 11) so the executor reports draft and verify step latencies as facts for Go speculative depth selection.Regenerated Go and Python protobuf bindings with
ap generate //....vxpu/planner: choose speculative depth from acceptance countsImplement Go planner-chosen speculative decoding depth (#646 Move D) on top of #954's raw per-position count reporting:
vxpu/pkg/kernelplan/speculation_depth.goto read artifact speculation bounds (step_tokens,draft.block,vocab_sizewithtext_configfallback,max_cache_len), validate separate draft artifacts (rejecting missing/non-positive bounds anddeepseek_v41), derive empirical per-position survival probabilities and geometric acceptance parameteralphafromdrafted_by_position/accepted_by_position(withaccepted_drafts_a_stepfallback), estimate or read draft/verify step latencies (resolving wrapper-prefixedbinding.boundkeys andnum_local_experts/text_config), and choose the depthkin[0, maxDepth]minimizing netms/token(returning0when speculation does not beat undrafted decode).SpeculationOptionsintokernelplan.PlanArtifactand omitPlanFile.segmentswhen speculation is active so the emitted plan targetsverify.pt2and passes executor plan compatibility checks.speculation.py,physplan.py,engine.py) to reportmedian_draft_msandmedian_verify_msalongside #954's raw per-position counts while keeping all policy and depth selection in Go.vxpu/cli: wire separate draft-model speculation through plan emit, ask, and routerWire separate draft-model speculative decoding and planner-chosen depth through the normal Go CLI and
vxpu-routerserving path:--draft-artifact,--run-record, and--speculation-depthflags tovxpu plan emitandvxpu ask, plus--planonvxpu ask; validate--speculation-depthbounds (-1or[0, math.MaxInt32]), reject combining--modelor--planwith conflicting plan/speculation flags, and leaveLoadModelRequest.PlanFilenil when client-side speculation planning resolves to depth 0 so the router probes real executor hardware.verify.pt2onLoadModelRequest.verify_graphfrom bothvxpu askandvxpu-routercatalog loading (fetchCatalogArtifact), and preservefile://manifests in local-agent mode when no weightstore is configured.vxpu/docs/design.mdand CI presubmit scripts (test-vxpu-pythonandtest-vxpu-gpu) with end-to-end Go CLI +vxpu-routerseparate draft-model verification tests (including loading the planner-chosen run-record plan throughvxpu-routerand verifying token identity).NVIDIA L4 GPU Verification
Verified on NVIDIA L4 (driver 580.178.04, 23034 MiB, CUDA 13.0, torch 2.14.1+cu130):
Also verified after rebasing onto
main(#954 and #974):ap generate //...,ap lint ./..., Go unit & CPU end-to-end tests (TestSeparateDraftSpeculationOverGRPC,TestRouterSeparateDraftSpeculation_CPU,TestDeriveSpeculationMetrics,TestVerifySpeculativeRun_NegativeCases), Pythonvxpu.speculation_test+vxpu.physplan_test(28 tests), andpyright==1.1.414(0 errors).Fixes #971