Skip to content

Commit

Permalink
Falcon3: fix test_tokenizer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ysjprojects committed Dec 22, 2024
1 parent d47b531 commit 33ad8af
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,15 @@ def test_tokenizer_against_hf(config):
else:
assert ours.vocab_size == config.vocab_size

if config.name.startswith(("falcon", "stablecode", "Qwen2.5", "QwQ")) or (config.name.startswith("Falcon3") and config.name.endswith("-Instruct")):
if config.name.startswith(("falcon", "stablecode", "Qwen2.5", "QwQ")):
# even though their config defines it, it's set as None in HF
assert isinstance(ours.bos_id, int)
assert theirs.bos_token_id is None
elif config.name.startswith("Falcon3"):
if isinstance(ours.bos_id, int):
assert theirs.bos_token_id is None
else:
assert ours.bos_id == theirs.bos_token_id == None
else:
assert ours.bos_id == theirs.bos_token_id

Expand Down

0 comments on commit 33ad8af

Please sign in to comment.