feat(flow): flow-matching stages for the HPT head - #44
Open
AnikethCheluva wants to merge 1 commit into
Open
Conversation
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Sep 8, 2026
AnikethCheluva
marked this pull request as ready for review
September 8, 2026 05:02
AnikethCheluva
force-pushed
the
graph-hpt-stems
branch
from
September 9, 2026 22:21
660f728 to
9ecc0bc
Compare
AnikethCheluva
force-pushed
the
graph-hpt-flow
branch
from
September 9, 2026 22:21
a2c4ea5 to
9cfa13d
Compare
AnikethCheluva
force-pushed
the
graph-hpt-flow
branch
from
September 10, 2026 17:56
9cfa13d to
9cab47f
Compare
This was referenced Sep 10, 2026
Adds the objective HPT is trained with upstream, decomposed the same way the
diffusion head already is: noising, denoiser, loss. Both trios read "condition"
and "target" and write "loss/*" in training and "pred_action" at inference, so
choosing between them is a config edit rather than a code change.
Flow matching interpolates linearly between action and noise,
x_t = t * noise + (1 - t) * action
and predicts that path's constant velocity, noise - action. Sampling integrates
the field backwards from t=1 to t=0 with plain Euler steps, so unlike the
diffusion stages there is no noise schedule and no scheduler-signature
handshake to keep in sync.
time_dist defaults to beta(1.5, 1) as upstream: it leans toward the noisy end,
spending capacity where sampling starts and errors compound. Sampled time is
kept strictly inside (0, 1) because either endpoint degenerates -- at 0 the
path carries no noise, at 1 no action.
Tests pin the interpolation identity itself rather than just shapes (action is
recovered from x_t and u_t), that beta really does skew above uniform, the
per-mode contracts, that inference runs with the noising stage absent, and a
convergence check that the whole graph fits a fixed target and samples nearer
to it than noise -- which would fail if the interpolation, the velocity target
or the loss were wrong.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
AnikethCheluva
force-pushed
the
graph-hpt-flow
branch
from
September 10, 2026 22:20
9cab47f to
bdc2203
Compare
AnikethCheluva
force-pushed
the
graph-hpt-stems
branch
from
September 10, 2026 22:20
19baa32 to
1ea7234
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds the objective HPT is trained with upstream, decomposed the same way the
diffusion head already is: noising, denoiser, loss. Both trios read "condition"
and "target" and write "loss/*" in training and "pred_action" at inference, so
choosing between them is a config edit rather than a code change.
Flow matching interpolates linearly between action and noise,
and predicts that path's constant velocity, noise - action. Sampling integrates
the field backwards from t=1 to t=0 with plain Euler steps, so unlike the
diffusion stages there is no noise schedule and no scheduler-signature
handshake to keep in sync.
time_dist defaults to beta(1.5, 1) as upstream: it leans toward the noisy end,
spending capacity where sampling starts and errors compound. Sampled time is
kept strictly inside (0, 1) because either endpoint degenerates -- at 0 the
path carries no noise, at 1 no action.
Tests pin the interpolation identity itself rather than just shapes (action is
recovered from x_t and u_t), that beta really does skew above uniform, the
per-mode contracts, that inference runs with the noising stage absent, and a
convergence check that the whole graph fits a fixed target and samples nearer
to it than noise -- which would fail if the interpolation, the velocity target
or the loss were wrong.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com