mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-04 09:32:00 +00:00 
			
		
		
		
	llama : correct rms norm for llama 4 (#12882)
This commit is contained in:
		@@ -4440,8 +4440,8 @@ struct llm_build_llama : public llm_graph_context {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                if (arch == LLM_ARCH_LLAMA4 && use_rope && hparams.use_kq_norm) {
 | 
					                if (arch == LLM_ARCH_LLAMA4 && use_rope && hparams.use_kq_norm) {
 | 
				
			||||||
                    // Llama4TextL2Norm
 | 
					                    // Llama4TextL2Norm
 | 
				
			||||||
                    Qcur = ggml_rms_norm(ctx0, Qcur, 1e-6);
 | 
					                    Qcur = ggml_rms_norm(ctx0, Qcur, hparams.f_norm_rms_eps);
 | 
				
			||||||
                    Kcur = ggml_rms_norm(ctx0, Kcur, 1e-6);
 | 
					                    Kcur = ggml_rms_norm(ctx0, Kcur, hparams.f_norm_rms_eps);
 | 
				
			||||||
                    cb(Qcur, "Qcur_normed", il);
 | 
					                    cb(Qcur, "Qcur_normed", il);
 | 
				
			||||||
                    cb(Kcur, "Kcur_normed", il);
 | 
					                    cb(Kcur, "Kcur_normed", il);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user