From 46d4106fe6fc3470d1480365d0b8e8c557ab7d81 Mon Sep 17 00:00:00 2001 From: Francisco D' Agostino Date: Sun, 5 Jul 2026 11:47:14 -0300 Subject: [PATCH] Gemma4Unified: audio and video input in the processor (encoder-free 12B) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Gemma4Unified model already projects and scatters audio/video features (embed_audio, getInputEmbeddings), but Gemma4UnifiedProcessor only handled images. This completes the processor so the 12B accepts audio and video: - Audio (encoder-free): the raw 16 kHz waveform is zero-padded to a multiple of audio_samples_per_token (640 = 40 ms) and reshaped into [1, T, 640] frames — each frame IS the feature vector, one soft token per frame, no mel/no conformer. Clips are truncated to audio_seq_length (750 = 30 s) so placeholder and feature-row counts always match. Placeholders expand to boa +