MCPcopy
hub / github.com/InternLM/lmdeploy / test_tokenizer_with_stop_words

Function test_tokenizer_with_stop_words

tests/test_lmdeploy/test_tokenizer.py:39–42  ·  view source on GitHub ↗
(model_path, stop_words)

Source from the content-addressed store, hash-verified

37])
38@pytest.mark.parametrize('stop_words', ['.', ' ', '?', ''])
39def test_tokenizer_with_stop_words(model_path, stop_words):
40 tokenizer = HuggingFaceTokenizer(model_path, trust_remote_code=True)
41 indexes = tokenizer.indexes_containing_token(stop_words)
42 assert indexes is not None
43
44
45def test_glm4_special_token():

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected