llama-cpp-rs  by utilityai

Rust bindings for llama.cpp

Created 1 year ago
360 stars

Top 77.7% on SourcePulse

GitHubView on GitHub
Project Summary

This Rust library provides bindings for llama.cpp, enabling efficient local execution of large language models. It targets developers and researchers seeking to integrate LLM inference into Rust applications, offering a close-to-raw binding layer for maximum control and up-to-date compatibility with the llama.cpp project.

How It Works

The library leverages Rust's Foreign Function Interface (FFI) to directly call into the C++ llama.cpp library. This approach minimizes overhead and ensures that the Rust bindings remain synchronized with the underlying C++ implementation, facilitating rapid adoption of new features and optimizations from the llama.cpp project.

Quick Start & Requirements

  • Install/run: cargo run --release --bin simple -- --prompt "..." (requires cloning with --recursive or running git submodule update --init --recursive).
  • Prerequisites: Rust toolchain, C++ compiler, CUDA toolkit (for GPU acceleration, via --features cuda).
  • Links: GitHub Repository

Highlighted Details

  • Supports GPU offloading with CUDA.
  • Provides bindings for llama.cpp's core functionalities.
  • Aims for direct synchronization with the upstream llama.cpp project.

Maintenance & Community

The project is actively maintained by utilityai. Further community engagement details are not specified in the README.

Licensing & Compatibility

The project appears to be licensed under the MIT License, allowing for broad compatibility with commercial and closed-source applications.

Limitations & Caveats

The project explicitly states it does not follow semantic versioning (semver) meaningfully, prioritizing up-to-date compatibility with llama.cpp over strict API stability.

Health Check
Last Commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
21
Issues (30d)
4
Star History
20 stars in the last 30 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Anil Dash Anil Dash(Former CEO of Glitch), and
23 more.

llamafile by Mozilla-Ocho

0.1%
23k
Single-file LLM distribution and runtime via `llama.cpp` and Cosmopolitan Libc
Created 2 years ago
Updated 2 months ago
Feedback? Help us improve.