[NPU] recover accuracy for gemma3-4b-it from 54% to 72% (reduced by transformer5.3) (#21537)
This commit is contained in:
@@ -578,8 +578,9 @@ class Gemma3TextModel(PreTrainedModel):
|
|||||||
|
|
||||||
global_config = copy.deepcopy(config)
|
global_config = copy.deepcopy(config)
|
||||||
global_config.rope_parameters = {
|
global_config.rope_parameters = {
|
||||||
"rope_type": "default",
|
|
||||||
"rope_theta": global_theta,
|
"rope_theta": global_theta,
|
||||||
|
"factor": config.rope_parameters["full_attention"]["factor"],
|
||||||
|
"rope_type": "linear",
|
||||||
}
|
}
|
||||||
self.rotary_emb = Gemma3RotaryEmbedding(config=global_config)
|
self.rotary_emb = Gemma3RotaryEmbedding(config=global_config)
|
||||||
self.gradient_checkpointing = False
|
self.gradient_checkpointing = False
|
||||||
|
|||||||
Reference in New Issue
Block a user