Update modeling_super_linear.py
Browse files- modeling_super_linear.py +1 -1
modeling_super_linear.py
CHANGED
|
@@ -360,7 +360,7 @@ class SparseNoisyMoE(nn.Module):
|
|
| 360 |
self.topk_gates = F.softmax(self.topk_values, dim=1)
|
| 361 |
|
| 362 |
batch_size = x.size(0)
|
| 363 |
-
if
|
| 364 |
x = self.fourier_interp_dim1(x)
|
| 365 |
expert_outputs = torch.stack([self.experts[i](x) for i in range(self.num_experts)], dim=1)
|
| 366 |
|
|
|
|
| 360 |
self.topk_gates = F.softmax(self.topk_values, dim=1)
|
| 361 |
|
| 362 |
batch_size = x.size(0)
|
| 363 |
+
if x.shape[1] < 512:
|
| 364 |
x = self.fourier_interp_dim1(x)
|
| 365 |
expert_outputs = torch.stack([self.experts[i](x) for i in range(self.num_experts)], dim=1)
|
| 366 |
|