MCPcopy Create free account
hub / github.com/RL-Align/RL-Kernel / compact_token_ids

Method compact_token_ids

rl_engine/testing/rl_batch.py:67–68  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 return dense.reshape(-1, *dense.shape[2:])[self.flat_completion_mask]
66
67 def compact_token_ids(self) -> torch.Tensor:
68 return self.flat_token_ids[self.flat_completion_mask]
69
70 def benchmark_metadata(self) -> dict[str, Any]:
71 return {

Calls

no outgoing calls