50 releases

new 0.1.53 May 25, 2024
0.1.52 May 8, 2024
0.1.51 Apr 25, 2024
0.1.45 Mar 27, 2024
0.1.22 Jan 30, 2024

#102 in Machine learning

Download history 64/week @ 2024-02-02 31/week @ 2024-02-09 301/week @ 2024-02-16 674/week @ 2024-02-23 707/week @ 2024-03-01 597/week @ 2024-03-08 475/week @ 2024-03-15 287/week @ 2024-03-22 276/week @ 2024-03-29 243/week @ 2024-04-05 367/week @ 2024-04-12 340/week @ 2024-04-19 86/week @ 2024-04-26 81/week @ 2024-05-03 30/week @ 2024-05-10 9/week @ 2024-05-17

340 downloads per month
Used in bonitox


77K SLoC

C 33K SLoC // 0.1% comments C++ 23K SLoC // 0.1% comments CUDA 10K SLoC // 0.0% comments Metal Shading Language 5.5K SLoC // 0.0% comments Rust 2.5K SLoC // 0.0% comments Objective-C 2.5K SLoC // 0.0% comments


A wrapper around the llama-cpp library for rust.


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.


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.


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.


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


~63K SLoC