Bringing Speech, Multi-Switch, Shadow-Residual, SWITCH kernels and ChatML support to Granite Switch - #119
Merged
Merged
Conversation
antonpibm
requested review from
aviv1ron1,
freunda and
yairallouche
as code owners
September 8, 2026 06:13
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
yairallouche
approved these changes
Sep 8, 2026
aviv1ron1
added a commit
that referenced
this pull request
Sep 9, 2026
Absorbs feature/moe-audio-support so it does not need a PR of its own: that
branch carried no functional code, only documentation plus the tests that back
it. Taken from staging/feature/moe-audio-support @ 8bf0bb3.
What came across:
* docs/AUDIO.md -- the audio cascade over a pure sparse MoE base. Hand-merged,
not overwritten: this file had already diverged here (63+/25- from the
TurboCTC edits, which touch the same sections). Verified afterwards that both
sides survive -- the TurboCTC default, the transformers>=5.16 requirement and
the 120s chunker window on one side, the granitemoe material on the other.
* tests/composer/test_audio_marker_output_row.py -- the marker/reserved-row copy
is now parametrized over MLP topology as well as embedding tying, taking it
from 2 cases to 4 (untied/tied x dense/sparse-MoE). The fixup only ever
touches embedding rows, so both topologies must behave identically; the sparse
arm is what would notice if a shared-MLP-shaped assumption crept into the
model construction it runs against.
* tests/composer/test_granitemoe_audio_compose.py -- new, 9 tests over 4
classes: audio does not resurrect the shared MLP, does not widen the adapter
surface and leaves no zero-width parameter; the control LUT goes stale on the
marker and refresh fixes it idempotently and passes the validator; the marker
output row; and survival across save/load.
Deliberately NOT taken: a 5-line comment block in
src/granite_switch/composer/tokenizer_setup.py noting that the <|unused_N|>
convention also holds on granitemoe bases. True, but prose, and keeping src/
out of this commit makes the "no functional change" claim checkable rather than
asserted -- `git show --stat` shows no src/ path at all.
Verified: the two test files give 32 passed here; ruff check and format clean
over 211 files.
One thing a reviewer should not misread. The composer tier on this base reports
pre-existing failures that predate this commit and are unrelated to it:
TestGraniteMoeSR fails 6 of 8 even in isolation, in 0.37s, with
"ValueError: not enough values to unpack (expected 5, got 3)". Public main is 15
commits behind staging and is missing #119, which changed composer return
signatures and updated test_granitemoe_compose_e2e.py to match; the two are out
of step here. It has gone unnoticed because the public repo's automatic CI runs
only tests/unit/, so tests/composer/ is unchecked on every PR. #119 is expected
to reach public main shortly, which resolves it. The test file imported above is
based on #116, before that refactor, so it matches the signatures this base has.
Signed-off-by: aviv ron <rona@il.ibm.com>
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.
No description provided.