Skip to content

feat(xla): Add Falcon-H1 parallel attention and Mamba2 blocks - #3414

Draft
inureyes wants to merge 4 commits into
mainfrom
feat/issue-3346-falcon-h1
Draft

inureyes wants to merge 4 commits into
mainfrom
feat/issue-3346-falcon-h1

Conversation

@inureyes

@inureyes inureyes commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Add raw-HF Falcon-H1 execution with parallel attention and Mamba2 branches followed by a separately normalized MLP. Every layer carries both KV and recurrent state through prefill, single decode, and ragged decode. MuP factors apply at their HF locations; optional grouped SSM normalization supports both gating orders and absent normalization.

Honor explicit SSM/MLP widths, independent attention/SSM head dimensions and projection biases, original checkpoint names, and unscaled tied-head weights. Existing recurrent f32 defaults and prefix-cache guards apply.

Local validation at runtime source 205d0a3dd2d92eca2dbcba3dffcefba54e825eca:

  • Independent HF fp32 synthetic parity on CPU and CUDA for all three norm modes, every non-unit multiplier, four ragged trajectories, and slot reuse.
  • Original Tiny90M 40/40 oracle token equality on CPU/CUDA engines and CUDA CLI.
  • Four concurrent CUDA HTTP completions match separate CLI references in exact text and token counts; server process reaped.
  • CUDA batch 4 / requests 8 / cap 24: all 170 tokens reference-exact.
  • Core-crate tests, registered byte-exact goldens, loader layouts, checkpoint shape validation, fmt, and narrow clippy pass.

Committed oracle, provenance, measured logs, and explicit HIP handoff are under spike/openxla/falcon_h1_reference and FINDINGS_falcon_h1.md. HTTP does not expose output IDs, so its evidence is text/count parity. Tests use test-fast binaries; hosted CI was canceled under the local-validation policy.

Draft remains open: requested HIP acceptance and parent review/finalization are pending.

Refs #3346

Support original Hugging Face weights with independent attention and SSM dimensions, shared-input parallel mixers followed by a normalized MLP, optional grouped gated normalization, and explicit muP factors. Reuse compact KV and recurrent state plumbing across prefill, single decode, and ragged decode.

Add structural goldens, configuration and weight-layout regression coverage, and a reproducible independent HF synthetic device gate. Hardware and real-checkpoint acceptance remain pending.

Refs #3346
@inureyes inureyes added status:in-progress Currently being worked on type:enhancement New features, capabilities, or significant additions priority:medium Medium priority area:architecture Architecture and code structure changes area:inference Generation, sampling, decoding (incl. speculative, DRY) labels Nov 24, 2026
IREE runtime linkage belongs to the root build script. Move the ignored HF parity gate into the root integration-test suite and document its xla-iree,test-utils feature command so it uses the established runtime link recipe.

The core crate passes focused Falcon-H1 tests and all registered structural goldens remain byte-identical.

Refs #3346
Commit the independent native-HF fp32 40-token oracle and checkpoint provenance, add a direct engine token-parity gate, and document explicit HIP device/target/precision selection for external ROCm acceptance. Correct the omitted SSM state-size default to match HF and remove redundant borrows from the shared mixer helper.

Structural goldens, focused Falcon-H1 and recurrent regression tests, loader argument layouts, and original Tiny90M checkpoint shape validation pass locally. Numerical and operational acceptance are tracked separately.

Refs #3346
Record independent HF synthetic parity on CPU and CUDA, original Tiny90M 40-token oracle equality through the engine and CUDA CLI, four concurrent HTTP completions matching CLI text and counts, and batch-four/eight-request reference equivalence. Include command provenance, binary hashes, and server cleanup evidence.

Runtime source 205d0a3 was measured with pinned IREE and test-fast binaries. HIP acceptance remains pending; the issue and PR stay open and in progress.

Refs #3346

This branch has not been deployed

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

Labels

area:architecture Architecture and code structure changes area:inference Generation, sampling, decoding (incl. speculative, DRY) priority:medium Medium priority status:in-progress Currently being worked on type:enhancement New features, capabilities, or significant additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant