Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 1.52 KB

README.md

File metadata and controls

40 lines (24 loc) · 1.52 KB

Go Reference go-ggml-transformers.cpp

ggml golang bindings to run transformers.

The go-llama.cpp bindings are high level, as such most of the work is kept into the C/C++ code to avoid any extra computational cost, be more performant and lastly ease out maintenance, while keeping the usage as simple as possible.

Check out this and this write-ups which summarize the impact of a low-level interface which calls C functions from Go.

If you are looking for an high-level OpenAI compatible API, check out here.

Usage

Note: This repository uses git submodules

Clone the repository locally:

git clone --recurse-submodules https://github.com/go-skynet/go-ggml-transformers.cpp

To build the bindings locally, run:

cd go-ggml-transformers.cpp
make libtransformers.a

Now you can run the example with:

LIBRARY_PATH=$PWD C_INCLUDE_PATH=$PWD go run ./examples -m "/model/path/here" -t 14

Enjoy!

The documentation is available here and the full example code is here.

License

MIT