Skip to content

Commit 784e11d

Browse files
README: add graphic for matrix multiplication (ggml-org#6881)
1 parent b4e4b8a commit 784e11d

File tree

3 files changed

+1241
-1
lines changed

3 files changed

+1241
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,9 @@ docker run --gpus all -v /path/to/models:/models local/llama.cpp:server-cuda -m
11171117
- Clean-up any trailing whitespaces, use 4 spaces for indentation, brackets on the same line, `void * ptr`, `int & a`
11181118
- See [good first issues](https://github.com/ggerganov/llama.cpp/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) for tasks suitable for first contributions
11191119
- Tensors store data in row-major order. We refer to dimension 0 as columns, 1 as rows, 2 as matrices
1120-
- Matrix multiplication is unconventional: [`z = ggml_mul_mat(ctx, x, y)`](https://github.com/ggerganov/llama.cpp/blob/880e352277fc017df4d5794f0c21c44e1eae2b84/ggml.h#L1058-L1064) means `zT = x @ yT`
1120+
- Matrix multiplication is unconventional: [`C = ggml_mul_mat(ctx, A, B)`](https://github.com/ggerganov/llama.cpp/blob/880e352277fc017df4d5794f0c21c44e1eae2b84/ggml.h#L1058-L1064) means $C^T = A B^T \Leftrightarrow C = B A^T.$
1121+
1122+
![matmul](media/matmul.png)
11211123
11221124
### Docs
11231125

media/matmul.png

259 KB
Loading

0 commit comments

Comments
 (0)