MCPcopy Create free account
hub / github.com/pytorch/executorch / __init__

Method __init__

examples/mediatek/models/llm_models/modeling_common.py:63–70  ·  view source on GitHub ↗
(self, config: BaseConfig)

Source from the content-addressed store, hash-verified

61
62class MLP(nn.Module):
63 def __init__(self, config: BaseConfig):
64 super().__init__()
65 hidden_size = config.hidden_size
66 intermediate_size = config.intermediate_size
67
68 self.gate_proj = nn.Linear(hidden_size, intermediate_size)
69 self.down_proj = nn.Linear(intermediate_size, hidden_size)
70 self.up_proj = nn.Linear(hidden_size, intermediate_size)
71
72 def forward(self, x):
73 gate = self.gate_proj(x)

Callers 7

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected