Update src/llama.cpp

This commit is contained in:
Georgi Gerganov 2024-07-06 10:22:09 +03:00 committed by GitHub
parent eb572f9ac6
commit c9d6700adc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7265,7 +7265,7 @@ static bool llm_load_tensors(
layer.ffn_norm = ml.create_tensor(ctx_layer, tn(LLM_TENSOR_FFN_NORM, "weight", i), {n_embd});
if (static_cast<uint32_t>(i) < hparams.n_layer_dense_lead) {
if (i < (int) hparams.n_layer_dense_lead) {
layer.ffn_gate = ml.create_tensor(ctx_split, tn(LLM_TENSOR_FFN_GATE, "weight", i), {n_embd, n_ff});
layer.ffn_down = ml.create_tensor(ctx_split, tn(LLM_TENSOR_FFN_DOWN, "weight", i), { n_ff, n_embd});
layer.ffn_up = ml.create_tensor(ctx_split, tn(LLM_TENSOR_FFN_UP, "weight", i), {n_embd, n_ff});