Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/models/mistral/test_modeling_mistral.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def test_model_7b_long_prompt_sdpa(self):

@slow
def test_speculative_generation(self):
EXPECTED_TEXT_COMPLETION = "My favourite condiment is 100% Sriracha. I love it on everything. I have it on my"
EXPECTED_TEXT_COMPLETION = "My favourite condiment is 100% ketchup. I’m not a fan of mustard, relish"
prompt = "My favourite condiment is "
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1", use_fast=False)
model = MistralForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1", device_map="auto", dtype=torch.float16)
Expand Down
2 changes: 1 addition & 1 deletion tests/models/qwen2/test_modeling_qwen2.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def test_model_450m_long_prompt_sdpa(self):
@slow
def test_speculative_generation(self):
EXPECTED_TEXT_COMPLETION = (
"My favourite condiment is 100% natural honey, and I always like to use it in my recipes. I love"
"My favourite condiment is 100% natural and organic, and I love to use it to make my own sauces."
)
prompt = "My favourite condiment is "
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2-7B", use_fast=False)
Expand Down
2 changes: 1 addition & 1 deletion tests/models/qwen2_moe/test_modeling_qwen2_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def test_model_a2_7b_long_prompt_sdpa(self):
@slow
def test_speculative_generation(self):
EXPECTED_TEXT_COMPLETION = (
"To be or not to be, that is the question. Whether 'tis nobler in the mind to suffer the sl"
"To be or not to be, that is the question: Whether 'tis nobler in the mind to suffer The sl"
)
prompt = "To be or not to"
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen1.5-MoE-A2.7B", use_fast=False)
Expand Down
2 changes: 1 addition & 1 deletion tests/models/qwen3/test_modeling_qwen3.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def test_speculative_generation(self):
{
("xpu", 3): "My favourite condiment is 100% peanut butter. I love it so much that I can't help but use it",
("cuda", 7): "My favourite condiment is 100% natural. It's a little spicy and a little sweet, but it's the",
("cuda", 8): "My favourite condiment is 100% peanut butter. I love it so much that I can't help but use it",
("cuda", 8): "My favourite condiment is 100% beef, 100% beef, 100% beef.",
}
) # fmt: skip
EXPECTED_TEXT_COMPLETION = EXPECTED_TEXT_COMPLETIONS.get_expectation()
Expand Down