(self, logits: torch.Tensor, *, output_kind: str = "tensor")
| 19 | |
| 20 | class FixedLogitsModel(torch.nn.Module): |
| 21 | def __init__(self, logits: torch.Tensor, *, output_kind: str = "tensor"): |
| 22 | super().__init__() |
| 23 | self.output_kind = output_kind |
| 24 | self.weight = torch.nn.Parameter(torch.tensor(1.0)) |
| 25 | self.register_buffer("base_logits", logits.clone()) |
| 26 | |
| 27 | def forward(self, input_ids: torch.Tensor, *, logit_bias: float = 0.0): |
| 28 | del input_ids |
nothing calls this directly
no outgoing calls
no test coverage detected