- Fix format issues

- Remove duplicate set kqv_out to llm_build_kv
This commit is contained in:
willhe 2024-03-28 08:57:27 +08:00
parent e4a16f2493
commit 4364308210
2 changed files with 4 additions and 3 deletions

View file

@ -778,6 +778,7 @@ class BaichuanModel(Model):
r = weights.shape[0] // 3 r = weights.shape[0] // 3
return weights[r * n_part:r * n_part + r, ...] return weights[r * n_part:r * n_part + r, ...]
@Model.register("XverseForCausalLM") @Model.register("XverseForCausalLM")
class XverseModel(Model): class XverseModel(Model):
model_arch = gguf.MODEL_ARCH.XVERSE model_arch = gguf.MODEL_ARCH.XVERSE
@ -919,6 +920,7 @@ class XverseModel(Model):
.reshape(weights.shape) .reshape(weights.shape)
) )
@Model.register("FalconForCausalLM", "RWForCausalLM") @Model.register("FalconForCausalLM", "RWForCausalLM")
class FalconModel(Model): class FalconModel(Model):
model_arch = gguf.MODEL_ARCH.FALCON model_arch = gguf.MODEL_ARCH.FALCON

View file

@ -6522,7 +6522,6 @@ struct llm_build_context {
cur = llm_build_kv(ctx0, model, hparams, kv_self, gf, cur = llm_build_kv(ctx0, model, hparams, kv_self, gf,
model.layers[il].wo, NULL, model.layers[il].wo, NULL,
Kcur, Vcur, Qcur, KQ_mask, KQ_pos, n_ctx, n_tokens, kv_head, n_kv, 1.0f/sqrtf(float(n_embd_head)), cb, il); Kcur, Vcur, Qcur, KQ_mask, KQ_pos, n_ctx, n_tokens, kv_head, n_kv, 1.0f/sqrtf(float(n_embd_head)), cb, il);
cb(cur, "kqv_out", il);
} }
if (il == n_layer - 1) { if (il == n_layer - 1) {