MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / tok_encode

Method tok_encode

tensorrt_llm/evaluate/lm_eval.py:87–88  ·  view source on GitHub ↗
(self, string: str, **kwargs)

Source from the content-addressed store, hash-verified

85 return self.llm.tokenizer.name_or_path.replace("/", "__")
86
87 def tok_encode(self, string: str, **kwargs) -> List[int]:
88 return self.llm.tokenizer.encode(string, **kwargs)
89
90 def _loglikelihood_tokens(self, requests,
91 **kwargs) -> List[Tuple[float, bool]]:

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected