Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 99aa304

Browse filesBrowse files
authored
llama : add support for EXAONE tied word embeddings (ggml-org#12451)
1 parent 8551c44 commit 99aa304
Copy full SHA for 99aa304

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎src/llama-model.cpp

Copy file name to clipboardExpand all lines: src/llama-model.cpp
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3264,7 +3264,12 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
32643264

32653265
// output
32663266
output_norm = create_tensor(tn(LLM_TENSOR_OUTPUT_NORM, "weight"), {n_embd}, 0);
3267-
output = create_tensor(tn(LLM_TENSOR_OUTPUT, "weight"), {n_embd, n_vocab}, 0);
3267+
output = create_tensor(tn(LLM_TENSOR_OUTPUT, "weight"), {n_embd, n_vocab}, TENSOR_NOT_REQUIRED);
3268+
3269+
// if output is NULL, init from the input tok embed
3270+
if (output == NULL) {
3271+
output = create_tensor(tn(LLM_TENSOR_TOKEN_EMBD, "weight"), {n_embd, n_vocab}, TENSOR_DUPLICATED);
3272+
}
32683273

32693274
for (int i = 0; i < n_layer; ++i) {
32703275
auto & layer = layers[i];

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.