transformers
f6e8ae12 - Merge audio into `inputs_embeds` in Qwen2Audio

Commit
3 hours ago
Merge audio into `inputs_embeds` in Qwen2Audio The audio merge lived under `if inputs_embeds is None:`, so `inputs_embeds` + `input_features` silently dropped the audio. Refactor `forward` onto the `get_audio_features` + `get_placeholder_mask` primitives used by the other audio LLMs, so the placeholders are found in `inputs_embeds` when `input_ids` is None. The legacy (non-expanded audio tokens) path is kept, ids-only; `_merge_input_ids_with_audio_features` now takes the flat valid audio embeddings. Logits are bit-identical to before on both paths. Un-skip `test_inputs_embeds_matches_input_ids` (fails on main, passes now). Claude-Session: https://claude.ai/code/session_01TfcxJfpzsVS5WVrzqgNV6f
Author
Parents
Loading