Crate llama_cpp_2

Source
Expand description

Bindings to the llama.cpp library.

As llama.cpp is a very fast moving target, this crate does not attempt to create a stable API with all the rust idioms. Instead it provided safe wrappers around nearly direct bindings to llama.cpp. This makes it easier to keep up with the changes in llama.cpp, but does mean that the API is not as nice as it could be.

§Examples

§Feature Flags

  • cuda enables CUDA gpu support.
  • sampler adds the [context::sample::sampler] struct for a more rusty way of sampling.

Modules§

  • Safe wrapper around llama_context.
  • Representation of an initialized llama backend
  • Safe wrapper around llama_batch.
  • A safe wrapper around llama_model.
  • Safe wrapper around llama_sampler.
  • Safe wrapper around llama_timings.
  • Safe wrappers around llama_token_data and llama_token_data_array.
  • Utilities for working with llama_token_type values.

Enums§

Functions§

Type Aliases§

  • A failable result from a llama.cpp function.