Skip to content

Commit

Permalink
Fix failling GGML test (huggingface#34871)
Browse files Browse the repository at this point in the history
fix_test
  • Loading branch information
MekkCyber authored Nov 25, 2024
1 parent b76a292 commit 890ea7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/quantization/ggml/test_ggml.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,8 @@ def test_falcon7b_q2_k(self):
torch_dtype=torch.float16,
)

text = tokenizer(self.example_text, return_tensors="pt").to(torch_device)
out = model.generate(**text, max_new_tokens=10)
text = tokenizer(self.example_text, return_tensors="pt")["input_ids"].to(torch_device)
out = model.generate(text, max_new_tokens=10)

EXPECTED_TEXT = "Hello All,\nI am new to this forum."
self.assertEqual(tokenizer.decode(out[0], skip_special_tokens=True), EXPECTED_TEXT)
Expand Down

0 comments on commit 890ea7d

Please sign in to comment.