Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e211d7b

Browse files
authored
Lint
1 parent 27dbd64 commit e211d7b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llama_cpp/llama_tokenizer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import abc
44
from typing import (
5+
Any,
56
List,
67
Optional,
7-
Any,
88
)
99

1010
import llama_cpp
@@ -62,7 +62,7 @@ def decode(self, tokens: List[int]) -> str:
6262
return self.detokenize(tokens).decode("utf-8", errors="ignore")
6363

6464
@classmethod
65-
def from_ggml_file(cls, path: str) -> "LlamaTokenizer":
65+
def from_ggml_file(cls, path: str) -> LlamaTokenizer:
6666
return cls(llama_cpp.Llama(model_path=path, vocab_only=True))
6767

6868

@@ -92,7 +92,7 @@ def detokenize(
9292
return self.hf_tokenizer.decode(tokens).encode("utf-8", errors="ignore")
9393

9494
@classmethod
95-
def from_pretrained(cls, pretrained_model_name_or_path: str) -> "LlamaHFTokenizer":
95+
def from_pretrained(cls, pretrained_model_name_or_path: str) -> LlamaHFTokenizer:
9696
try:
9797
from transformers import AutoTokenizer
9898
except ImportError:

0 commit comments

Comments
 (0)