-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various improvements & upgrade ggml (#75)
* Use types from typing for better compatibility with older Python versions * Split last double end of line token as per BlinkDL's suggestion * Fix MSVC warnings * Drop Q4_2 support * Update ggml * Bump file format version for quantization changes * Apply suggestions
- Loading branch information
1 parent
3ca9c7f
commit dea929f
Showing
13 changed files
with
230 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Code Style | ||
|
||
Please follow this code style when contributing to `rwkv.cpp`. | ||
|
||
This list is not complete. | ||
|
||
## General | ||
|
||
Overall, keep code in similar style as it was before. | ||
|
||
- Keep lines at 180 characters or shorter. | ||
- Separate logically grouped pieces of code with empty lines. | ||
- Surround `if`, `for`, `while`, `do` and other similar statements with empty lines. | ||
- Write documentation for public functions indended for outside use. | ||
- Place single-line comments on the line before, not right after the code line. | ||
- Start comments with a capital letter, use correct grammar and punctuation. | ||
|
||
## C/C++ | ||
|
||
- Use 4 spaces for indentation. | ||
- Use [The One True Brace Style](https://en.wikipedia.org/wiki/Indentation_style#Variant:_1TBS_(OTBS)): | ||
- Place braces on the same line as the statement. | ||
- Always add braces to `if`, `for`, `while`, `do` and other similar statements. | ||
|
||
## Python | ||
|
||
- Use 2 spaces for indentation. | ||
- Specify types for functions and parameters. | ||
- For `void` functions, specify `-> None`. | ||
- Specifying types for local variables: | ||
- required, if they are global | ||
- required, if they are compound (lists, dicts, optionals, etc.) | ||
- optional otherwise. | ||
- Use types from `typing` (`List`, `Dict`) instead of built-in (`list`, `dict`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule ggml
updated
48 files
Oops, something went wrong.