You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #296 moved Gemma4's per-layer input computation from the text
decoder into the embedding sub-model, the embedding model now emits a
second output (per_layer_inputs) and the decoder accepts it as a
required input. The e2e harness only wired the first embedding output
(inputs_embeds) into the decoder, so every multi-model Gemma4 path
(text-only on multi-model, VL prefill, VL generation, speech-language
prefill, speech-language generation) failed with:
ValueError: Required inputs (['per_layer_inputs']) are missing from
input feed (['inputs_embeds', ...])
Fix by passing any extra embedding outputs through to the decoder by
name. This is generic — for models without per_layer_inputs the extra
loop iteration just no-ops.
Separately, the speech-language audio encoder builds Gemma4's
input_features_mask as tensor(bool), but the harness unconditionally
cast feature-extractor outputs to float32 (and constructed the fallback
all-True mask as np.bool_ that then crashed ort_easy's DLPack path,
which has no bool type code). Fix by:
- Honoring the session's declared input dtype for each audio-encoder
input (BOOL stays BOOL, FLOAT becomes float32, etc.).
- Routing bool numpy arrays through OrtValue.ortvalue_from_numpy
directly in OnnxModelSession, bypassing ort_easy's DLPack-first path.
Verified locally on H200:
L4 text-generation/gemma-4-e2b PASS
L4 image-text-to-text/gemma-4-e2b-it PASS
L4 speech-language/gemma-4-e2b-it-audio PASS
L5 image-text-to-text/gemma-4-e2b-it PASS
L5 speech-language/gemma-4-e2b-it-audio PASS
(L5 text-generation/gemma-4-e2b is gated by integration markers and
skipped under fast runs.)
ruff check + format pass.
Signed-off-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
0 commit comments