Monkey-patch LLAMA_ATTENTION_CLASSES for boson_multimodal compatibility with transformers 5.x

This commit is contained in:
2026-07-11 00:12:44 +02:00
parent 9ed7590093
commit cb86342cab
+6
View File
@@ -13,6 +13,12 @@ from transformers import (
AutoTokenizer,
WhisperProcessor,
)
import transformers.models.llama.modeling_llama as _llama_mod
if not hasattr(_llama_mod, "LLAMA_ATTENTION_CLASSES"):
_llama_mod.LLAMA_ATTENTION_CLASSES = _llama_mod.ALL_ATTENTION_FUNCTIONS
from boson_multimodal.data_collator.higgs_audio_collator import HiggsAudioSampleCollator
from boson_multimodal.data_types import ChatMLSample, AudioContent, Message
from boson_multimodal.dataset.chatml_dataset import (