From b0e00cb868b414cd135fc8a636343b2a583bc87e Mon Sep 17 00:00:00 2001 From: wonjun Jang Date: Sun, 15 Oct 2023 09:38:58 +0000 Subject: [PATCH] Update convert.py --- convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert.py b/convert.py index d6e6558c2..53204f21c 100755 --- a/convert.py +++ b/convert.py @@ -1108,7 +1108,7 @@ def load_vocab(path: Path, vocabtype: str | None) -> Vocab: # Be extra-friendly and accept either a file or a directory. Also, if it's # a directory, it might be the model directory, and tokenizer.model might # be in the parent of that. - if path.is_dir(): + if path.is_dir() and vocabtype != 'hf': vocab_file = "tokenizer.model" if vocabtype == 'bpe': vocab_file = "vocab.json"