Skip to content

Commit dc1a813

Browse files
author
lvyuanjun.lyj
committed
update
1 parent 14de068 commit dc1a813

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

tests/models/qwen2_5_omni/test_modeling_qwen2_5_omni.py

+6-14
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ def test_resize_embeddings_untied_with_deepspeed(self):
728728
@require_torch
729729
class Qwen2_5OmniModelIntegrationTest(unittest.TestCase):
730730
def setUp(self):
731-
self.processor = AutoProcessor.from_pretrained("/home/xj_data/lvyuanjun.lyj/res/navit_thinker_talker/test")
731+
self.processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-Omni-7B")
732732
self.audio_url = "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen2-Audio/audio/glass-breaking-151256.mp3"
733733
self.audio_url_additional = (
734734
"https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen2-Audio/audio/f2641_0_throatclearing.wav"
@@ -758,9 +758,7 @@ def tearDown(self):
758758

759759
@slow
760760
def test_small_model_integration_test(self):
761-
model = Qwen2_5OmniModel.from_pretrained(
762-
"/home/xj_data/lvyuanjun.lyj/res/navit_thinker_talker/test", torch_dtype=torch.float32, device_map="auto"
763-
)
761+
model = Qwen2_5OmniModel.from_pretrained("Qwen/Qwen2.5-Omni-7B", torch_dtype=torch.float32, device_map="auto")
764762

765763
text = self.processor.apply_chat_template(self.messages, tokenize=False, add_generation_prompt=True)
766764
inputs = self.processor(
@@ -818,9 +816,7 @@ def test_small_model_integration_test(self):
818816

819817
@slow
820818
def test_small_model_integration_test_batch(self):
821-
model = Qwen2_5OmniModel.from_pretrained(
822-
"/home/xj_data/lvyuanjun.lyj/res/navit_thinker_talker/test", torch_dtype=torch.float32, device_map="auto"
823-
)
819+
model = Qwen2_5OmniModel.from_pretrained("Qwen/Qwen2.5-Omni-7B", torch_dtype=torch.float32, device_map="auto")
824820
text = self.processor.apply_chat_template(self.messages, tokenize=False, add_generation_prompt=True)
825821
inputs = self.processor(
826822
text=[text, text],
@@ -844,9 +840,7 @@ def test_small_model_integration_test_batch(self):
844840

845841
@slow
846842
def test_small_model_integration_test_multiturn(self):
847-
model = Qwen2_5OmniModel.from_pretrained(
848-
"/home/xj_data/lvyuanjun.lyj/res/navit_thinker_talker/test", torch_dtype=torch.float32, device_map="auto"
849-
)
843+
model = Qwen2_5OmniModel.from_pretrained("Qwen/Qwen2.5-Omni-7B", torch_dtype=torch.float32, device_map="auto")
850844

851845
messages = [
852846
self.messages[0],
@@ -883,9 +877,7 @@ def test_small_model_integration_test_multiturn(self):
883877

884878
@slow
885879
def test_small_model_integration_test_w_audio(self):
886-
model = Qwen2_5OmniModel.from_pretrained(
887-
"/home/xj_data/lvyuanjun.lyj/res/navit_thinker_talker/test", torch_dtype=torch.float32, device_map="auto"
888-
)
880+
model = Qwen2_5OmniModel.from_pretrained("Qwen/Qwen2.5-Omni-7B", torch_dtype=torch.float32, device_map="auto")
889881
audio_url = "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen2-Audio/audio/guess_age_gender.wav"
890882

891883
messages = [
@@ -918,7 +910,7 @@ def test_small_model_integration_test_w_audio(self):
918910
@require_torch_gpu
919911
def test_small_model_integration_test_batch_flashatt2(self):
920912
model = Qwen2_5OmniModel.from_pretrained(
921-
"/home/xj_data/lvyuanjun.lyj/res/navit_thinker_talker/test",
913+
"Qwen/Qwen2.5-Omni-7B",
922914
torch_dtype=torch.bfloat16,
923915
attn_implementation="flash_attention_2",
924916
device_map="auto",

0 commit comments

Comments
 (0)