@@ -263,7 +263,7 @@ def test_text_generation_phi4_moe(self):
263263 model = AutoModelForCausalLM .from_pretrained (
264264 model_path ,
265265 device_map = "cuda" ,
266- torch_dtype = "auto" ,
266+ dtype = "auto" ,
267267 trust_remote_code = True ,
268268 # if you do not use Ampere or later GPUs, change attention to "eager"
269269 # _attn_implementation='flash_attention_2',
@@ -352,7 +352,7 @@ def test_imagetext2text_generation_idefics(self):
352352 mid = "HuggingFaceM4/tiny-random-idefics"
353353 processor = AutoProcessor .from_pretrained (mid )
354354 model = IdeficsForVisionText2Text .from_pretrained (
355- mid , torch_dtype = torch .bfloat16 , device_map = "auto"
355+ mid , dtype = torch .bfloat16 , device_map = "auto"
356356 )
357357
358358 prompt = [
@@ -699,7 +699,7 @@ def test_falcon_mamba_dev(self):
699699 "text-generation" ,
700700 model = model ,
701701 tokenizer = tokenizer ,
702- torch_dtype = torch .bfloat16 ,
702+ dtype = torch .bfloat16 ,
703703 trust_remote_code = True ,
704704 device_map = "auto" ,
705705 )
@@ -736,7 +736,7 @@ def test_falcon_mamba_7b(self):
736736 "text-generation" ,
737737 model = model ,
738738 tokenizer = tokenizer ,
739- torch_dtype = torch .bfloat16 ,
739+ dtype = torch .bfloat16 ,
740740 trust_remote_code = True ,
741741 device_map = "auto" ,
742742 )
@@ -802,7 +802,7 @@ def test_text_to_image(self):
802802 from diffusers import StableDiffusionPipeline
803803
804804 model_id = "diffusers/tiny-torch-full-checker" # "stabilityai/stable-diffusion-2"
805- pipe = StableDiffusionPipeline .from_pretrained (model_id , torch_dtype = torch .float16 ).to (
805+ pipe = StableDiffusionPipeline .from_pretrained (model_id , dtype = torch .float16 ).to (
806806 "cuda"
807807 )
808808
0 commit comments