Skip to content

Repository files navigation

llama.cpp-m

Pinned llama.cpp b10069 through C++23 modules; upstream API names are preserved.

English · 简体中文 · Upstream · Releases · mcpp · Index

C++23 License mcpp-community CI

Modules

  • import mcpplibs.mwrap.llamacpp;: llama.cpp model, context and inference APIs
  • import mcpplibs.mwrap.llamacpp.macros;: Typed macro constants

More Modules API -> Usage and API

Add The Package

mcpp new llama_app --template mcpplibs.mwrap.llamacpp@b10069
cd llama_app
mcpp run
[dependencies]
mcpplibs.mwrap.llamacpp = "b10069"

Minimal CPU Program

import mcpplibs.mwrap.llamacpp;
int main() { llama_backend_init(); llama_backend_free(); }

The default template checks CPU initialization without downloading a model.

CPU Chat Example

cd examples/chat-cpu
mcpp run -- /path/to/model.gguf "Hello"

A compatible local GGUF model is required for tokenization, decode and sampling.

Metal Chat Example

Use backend-metal on macOS ARM64; the example requires actual offload and Metal buffers.

Vulkan Chat Example

Use backend-vulkan on Linux. The example rejects silent CPU fallback. Shader generation, libstdc++ constraints and driver boundaries are in usage.

Supported Boundary

Pin b10069 exactly; it is not a semver range. .macros exposes mapped constants. Model quality and unsupported GPU configurations are not implied by the CPU template. Upstream policy · Validation · Apache-2.0

Wrapper: Apache-2.0, mcpp-community. Original upstream README and licenses. Upstream licenses remain unchanged.

Releases

Packages

Contributors

Languages