diff options
author | Kawrakow <iwankawrakow@gmail.com> | 2025-03-10 16:19:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-10 16:19:09 +0200 |
commit | a48e16324770bb829406d06e11be1df0c8a3b517 (patch) | |
tree | 1f0ef5e1fd55c35acac40cca85cadc8606dd0673 /examples | |
parent | 699c9cb7f63dd8431bce91b86e10efb41255f6c1 (diff) |
DeepSeek imatrix stuff (#250)
* This gives us ~20% TG speedup for DeepSeek on CUDA
* Slightly better
* Also do it for plain (not fused) mul_mat_id
* Guard against numerical precision issues for MLA on CUDA
* imatrix: wv_b <-> wkv_b
---------
Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/imatrix/imatrix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/imatrix/imatrix.cpp b/examples/imatrix/imatrix.cpp index 8006988c..d8a43049 100644 --- a/examples/imatrix/imatrix.cpp +++ b/examples/imatrix/imatrix.cpp @@ -195,7 +195,7 @@ bool IMatrixCollector::collect_imatrix(struct ggml_tensor * t, bool ask, void * if (m_params.verbosity > 1) { printf("%s[%d]: %32s, %s, %5d x %5d, %d\n", __func__, m_last_call, wname.c_str(), ggml_op_name(t->op), (int)src1->ne[0], (int)src1->ne[1], (int)src1->type); } - for (int row = 0; row < (int)src1->ne[1]; ++row) { + for (int row = 0; row < (int)(src1->ne[1]*src1->ne[2]); ++row) { const float * x = data + row * src1->ne[0]; for (int j = 0; j < (int)src1->ne[0]; ++j) { e.values[j] += x[j]*x[j]; |