MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / __init__

Method __init__

SwissArmyTransformer/sat/model/official/llama_model.py:71–84  ·  view source on GitHub ↗
(self, vocab_size, hidden_size)

Source from the content-addressed store, hash-verified

69
70class 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)

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 1

Tested by

no test coverage detected