diff --git a/llama.cpp b/llama.cpp index e1daf1bbb..05726c8c1 100644 --- a/llama.cpp +++ b/llama.cpp @@ -3438,7 +3438,8 @@ static bool llm_load_tensors( 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; + model.output = ml.create_tensor(ctx_output_split, tn(LLM_TENSOR_TOKEN_EMBD, "weight"), {n_embd, n_vocab}); // needs to be on GPU + ml.n_tensors++; // artificial tensor } }