Skip to content

Commit f514049

Browse files
ydshiehzucchini-nlp
authored andcommitted
Fix tests failed with gated repos. (huggingface#37484)
* fix * slow --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
1 parent b75ad38 commit f514049

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/generation/test_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
require_accelerate,
3535
require_flash_attn,
3636
require_optimum_quanto,
37+
require_read_token,
3738
require_torch,
3839
require_torch_accelerator,
3940
require_torch_gpu,
@@ -4284,6 +4285,8 @@ def test_generate_compile_fullgraph_tiny(self):
42844285
gen_out = compiled_generate(**model_inputs, generation_config=generation_config)
42854286
self.assertTrue(gen_out.shape[1] > model_inputs["input_ids"].shape[1]) # some text was generated
42864287

4288+
@require_read_token
4289+
@slow
42874290
def test_assisted_generation_early_exit(self):
42884291
"""
42894292
Tests that assisted generation with early exit works as expected. Under the hood, this has complex cache
@@ -4792,6 +4795,7 @@ def test_generate_vision2text_conditioning(self):
47924795
self.assertTrue(np.array_equal(output_sequences_decoder_input_ids, output_sequences_input_ids))
47934796
self.assertTrue(np.array_equal(output_sequences_decoder_input_ids[:, 1:2], conditioning_input))
47944797

4798+
@require_read_token
47954799
@slow
47964800
@require_torch_gpu
47974801
def test_cache_device_map_with_vision_layer_device_map(self):

0 commit comments

Comments
 (0)