llama: rwkv6: Avoid division by zero

Co-authored-by: compilade <git@compilade.net>
This commit is contained in:
Molly Sophia 2024-08-31 11:59:30 +08:00 committed by GitHub
parent 59dc2e7099
commit 5175375715
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15156,7 +15156,7 @@ struct llm_build_context {
) )
); );
if ((il + 1) % hparams.rescale_every_n_layers == 0) { if (hparams.rescale_every_n_layers != 0 && (il + 1) % hparams.rescale_every_n_layers == 0) {
cur = ggml_scale(ctx0, cur, 0.5F); cur = ggml_scale(ctx0, cur, 0.5F);
} }