59 releases

new 0.1.64 Jul 26, 2024
0.1.62 Jul 9, 2024
0.1.60 Jun 29, 2024
0.1.54 May 31, 2024
0.1.22 Jan 30, 2024

#73 in Machine learning

Download history 435/week @ 2024-04-01 374/week @ 2024-04-08 139/week @ 2024-04-15 302/week @ 2024-04-22 35/week @ 2024-04-29 95/week @ 2024-05-06 12/week @ 2024-05-13 178/week @ 2024-05-20 204/week @ 2024-05-27 285/week @ 2024-06-03 372/week @ 2024-06-10 376/week @ 2024-06-17 314/week @ 2024-06-24 89/week @ 2024-07-01 136/week @ 2024-07-08 19/week @ 2024-07-15

576 downloads per month
Used in 3 crates

MIT/Apache

3.5MB
74K SLoC

C 31K SLoC // 0.1% comments C++ 24K SLoC // 0.1% comments CUDA 7.5K SLoC // 0.0% comments Metal Shading Language 5.5K SLoC // 0.0% comments Rust 3.5K SLoC // 0.0% comments Objective-C 2.5K SLoC // 0.0% comments Python 39 SLoC // 0.3% 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.7–3MB
~63K SLoC