Skip to content

fix(inference): clamp dense walk top-k to feature count#176

Open
citizenu03bb wants to merge 1 commit into
chrishayuk:mainfrom
citizenu03bb:pr/walk-ffn-dense-topk-clamp
Open

fix(inference): clamp dense walk top-k to feature count#176
citizenu03bb wants to merge 1 commit into
chrishayuk:mainfrom
citizenu03bb:pr/walk-ffn-dense-topk-clamp

Conversation

@citizenu03bb

Copy link
Copy Markdown

Title:
fix(inference): clamp dense walk top-k to feature count

Summary:

  • Clamp unlimited dense WalkFfn top-k to the layer feature count.
  • Add a regression test covering WalkFfn::new_unlimited.

Why:
WalkFfn::new_unlimited previously returned usize::MAX from top_k_for
when no explicit per-layer k was configured. Dense paths that used this value
as a selection bound could request more features than exist. The unlimited
dense case should mean "all features in this layer", not an unbounded sentinel
escaping into execution.

Verification:

  • cargo test -p larql-inference dense_top_k_for_clamps_to_layer_feature_count --lib
  • cargo test -p larql-inference --lib

Branch:
pr/walk-ffn-dense-topk-clamp

Commit:
d75cd5d

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.

1 participant