MCPcopy Create free account
hub / github.com/ml-explore/mlx-examples / __init__

Method __init__

llava/language.py:188–196  ·  view source on GitHub ↗
(self, config: TextConfig)

Source from the content-addressed store, hash-verified

186
187class LanguageModel(nn.Module):
188 def __init__(self, config: TextConfig):
189 super().__init__()
190 self.model_type = config.model_type
191 if self.model_type != "llama":
192 raise ValueError(
193 f"Model type {self.model_type} not supported. Currently only 'llama' is supported"
194 )
195 self.model = Llama(config)
196 self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
197
198 def __call__(
199 self,

Callers

nothing calls this directly

Calls 2

LlamaClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected