(self, vocab_size, hidden_size)
| 69 | |
| 70 | class LMMixin(BaseMixin): |
| 71 | def __init__(self, vocab_size, hidden_size): |
| 72 | super().__init__() |
| 73 | self.lm_head = ColumnParallelLinear( |
| 74 | hidden_size, |
| 75 | vocab_size, |
| 76 | gather_output=True, |
| 77 | # init_method=init_method, |
| 78 | bias=False, |
| 79 | # params_dtype=params_dtype, |
| 80 | module=self, |
| 81 | name="lm_head", |
| 82 | # skip_init=skip_init, |
| 83 | # device=device |
| 84 | ) |
| 85 | |
| 86 | def final_forward(self, logits, **kwargs): |
| 87 | return self.lm_head(logits) |
no test coverage detected