Fix: accept add_special_tokens in encode() for HuggingFace API compatibility

#112
Files changed (1) hide show
  1. tokenization_kimi.py +1 -0
tokenization_kimi.py CHANGED
@@ -156,6 +156,7 @@ class TikTokenTokenizer(PreTrainedTokenizer):
156
  def encode(self,
157
  text: str,
158
  allow_special_tokens: bool = True,
 
159
  **kwargs) -> List[int]:
160
  """
161
  Encodes a string into a list of token IDs.
 
156
  def encode(self,
157
  text: str,
158
  allow_special_tokens: bool = True,
159
+ add_special_tokens: bool = True,
160
  **kwargs) -> List[int]:
161
  """
162
  Encodes a string into a list of token IDs.