Fix boson_multimodal API: prepare_chatml_sample_qwen -> prepare_chatml_sample

This commit is contained in:
2026-07-11 00:17:33 +02:00
parent cb86342cab
commit 70073753f0
+2 -3
View File
@@ -23,7 +23,7 @@ from boson_multimodal.data_collator.higgs_audio_collator import HiggsAudioSample
from boson_multimodal.data_types import ChatMLSample, AudioContent, Message
from boson_multimodal.dataset.chatml_dataset import (
ChatMLDatasetSample,
prepare_chatml_sample_qwen,
prepare_chatml_sample,
)
from ..config import settings
@@ -96,8 +96,7 @@ def transcribe_segment(audio_path: str, start_time: float, end_time: float) -> s
Message(role="user", content=[prompt, AudioContent(audio_url="placeholder")])
]
chatml = ChatMLSample(messages=messages)
prep_fn = partial(prepare_chatml_sample_qwen, enable_thinking=True)
input_tokens, _, _, _ = prep_fn(chatml, _tokenizer, add_generation_prompt=True)
input_tokens, _, _, _ = prepare_chatml_sample(chatml, _tokenizer)
sample = ChatMLDatasetSample(
input_ids=torch.LongTensor(input_tokens),