Skip to content

Commit 58e13b9

Browse files
authored
Update expected values for some test_speculative_generation (#40949)
* fix * fix --------- Co-authored-by: ydshieh <[email protected]>
1 parent 529d3a2 commit 58e13b9

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

tests/models/mistral/test_modeling_mistral.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def test_model_7b_long_prompt_sdpa(self):
254254

255255
@slow
256256
def test_speculative_generation(self):
257-
EXPECTED_TEXT_COMPLETION = "My favourite condiment is 100% Sriracha. I love it on everything. I have it on my"
257+
EXPECTED_TEXT_COMPLETION = "My favourite condiment is 100% ketchup. I’m not a fan of mustard, relish"
258258
prompt = "My favourite condiment is "
259259
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1", use_fast=False)
260260
model = MistralForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1", device_map="auto", dtype=torch.float16)

tests/models/qwen2/test_modeling_qwen2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def test_model_450m_long_prompt_sdpa(self):
207207
@slow
208208
def test_speculative_generation(self):
209209
EXPECTED_TEXT_COMPLETION = (
210-
"My favourite condiment is 100% natural honey, and I always like to use it in my recipes. I love"
210+
"My favourite condiment is 100% natural and organic, and I love to use it to make my own sauces."
211211
)
212212
prompt = "My favourite condiment is "
213213
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2-7B", use_fast=False)

tests/models/qwen2_moe/test_modeling_qwen2_moe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def test_model_a2_7b_long_prompt_sdpa(self):
252252
@slow
253253
def test_speculative_generation(self):
254254
EXPECTED_TEXT_COMPLETION = (
255-
"To be or not to be, that is the question. Whether 'tis nobler in the mind to suffer the sl"
255+
"To be or not to be, that is the question: Whether 'tis nobler in the mind to suffer The sl"
256256
)
257257
prompt = "To be or not to"
258258
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen1.5-MoE-A2.7B", use_fast=False)

tests/models/qwen3/test_modeling_qwen3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def test_speculative_generation(self):
199199
{
200200
("xpu", 3): "My favourite condiment is 100% peanut butter. I love it so much that I can't help but use it",
201201
("cuda", 7): "My favourite condiment is 100% natural. It's a little spicy and a little sweet, but it's the",
202-
("cuda", 8): "My favourite condiment is 100% peanut butter. I love it so much that I can't help but use it",
202+
("cuda", 8): "My favourite condiment is 100% beef, 100% beef, 100% beef.",
203203
}
204204
) # fmt: skip
205205
EXPECTED_TEXT_COMPLETION = EXPECTED_TEXT_COMPLETIONS.get_expectation()

0 commit comments

Comments
 (0)