[Kernel] Expand MoE weight loading + Add Fused Marlin MoE Kernel (#7766)

Co-authored-by: ElizaWszola <eliza@neuralmagic.com>
This commit is contained in:
Dipika Sikka
2024-08-27 15:07:09 -07:00
committed by GitHub
co-authored by ElizaWszola
parent ed6f002d33
commit fc911880cc
16 changed files with 2383 additions and 86 deletions
+1 -1
View File
@@ -920,7 +920,7 @@ class JambaForCausalLM(nn.Module, HasInnerState):
weight_loader = param.weight_loader
weight_loader(param,
loaded_weight,
weight_name,
name,
shard_id=shard_id,
expert_id=expert_id)
break
+1
View File
@@ -73,6 +73,7 @@ class MixtralMoE(nn.Module):
self.hidden_size = hidden_size
# Gate always runs at half / full precision for now.
self.gate = ReplicatedLinear(hidden_size,
num_experts,
bias=False,