mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-05-11 04:22:08 +00:00
fix AttributeError: 'MixtralLayer' object has no attribute 'mlp' (#2123)
https://github.com/huggingface/text-generation-inference/issues/2122
This commit is contained in:
parent
e0d168ba20
commit
5b977c3141
@ -153,7 +153,7 @@ class BaseFlashMistral(FlashCausalLM):
|
||||
|
||||
# TODO: this is a hack to avoid the gate_proj for
|
||||
# FlashStarcoder2 that doesnt have these layers
|
||||
if hasattr(layer.mlp, "gate_up_proj"):
|
||||
if hasattr(layer, "mlp") and hasattr(layer.mlp, "gate_up_proj"):
|
||||
layer_weights[(i, "gate_proj")] = (
|
||||
f"{prefix}.{i}.mlp.gate_proj",
|
||||
layer.mlp.gate_up_proj,
|
||||
|
Loading…
Reference in New Issue
Block a user