Unverified Commit e31045f9 authored by Lucia Fang's avatar Lucia Fang Committed by GitHub
Browse files

[Bugfix] fix pp for llama4 (#16746)


Signed-off-by: default avatarLu Fang <fanglu@fb.com>
parent aaec845f
...@@ -672,9 +672,9 @@ class Llama4ForConditionalGeneration(nn.Module, SupportsMultiModal, ...@@ -672,9 +672,9 @@ class Llama4ForConditionalGeneration(nn.Module, SupportsMultiModal,
self.config, self.config,
None, None,
prefix=maybe_prefix(prefix, "multi_modal_projector")) prefix=maybe_prefix(prefix, "multi_modal_projector"))
self.language_model = _initialize_model( self.language_model = _initialize_model(
vllm_config=vllm_config.with_hf_config(config.text_config), vllm_config=vllm_config.with_hf_config(config.text_config,
["LlamaForCausalLM"]),
prefix=maybe_prefix(prefix, "language_model"), prefix=maybe_prefix(prefix, "language_model"),
model_class=Llama4ForCausalLM, model_class=Llama4ForCausalLM,
) )
...@@ -824,7 +824,7 @@ class Llama4ForConditionalGeneration(nn.Module, SupportsMultiModal, ...@@ -824,7 +824,7 @@ class Llama4ForConditionalGeneration(nn.Module, SupportsMultiModal,
# language_model is an Llama4ForCausalLM instance. We load it's # language_model is an Llama4ForCausalLM instance. We load it's
# using llama4's load_weights routine. # using llama4's load_weights routine.
language_model_weights, other_weights = self.separate_weights( language_model_weights, other_weights = self.separate_weights(
weights, prefix="language_model.model.") weights, prefix="language_model.")
loader = AutoWeightsLoader(self) loader = AutoWeightsLoader(self)
loaded_language_model_params = loader.load_weights( loaded_language_model_params = loader.load_weights(
language_model_weights) language_model_weights)
......
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