Skip to content

Commit 73c84f3

Browse files
authored
Merge pull request #2 from eugenehp/git-patches
Create git patches for submodules
2 parents 0de8fbd + b7cde57 commit 73c84f3

29 files changed

+2349
-1610
lines changed

Cargo.lock

+191-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ members = [
66
]
77

88
[workspace.dependencies]
9-
thiserror = "1"
9+
thiserror = "2.0.3"
1010
tracing = "0.1"
1111
bindgen = "0.70.1"
12-
cc = "1.1.31"
12+
cc = "1.2.1"
1313
encoding_rs = "0.8.34"
1414

1515
[workspace.lints.rust]

README.md

+11-22
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,25 @@ Almost safe wrapper for [BitNet-cpp](https://github.com/microsoft/BitNet) based
44

55
## Development
66

7-
Add bitnet submodule:
8-
9-
```shell
10-
cd bitnet-cpp-sys
11-
git submodule add --name bitnet --depth 10 -- https://github.com/microsoft/BitNet.git bitnet
12-
```
13-
14-
Pull recursive updates:
15-
16-
```shell
17-
cd bitnet-cpp-sys/bitnet
18-
git submodule update --init --recursive
19-
```
20-
21-
Configure using python:
22-
23-
```shell
24-
cd bitnet-cpp-sys/bitnet
25-
pip install -r requirements.txt
26-
python setup_env.py --hf-repo HF1BitLLM/Llama3-8B-1.58-100B-tokens -q i2_s # only needs gen_code()
27-
```
7+
See [bitnet-cpp-sys](https://github.com/eugenehp/bitnet-cpp-rs/tree/main/bitnet-cpp-sys)
288

299
## Roadmap
3010

3111
- [ ] minimize crate size
32-
- [ ] rewrite sampler [PR 9294](https://github.com/ggerganov/llama.cpp/pull/9294)
12+
- [x] rewrite sampler [PR 9294](https://github.com/ggerganov/llama.cpp/pull/9294)
3313
- [ ] look into Metal implementation of MatMul kernerls for BitNet
3414
- [ ] add more examples
3515
- [ ] replace all remaining python from BitNet repo
3616
- [ ] add better division between `arm64` and `x86_64`
17+
- [ ] move python code generation into `patch` files
18+
19+
## Platform support
20+
21+
| arm64 | x64 | OS | comments |
22+
|---|---|---|---|
23+
||| MacOS | tested fully on Apple Silicon macs |
24+
| ⚠️ || Linux | should test on ARM based linux |
25+
||| Windows | we're using patches, so *-sys build won't work yet |
3726

3827
## Thanks
3928

bitnet-cpp-sys/BitNet

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 4943bfd286e2aaff566c6e5a13feb491de380cc3
1+
Subproject commit bf11a49f11b9d0535285cc4cdec834a28762ed87

0 commit comments

Comments
 (0)