(self, vocab_size: int, hidden_dim: int)
| 60 | """Small deterministic causal-LM-like module for executor smoke benchmarks.""" |
| 61 | |
| 62 | def __init__(self, vocab_size: int, hidden_dim: int): |
| 63 | super().__init__() |
| 64 | self.embedding = torch.nn.Embedding(vocab_size, hidden_dim) |
| 65 | self.proj = torch.nn.Linear(hidden_dim, vocab_size) |
| 66 | self.use_cache_calls: list[bool | None] = [] |
| 67 | |
| 68 | def forward(self, input_ids, attention_mask=None, use_cache=None): |
| 69 | del attention_mask |