falcon arch fix for tied output embeddings

This commit is contained in:
John 2024-01-16 15:21:13 +01:00 committed by GitHub
parent 862f5e41ab
commit 94f330ad45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3435,7 +3435,11 @@ static bool llm_load_tensors(
{
model.output_norm = ml.create_tensor(ctx_output, tn(LLM_TENSOR_OUTPUT_NORM, "weight"), {n_embd});
model.output_norm_b = ml.create_tensor(ctx_output, tn(LLM_TENSOR_OUTPUT_NORM, "bias"), {n_embd});
model.output = ml.create_tensor(ctx_output_split, tn(LLM_TENSOR_OUTPUT, "weight"), {n_embd, n_vocab});
if (gguf_find_tensor(ml.ctx_gguf, tn(LLM_TENSOR_OUTPUT, "weight").c_str()) >= 0) {
model.output = ml.create_tensor(ctx_output_split, tn(LLM_TENSOR_OUTPUT, "weight"), {n_embd, n_vocab});
} else {
model.output = model.tok_embd;
}
}
for (int i = 0; i < n_layer; ++i) {