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

Method __init__

benchmarks/benchmark_stateless_executor.py:101–106  ·  view source on GitHub ↗
(self, vocab_size: int, hidden_dim: int)

Source from the content-addressed store, hash-verified

99 """Tiny model with both LM logits and scalar rewards in one forward."""
100
101 def __init__(self, vocab_size: int, hidden_dim: int):
102 super().__init__()
103 self.embedding = torch.nn.Embedding(vocab_size, hidden_dim)
104 self.lm_head = torch.nn.Linear(hidden_dim, vocab_size)
105 self.reward_head = torch.nn.Linear(hidden_dim, 1)
106 self.use_cache_calls: list[bool | None] = []
107
108 def forward(self, input_ids, attention_mask=None, use_cache=None):
109 self.use_cache_calls.append(use_cache)

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected