Skip to content

feat(lanes): expose optional normalized prompt features - #4132

Merged
ashhart merged 2 commits into
ashhart:mainfrom
tacosta:feat/2485-mtp-normalized-prompt-features
Nov 20, 2026
Merged

ashhart merged 2 commits into
ashhart:mainfrom
tacosta:feat/2485-mtp-normalized-prompt-features

Conversation

@tacosta

@tacosta tacosta commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Adds an optional, short-lived normalized-row view to the shared lane feature contract. It defaults to absent, so consumers that do not request normalized rows keep the existing path. The interface is reusable by any drafter that consumes normalized rows; the dependent dense-MTP change uses it, but the interface is not MTP-specific.

Checks on this head

  • Head commit: 478c6c4f205bdd6a53ec3d19b0740c60582ff7df.
  • Lean checker: tools/pr_check.py reports base 168, head 168, 0 new findings. Its pre-creation run also emitted the expected advisory because the new PR number is not assigned yet.
  • Tests run: tools/pr_check.py --base origin/main passed (exit 0). No standalone interface test was added; the dependent MTP change exercises the field. atc check 2485 --json was incomplete due to the pull-request limit. Post-rebase build and host tests are pending.
  • CI: no run on this head yet; CI will start after publication.
  • Not run, and why: post-rebase zig build test test-golden, formatting and CUDA qualification are scheduled after PR creation.

Receipt

n/a: this prerequisite only exposes an optional row view; it does not run inference without a consumer. Dense-MTP inference evidence is kept with dependent #3582.

Checklist

  • The title and description identify the optional interface and its dependency.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency; no standalone interface test is included.
  • The added source comment is one line; no measurements or development history were added to source.
  • The diff and outgoing commit contain no personal data, machine names, internal hosts, local paths or AI attribution lines.

@ashhart

ashhart commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Thanks @tacosta for separating the reusable lane interface from the dense-MTP consumer. The optional Normalized view carries its buffer, byte offset, starting position, row count and row width, and the documented ordered-stream lifetime is scoped to the short-lived view.

The field defaults to null; existing feature initializers and drafters retain their current behavior, and this patch adds no consumer or token-path change. The one-file diff applies cleanly to current main, stays below the file/comment limits, and adds no private data.

I found no remaining issue in this interface prerequisite, and it goes on a landing train now. Runtime evidence for the dependent dense-MTP consumer remains with #3582.

  • Synthena

@AIFlowML

Copy link
Copy Markdown
Contributor

I trial-merged 478c6c4f cleanly into b7298b4e. On M5 Max with Zig 0.17.0, these existing consumer fixtures passed 41/41:

zig build test-qwen35-draft-frame-host test-qwen35-draft-frames-host \
  test-qwen35-draft-trees-host test-glm-prompt-taps-host test-glm-dflash-host \
  -Dcpu=apple_m1 -j5 --summary all

I also used a scratch host target on the separate #3582 head b1540392 to select the normalized-view tests in cuda_native_mtp_state.zig and cuda_prefill.zig. All 24 selected/imported tests passed, including the four named checks for view expiry and chunk boundaries. That run uses #3582's own base. Its trial merge into current main still has conflicts.

One contract detail worth putting beside Normalized.buffer: spell out how a consumer should interpret the address space, device and readiness of that buffer, since those fields live on the enclosing Features and there is no separate fence on the normalized view.

Igor Lessio - AIFLOW LABS

@ashhart
ashhart force-pushed the feat/2485-mtp-normalized-prompt-features branch from 478c6c4 to e2a5050 Compare November 20, 2026 18:50
@ashhart
ashhart merged commit 4c616e6 into ashhart:main Nov 20, 2026
2 of 11 checks passed
@ashhart

ashhart commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Thank you @tacosta. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants