MCPcopy Create free account
hub / github.com/microsoft/BitNet / added_tokens

Method added_tokens

utils/convert.py:552–555  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

550 yield text, score, toktype
551
552 def added_tokens(self) -> Iterable[tuple[bytes, float, gguf.TokenType]]:
553 for text in self.added_tokens_list:
554 score = -1000.0
555 yield text.encode("utf-8"), score, gguf.TokenType.USER_DEFINED
556
557 def all_tokens(self) -> Iterable[tuple[bytes, float, gguf.TokenType]]:
558 yield from self.sentencepiece_tokens()

Callers 1

all_tokensMethod · 0.95

Calls 1

encodeMethod · 0.80

Tested by

no test coverage detected