Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Embed local LLMs in your app: load GGUF checkpoints, chat on-device or on the GPU, and keep data off the cloud. This crate is the Rust engine that also powers the Python, Flutter, React Native, Swift, and Kotlin bindings.
Documentation: www.quaynor.site · docs.rs/quaynor
Install
GPU backends are enabled per platform: Metal on macOS/iOS, Vulkan on desktop x86/x86_64/aarch64 Linux and Windows. Building compiles llama.cpp from source via llama-cpp-2, so you need CMake and a C/C++ toolchain.
Chat
Models load from local paths, plain URLs, or Hugging Face paths (hf://owner/repo/file.gguf, downloaded and cached automatically):
use ChatBuilder;
use get_model;
use Arc;
Prefer async? ChatBuilder::build_async() returns a ChatHandleAsync whose ask yields a TokenStreamAsync with next_token().await / completed().await.
Tool calling
Grammar-constrained tool use via GBNF — the model can only emit valid calls:
use ChatBuilder;
use Tool;
use Arc;
let circle_area = new;
# let model: = unimplemented!;
let chat = new.with_tool.build;
Built-in sandboxed tools are available too: Tool::python(..) (via monty) and Tool::bash(..) (via bashkit) — both fully isolated from the host.
Beyond chat
- Embeddings —
quaynor::encoderfor embedding generation. - Reranking —
quaynor::crossencoderfor cross-encoder scoring. - Tokenizer utilities —
quaynor::tokenizer. - Chat templates — Minijinja-rendered model chat templates in
quaynor::template. - Sampling — presets and full sampler chains in
quaynor::sampler_config. - Vision — pass a multimodal projector to
get_modeland send image prompts where the model supports it.
Logging
Forward llama.cpp logs into the tracing ecosystem:
send_llamacpp_logs_to_tracing;
License
MIT