MCPcopy Create free account
hub / github.com/OpenManus/OpenManus-RL / decode

Method decode

test/test_rollout_env.py:70–73  ·  view source on GitHub ↗
(self, tokens, skip_special_tokens=True)

Source from the content-addressed store, hash-verified

68 return tokens
69
70 def decode(self, tokens, skip_special_tokens=True):
71 if isinstance(tokens, torch.Tensor):
72 tokens = tokens.tolist()
73 return ''.join([chr(t) for t in tokens if t < 128])
74
75 def batch_decode(self, sequences, skip_special_tokens=True):
76 return [self.decode(seq, skip_special_tokens) for seq in sequences]

Callers 1

batch_decodeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected