Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
refactor: reintroduce ggml-sys and bindgen tool
Browse files Browse the repository at this point in the history
  • Loading branch information
philpax committed Apr 30, 2023
1 parent 1eb2e11 commit 181d823
Show file tree
Hide file tree
Showing 15 changed files with 1,797 additions and 128 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "ggml/ggml"]
path = ggml/ggml
path = ggml/sys/ggml
url = git@github.com:ggerganov/ggml.git
13 changes: 7 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ When new GGML versions are pushed to llama.cpp (or one of the other repos
hosting a copy of it) and we want to update our copy, the process should be as
follows:

- Update the `ggml.c` and `ggml.h` inside `ggml-sys/ggml`.
- In that same folder, update `CREDITS.txt` to indicate the llama.cpp version
these files were taken from
- Update the submodule to the latest version of GGML:
```shell
$ git submodule update --remote
```
- Run the bindgen script:
```shell
$ cargo run --bin generate-ggml-bindings ggml-sys
```
```shell
$ cargo run --bin generate-ggml-bindings ggml-sys
```
- Fix any compiler errors that pop up due to the new version of the bindings and
test the changes.
34 changes: 29 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ members = [
# Crates
"bloom",
"ggml",
"ggml/sys",
"gpt2",
"llama",
"llm",
"llm-base",
"llm-cli",
"tools/*"
]
resolver = "2"

Expand Down
7 changes: 2 additions & 5 deletions ggml/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ name = "ggml"
version = { workspace = true }
edition = "2021"

[build-dependencies]
bindgen = "0.64.0"
cc = "^1.0"

[dependencies]
thiserror = "1.0"
ggml-sys = { path = "sys" }

[dev-dependencies]
rand = "0.8"
rand = "0.8"
1 change: 0 additions & 1 deletion ggml/ggml
Submodule ggml deleted from 583c5a
Loading

0 comments on commit 181d823

Please sign in to comment.