mm: Gemma 4 12B's pictures and audio

The 12B (gemma4_unified) has no tower: its embedder takes a whole
48 x 48 pooling window as one patch, so a patch is a row (merge 1),
its values u / 255. Its audio is frames of 640 samples as they are,
one frame a token, the last zero-padded. Goldens from transformers.
This commit is contained in:
keptn42 committed 2026-11-04 07:20:29 +01:00
1 parent 9782a9afb5
commit a00e5e7094
6 files changed
+406 -9

No files matched your search

+7 -1
View File
@@ -3205,7 +3205,13 @@ int Engine::run_server() {
return rc;
}
o.allow_audio = true;
if (mm::decoder_available())
if (mm::decoder_available() && ac.family == mm::AudioFamily::Gemma4Unified)
RAD_INFO("media: audio through '%s'; a clip is cut at %.3g s, a token is a frame of %d "
"samples (%d ms); %lld frames a pass",
ranks_[0]->program.audio_encoder_name.c_str(),
(double)mm_proc->audio_config().max_samples / (double)ac.rate, ac.frame_length,
ac.frame_length * 1000 / ac.rate, (long long)aend.max_patches);
else if (mm::decoder_available())
RAD_INFO("media: audio through '%s'; a clip is cut at %.3g s, %d mel bins a %d ms frame, "
"%d frames a token; %lld frames a pass",
ranks_[0]->program.audio_encoder_name.c_str(),