Downloads · 30 days
33
6% of all-time downloads
furusu/Anime-Llasa-3B-GGUF-Fix-Special
Anime-Llasa-3B-GGUF-Fix-Special is a machine learning model from furusu. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-4.0.
Downloads · 30 days
33
6% of all-time downloads
All-time downloads
574
Public
Repo size
9 GB
Likes
2
Public
Click a slice to open those files.
.gguf9 GB · 100%
From the Hugging Face model README
音声トークンがスペシャルトークンになる不具合を修正したGGUFです。
ついでにjinja templateにもテキストと音声の開始/終了トークンを追加してます。
以下関数を適当に書き換えることで変換しています。
↓
def does_token_look_special(self, token: str | bytes) -> bool:
if isinstance(token, (bytes, bytearray)):
token_text = token.decode(encoding="utf-8")
elif isinstance(token, memoryview):
token_text = token.tobytes().decode(encoding="utf-8")
else:
token_text = token
# Some models mark some added tokens which ought to be control tokens as not special.
# (e.g. command-r, command-r-plus, deepseek-coder, gemma{,-2})
seems_special = token_text in (
"<pad>", # deepseek-coder
"<mask>", "<2mass>", "[@BOS@]", # gemma{,-2}
)
seems_special = seems_special or (token_text.startswith("<|") and token_text.endswith("|>"))
seems_special = seems_special or (token_text.startswith("<|") and token_text.endswith("|>")) # deepseek-coder
# TODO: should these be marked as UNUSED instead? (maybe not)
seems_special = seems_special or (token_text.startswith("<unused") and token_text.endswith(">")) # gemma{,-2}
if (token_text.startswith("<|") and token_text.endswith("|>")) and token_text[2:-2].startswith("s_") and token_text[2:-2][2:].isdecimal():
seems_special = False
print(f"token {token_text} looks like a special token but isn't")
return seems_special