We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecd6617 commit 9e01433Copy full SHA for 9e01433
ggml_extend.hpp
@@ -1310,7 +1310,12 @@ class Linear : public UnaryBlock {
1310
}
1311
1312
auto im = ggml_mul_mat(ctx, x, w);
1313
- auto imv = ggml_diag(ctx, im);
+ auto empty = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, im.ne[0]);
1314
+ auto eyev = ggml_set_f32(eye, 1.0f);
1315
+ auto eye = ggml_diag(ctx, eyev);
1316
+ auto imm = ggml_mul_mat(ctx, im, eye);
1317
+ auto ims = ggml_sum_rows(ctx, imm);
1318
+ auto imv = ggml_reshape_1d(ctx, ims, im.ne[0]);
1319
1320
//
1321
print_ggml_tensor(x, true, "imatrix x");
0 commit comments