Repository navigation
lanes/depth: price full fixed_draft_block head cost in lone roundCost - #4457
Conversation
|
I reproduced the pricing regression with Zig 0.17.0 on M5 Max. With only the new test fixture applied to main
Igor Lessio - AIFLOW LABS |
|
I trial-merged zig build test-shared-lane-regressions-host test-lane-api-host -Dcpu=apple_m1 -j3 --summary allThis covers the combined branches' lane behavior with host fixtures. It leaves the device throughput comparison to the Inkling stack. Igor Lessio - AIFLOW LABS |
|
I checked the red No GPU run against the current base. The three Zig jobs all stop at the Flash Next environment count (expected 24 switches, found 25). Pytest stops at collection because the workflow cannot import I trial-merged exact head
A hosted run on the refreshed base would verify the rest of the matrix. Previous No GPU run Igor Lessio - AIFLOW LABS |
746c7b2 to
ca097f1
Compare
ca097f1 to
32c722f
Compare
|
Thank you @gilby. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
Fixes adaptive draft-depth pricing for Inkling 2 Mini's fixed-cost DSpark drafter when serving a single stream. Because fixed-block drafters pay the same step cost across small depths, single requests now propose full blocks cleanly.
What this changes
Before:
Rule.roundCostmultipliedmtp_step_ms * draftsfor lone-stream untimed depths even whenk.fixed_draft_blockwas set, under-pricing small drafts and inflating theplain_guardexcess floor on larger untimed depths for fixed-block drafters. After:Rule.roundCostusesdraftHeadMs, chargingmtp_step_ms * most_draftswheneverfixed_draft_blockis true anddrafts > 0, matching shared-round pricing.maincore lane fix; Metal kernels and DSpark speedups live in stackedlead/inkling2-miniPRs).origin/mainat52b1362766(headca097f1601).atc overlap --json --base origin/main:changedFiles: 2; overlapsworkingTree/ older PR MiMo-V2.6-Flash on CUDA (2x GB10) with DFlash as the drafter #728 in area 1 (depth.zig), zero overlap against any active Inkling 2 Mini PR.Checks on this head
ca097f1601python3 tools/pr_check.py --base origin/main --pr 4457:2 changed files; lean 165 vs 165, 0 new; 0 error(s), 1 warning(s)(depth.zig561 lines,depth_test.zig198 lines; warning is advisory Unreleased bullet).zig test zig/src/core/lanes/lanes.zig --test-filter fixed_draft_block— All 16 tests passed (0 failed, 0 skipped; fails before the change withroundCost(1) == 23.0instead of29.0).zig build test-lane-api-host -Dcpu=apple_m1— exited 0 (EXIT=0).zig build test-shared-price-learning-host test-environment-host -Dcpu=apple_m1— exited 0.zig fmt --check build.zig zigandgit diff --check origin/main..HEAD— clean.ca097f1601.lead/inkling2-miniMetal V3 stack (this PR modifies only the pure-Zig lone-stream cost helper whenfixed_draft_block == true;fixed_draft_block == falseis bit-identical).Receipt
fixed_draft_block == false(variable-step MTP drafters),draftHeadMscomputes the identicalmtp_step_ms * draftsexpression. Whenfixed_draft_block == true(DSpark on Inkling 2 Mini on CUDA and Metal #4387), lone-stream depth costing accurately prices small fixed-block drafts instead of mis-pricingdrafts = 1.lanes/depth.zig(Rule.roundCost, lone-stream adaptive depth selection).origin/main52b1362766→ca097f1601, Zig 0.17.0, macOS 27.x (Apple Silicon).lanes), verified viazig testand host test builds on macOS aarch64; no GPU kernels touched."draft": false.fixed_draft_block == falsepath; fixes lone-stream depth under-proposal on fixed-block drafters.Rule.roundCostis only consulted during decode draft depth selection and cannot reach prompt processing.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.--drafter, no slower than without it, greedy and sampled.