MCPcopy Create free account
hub / github.com/bitsandbytes-foundation/bitsandbytes / __init__

Method __init__

tests/test_parametrize.py:212–215  ·  view source on GitHub ↗
(self, device, dtype)

Source from the content-addressed store, hash-verified

210
211 class SimpleMoE(nn.Module):
212 def __init__(self, device, dtype):
213 super().__init__()
214 # Expert weights: [num_experts, input_dim, output_dim]
215 self.expert_weights = nn.Parameter(torch.randn(4, 32, 64, dtype=dtype, device=device))
216
217 def forward(self, x, expert_idx=0):
218 # Select and use specific expert weight matrix

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected