Fix boson_multimodal API: prepare_chatml_sample_qwen -> prepare_chatml_sample
This commit is contained in:
@@ -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.data_types import ChatMLSample, AudioContent, Message
|
||||||
from boson_multimodal.dataset.chatml_dataset import (
|
from boson_multimodal.dataset.chatml_dataset import (
|
||||||
ChatMLDatasetSample,
|
ChatMLDatasetSample,
|
||||||
prepare_chatml_sample_qwen,
|
prepare_chatml_sample,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ..config import settings
|
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")])
|
Message(role="user", content=[prompt, AudioContent(audio_url="placeholder")])
|
||||||
]
|
]
|
||||||
chatml = ChatMLSample(messages=messages)
|
chatml = ChatMLSample(messages=messages)
|
||||||
prep_fn = partial(prepare_chatml_sample_qwen, enable_thinking=True)
|
input_tokens, _, _, _ = prepare_chatml_sample(chatml, _tokenizer)
|
||||||
input_tokens, _, _, _ = prep_fn(chatml, _tokenizer, add_generation_prompt=True)
|
|
||||||
|
|
||||||
sample = ChatMLDatasetSample(
|
sample = ChatMLDatasetSample(
|
||||||
input_ids=torch.LongTensor(input_tokens),
|
input_ids=torch.LongTensor(input_tokens),
|
||||||
|
|||||||
Reference in New Issue
Block a user