69 releases

0.1.85 Dec 5, 2024
0.1.84 Nov 27, 2024
0.1.83 Oct 29, 2024
0.1.64 Jul 26, 2024
0.1.45 Mar 27, 2024

#65 in Machine learning

Download history 359/week @ 2024-08-21 175/week @ 2024-08-28 19/week @ 2024-09-04 111/week @ 2024-09-11 119/week @ 2024-09-18 121/week @ 2024-09-25 257/week @ 2024-10-02 455/week @ 2024-10-09 241/week @ 2024-10-16 184/week @ 2024-10-23 274/week @ 2024-10-30 234/week @ 2024-11-06 477/week @ 2024-11-13 344/week @ 2024-11-20 371/week @ 2024-11-27 316/week @ 2024-12-04

1,570 downloads per month
Used in 5 crates

MIT/Apache

5MB
100K SLoC

C++ 50K SLoC // 0.1% comments C 34K SLoC // 0.1% comments CUDA 8K SLoC // 0.0% comments Python 3.5K SLoC // 0.1% comments GLSL 3K SLoC // 0.0% comments Rust 2.5K SLoC // 0.0% comments

llama-cpp-rs-2

A wrapper around the llama-cpp library for rust.

Info

This is part of the project powering all the LLMs at utilityai, it is tightly coupled llama.cpp and mimics its API as closly as possible while being safe in order to stay up to date.

Dependencies

This uses bindgen to build the bindings to llama.cpp. This means that you need to have clang installed on your system.

If this is a problem for you, open an issue, and we can look into including the bindings.

See bindgen for more information.

Disclaimer

This crate is not safe. There is absolutly ways to misuse the llama.cpp API provided to create UB, please create an issue if you spot one. Do not use this code for tasks where UB is not acceptable.

This is not a simple library to use. In an ideal world a nice abstraction would be written on top of this crate to provide an ergonomic API - the benefits of this crate over raw bindings is safety (and not much of it as that) and not much else.

We compensate for this shortcoming (we hope) by providing lots of examples and good documentation. Testing is a work in progress.

Contributing

Contributions are welcome. Please open an issue before starting work on a non-trivial PR.

Dependencies

~0.6–3.5MB
~67K SLoC