#llama-cpp #llm #moe #offloading #cpu #date #powering

shimmy-llama-cpp-2

llama.cpp bindings for Rust with MoE CPU offloading support

1 unstable release

0.1.123 Oct 9, 2025

#795 in Machine learning

Download history 645/week @ 2025-10-09 184/week @ 2025-10-16 193/week @ 2025-10-23 312/week @ 2025-10-30 54/week @ 2025-11-06 44/week @ 2025-11-13 23/week @ 2025-11-20 43/week @ 2025-11-27 280/week @ 2025-12-04 51/week @ 2025-12-11 57/week @ 2025-12-18 18/week @ 2025-12-25 39/week @ 2026-01-01 273/week @ 2026-01-08

406 downloads per month
Used in shimmy

MIT/Apache

9.5MB
178K SLoC

C++ 107K SLoC // 0.1% comments C 28K SLoC // 0.0% comments CUDA 13K SLoC // 0.0% comments GLSL 11K SLoC // 0.0% comments Python 7K SLoC // 0.1% comments Metal Shading Language 6.5K SLoC // 0.1% comments Rust 4K SLoC // 0.0% comments Objective-C 1.5K SLoC // 0.1% 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

~5–10MB
~108K SLoC