fix AttributeError: 'MixtralLayer' object has no attribute 'mlp' (#2123)
https://github.com/huggingface/text-generation-inference/issues/2122
This commit is contained in:
parent
2ce8019480
commit
9d0ca503a8
|
@ -153,7 +153,7 @@ class BaseFlashMistral(FlashCausalLM):
|
||||||
|
|
||||||
# TODO: this is a hack to avoid the gate_proj for
|
# TODO: this is a hack to avoid the gate_proj for
|
||||||
# FlashStarcoder2 that doesnt have these layers
|
# 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")] = (
|
layer_weights[(i, "gate_proj")] = (
|
||||||
f"{prefix}.{i}.mlp.gate_proj",
|
f"{prefix}.{i}.mlp.gate_proj",
|
||||||
layer.mlp.gate_up_proj,
|
layer.mlp.gate_up_proj,
|
||||||
|
|
Loading…
Reference in New Issue