mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-11-11 21:39:52 +00:00
2.1 KiB
2.1 KiB
Pull requests
- Always squash-merge the PR before merging
- Use the following format for your final commit:
<module> : <commit title> (#<issue_number>)
. For example:utils : fix typo in utils.py (#1234)
- Test your changes:
- Using the commands in the
tests
folder. For instance, running the./tests/test-backend-ops
command tests different backend implementations of the GGML library - Execute the full CI locally on your machine before publishing
- Using the commands in the
- If the pull request contains only documentation changes (e.g., updating READMEs, adding new wiki pages), please add
[no ci]
to the commit title. This will skip unnecessary CI checks and help reduce build times - Please rate the complexity of your PR (i.e.
Review Complexity : Low
,Review Complexity : Medium
,Review Complexity : High
). This makes it easier for maintainers to triage the PRs.- The PR template has a series of review complexity checkboxes
[ ]
that you can mark as[X]
for your conveience
- The PR template has a series of review complexity checkboxes
Coding guidelines
- Avoid adding third-party dependencies, extra files, extra headers, etc.
- Always consider cross-compatibility with other operating systems and architectures
- Avoid fancy looking modern STL constructs, use basic
for
loops, avoid templates, keep it simple - There are no strict rules for the code style, but try to follow the patterns in the code (indentation, spaces, etc.). Vertical alignment makes things more readable and easier to batch edit
- Clean-up any trailing whitespaces, use 4 spaces for indentation, brackets on the same line,
void * ptr
,int & a
- Naming usually optimizes for common prefix (see https://github.com/ggerganov/ggml/pull/302#discussion_r1243240963)
- Tensors store data in row-major order. We refer to dimension 0 as columns, 1 as rows, 2 as matrices
- Matrix multiplication is unconventional:
C = ggml_mul_mat(ctx, A, B)
meansC^T = A B^T \Leftrightarrow C = B A^T.