Repository navigation
feat(xla): Add Falcon-H1 parallel attention and Mamba2 blocks - #3414
Conversation
|
ROCm interim at exact HEAD Strict displayed CLI/server text parity is 3/4. With prompt Reproduction commands, four SSE event streams, CLI stdout/IDs and both comparisons are under |
|
Final ROCm results at Other completed gates PASS: 544 library tests / 22 ignored, fmt/clippy and goldens; independent synthetic CPU/HIP tests covering three norm modes, multiplier placement, ragged logits and slot reuse; fresh HF oracle and CLI 40/40; B4/N8 170-token batch; cancellation/recycling; five hybrid HIP tests; Mamba2 synthetic and real oracle/batch regressions; real Nemotron-H-4B oracle and B4/N8 regression. Strict displayed CLI/server equality remains 3/4 due solely to CLI removal of trailing Tiny90M revision |
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
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
Raw completions retained a Germany response's trailing spaces and newline while full CLI display removed them through chat-oriented flush cleanup. Add an opt-in plain-text flush for CLI rendering, retaining existing reasoning, tool, Harmony, Muse, and default chat behavior. Cover exact trailing whitespace, chunk accounting, primed reasoning, and structured channels. Add a portable four-request 40-token replay that compares actual CLI stdout with HTTP text, and correct the earlier raw-token-decode evidence boundary. Validation: focused display regressions and 146 StreamFilter tests pass. GPU output replay is recorded separately after rebuilding the integrated candidate. Refs #3346
The external ROCm mismatch was observed over SSE. Exercise four concurrent completions per transport in the portable replay, preserving text chunks and verifying usage, finish reason, and stream termination. Keep raw SSE events alongside the comparisons. Validation: Python syntax check passes. Actual GPU replay follows the integrated binary build; this harness change does not claim new hardware evidence. Refs #3346
852129e to
8c7b441
Compare
The environment-documentation gate scans test-only Rust code as well as production code. Record the Falcon-H1 golden writer and original-checkpoint shape-test controls in its reasoned allowlist rather than presenting them as operator settings. Validation: environment-documentation checker and all 15 Python regression tests pass. Refs #3346
Record the final CPU/CUDA oracle and affected regression results after integrating Mamba1 and MoE support. Actual displayed CLI stdout matches all four nonstream and four SSE completions, including Germany's trailing spaces and newline. Preserve raw output, responses, binary provenance, and server cleanup evidence. Correct the earlier HTTP evidence to raw token decoding, document the prior exact-SHA HIP numerical acceptance separately, and request a final-head ROCm replay. Add bilingual technical reports. No runtime source changes follow the tested runtime head. Refs #3346
|
Merged as Please replay ROCm on merge commit In a validation checkout at that merge commit, use the pinned original Tiny90M checkpoint and set its path in eval "$(scripts/iree/setup-rocm.sh --env)"
export MLXCEL_XLA_DEVICE=hip MLXCEL_XLA_ROCM_TARGET=gfx1151 MLXCEL_XLA_PRECISION=f32
export MLXCEL_ORACLE_PYTHON=spike/openxla/.venv/bin/python
export CARGO_TARGET_DIR="$PWD/target"
scripts/rocm_gpu_guard.sh --hold -- cargo build --profile test-fast --features xla-iree,test-utils --bin mlxcel --bin mlxcel-server
scripts/rocm_gpu_guard.sh --hold -- "$MLXCEL_ORACLE_PYTHON" spike/openxla/falcon_h1_cli_server_check.py --device hip --model "$MLXCEL_FALCON_H1_MODEL" --bin-dir "$CARGO_TARGET_DIR/test-fast" --binary-source-head 3cee2854de141b7809129e41a33afcd69d876283 --out /tmp/falcon-h1-displayed-hip-3cee2854The replay covers both HTTP transports. Re-run the synthetic/real engine gates from |
Spell out the display, filter, hybrid, and Mamba2 test counts so the successful results cannot be mistaken for partial pass fractions. Numerical parity fractions remain unchanged. Refs #3346
|
Requested ROCm replay PASS at exact merge commit The portable displayed-output replay passes 4/4 non-streaming HTTP and 4/4 SSE comparisons against actual CLI stdout, including prompt/completion token counts. Germany preserves the exact trailing Also PASS: 560 XLA library tests / 22 ignored, byte-exact goldens, fmt/clippy; 7 display and 146 filter tests; fresh independent Falcon-H1 CPU/HIP synthetic and real40 gates; B4/N8 and cancellation/recycling; hybrid state tests; Mamba2 single/state-carry and real oracle/batch; Mamba1 oracle/batch; E-bearing MoE oracle/batch; real Nemotron-H-4B oracle/batch. Evidence, binary hashes, preserved stdout/responses, commands and logs: |
Add original-HF Falcon-H1 execution with parallel attention/Mamba2 followed by a separately normalized MLP. Preserve HF muP placement, optional SSM normalization, independent head widths/biases, and dual KV/recurrent state across prefill, single decode, and ragged decode. Integration retains #3411 MoE and #3413 Mamba1 behavior.
Fix plain CLI completion display losing trailing whitespace: an explicit flush mode preserves raw text while default chat and structured reasoning/tool/Harmony/Muse cleanup remain unchanged. The portable replay compares actual stdout with concurrent non-streaming HTTP and SSE responses; earlier CUDA HTTP evidence compared raw token decoding, not displayed stdout.
Validation at integrated runtime source
8c7b4412d37b91807f8d688ba2f3febbc7a7e41f(base2e46fc09):External HIP acceptance at
852129ebpassed numerical, real 40-token CLI, batching/recycling, regression, and release architecture gates. Strict displayed CLI/SSE parity was 3/4 because Germany ended in" \n"; all four raw token decodes matched. That evidence predates this fix and merged shared recurrent plumbing. Request a final-head ROCm replay with explicithip,gfx1151, andf32under the ROCm guard; no new HIP run is claimed.Oracle, provenance, logs, portable replay, and instructions are in
spike/openxla/falcon_h1_referenceandFINDINGS_falcon_h1.md; bilingual reports document the exact evidence boundaries. HTTP exposes text/counts, not output IDs. Hosted CI is canceled under the local-validation policy.Refs #3346