Unverified Commit 5777c3cb authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Fix (skip) a pipeline test for `RwkvModel` (#23444)



fix
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 8cfae440
...@@ -240,7 +240,11 @@ class TextGenerationPipelineTests(unittest.TestCase): ...@@ -240,7 +240,11 @@ class TextGenerationPipelineTests(unittest.TestCase):
# We don't care about infinite range models. # We don't care about infinite range models.
# They already work. # They already work.
# Skip this test for XGLM, since it uses sinusoidal positional embeddings which are resized on-the-fly. # Skip this test for XGLM, since it uses sinusoidal positional embeddings which are resized on-the-fly.
if tokenizer.model_max_length < 10000 and "XGLM" not in tokenizer.__class__.__name__: EXTRA_MODELS_CAN_HANDLE_LONG_INPUTS = ["RwkvForCausalLM", "XGLMForCausalLM"]
if (
tokenizer.model_max_length < 10000
and text_generator.model.__class__.__name__ not in EXTRA_MODELS_CAN_HANDLE_LONG_INPUTS
):
# Handling of large generations # Handling of large generations
with self.assertRaises((RuntimeError, IndexError, ValueError, AssertionError)): with self.assertRaises((RuntimeError, IndexError, ValueError, AssertionError)):
text_generator("This is a test" * 500, max_new_tokens=20) text_generator("This is a test" * 500, max_new_tokens=20)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment