Unverified Commit 9d0ca503 authored by icyboy™'s avatar icyboy™ Committed by GitHub
Browse files

fix AttributeError: 'MixtralLayer' object has no attribute 'mlp' (#2123)

https://github.com/huggingface/text-generation-inference/issues/2122
parent 2ce80194
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment