(self, device, dtype)
| 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 |