MCPcopy
hub / github.com/NVIDIA/TensorRT-LLM / encode

Method encode

tests/unittest/llmapi/test_llm.py:314–315  ·  view source on GitHub ↗
(self, text: str, **kwargs)

Source from the content-addressed store, hash-verified

312 return self.tokenizer.pad_token_id
313
314 def encode(self, text: str, **kwargs) -> List[int]:
315 return self.tokenizer.encode(text, **kwargs)
316
317 def decode(self, token_ids: List[int], **kwargs) -> str:
318 return self.tokenizer.decode(token_ids, **kwargs)

Callers 15

add_id_of_jsonMethod · 0.45
replace_contentFunction · 0.45
mainFunction · 0.45
create_requestFunction · 0.45
test_rl_perf_reproduceFunction · 0.45
sanity_checkFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected