mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-14 14:28:58 +01:00
convert : remove now-unused ignore_nonllama parameter
This commit is contained in:
parent
909f6be291
commit
45983e3a47
@ -516,7 +516,7 @@ class LlamaHfVocab(Vocab):
|
|||||||
tokenizer_model = "llama"
|
tokenizer_model = "llama"
|
||||||
name = "hfft"
|
name = "hfft"
|
||||||
|
|
||||||
def __init__(self, base_path: Path, ignore_nonllama: bool = False):
|
def __init__(self, base_path: Path):
|
||||||
fname_tokenizer = base_path / FAST_TOKENIZER_FILE
|
fname_tokenizer = base_path / FAST_TOKENIZER_FILE
|
||||||
# if this fails, FileNotFoundError propagates to caller
|
# if this fails, FileNotFoundError propagates to caller
|
||||||
with open(fname_tokenizer, encoding='utf-8') as f:
|
with open(fname_tokenizer, encoding='utf-8') as f:
|
||||||
@ -524,9 +524,7 @@ class LlamaHfVocab(Vocab):
|
|||||||
|
|
||||||
# pre-check so we know if we need transformers
|
# pre-check so we know if we need transformers
|
||||||
tokenizer_model: dict[str, Any] = tokenizer_json['model']
|
tokenizer_model: dict[str, Any] = tokenizer_json['model']
|
||||||
if ignore_nonllama:
|
if (
|
||||||
pass # workaround incorrect use of this class for WordPiece
|
|
||||||
elif (
|
|
||||||
tokenizer_model['type'] != 'BPE' or not tokenizer_model.get('byte_fallback', False)
|
tokenizer_model['type'] != 'BPE' or not tokenizer_model.get('byte_fallback', False)
|
||||||
or tokenizer_json['decoder']['type'] != 'Sequence'
|
or tokenizer_json['decoder']['type'] != 'Sequence'
|
||||||
):
|
):
|
||||||
|
Loading…
Reference in New Issue
Block a user