- C++ 55.6%
- C 16.3%
- Python 7.7%
- Cuda 5%
- TypeScript 4.5%
- Other 10.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .devops | ||
| .gemini | ||
| .github | ||
| .pi/gg | ||
| app | ||
| benches | ||
| ci | ||
| cmake | ||
| common | ||
| conversion | ||
| docs | ||
| examples | ||
| ggml | ||
| gguf-py | ||
| grammars | ||
| include | ||
| licenses | ||
| media | ||
| models | ||
| pocs | ||
| requirements | ||
| scripts | ||
| skills | ||
| src | ||
| tardits2gguf | ||
| tests | ||
| tools | ||
| vendor | ||
| .clang-format | ||
| .clang-tidy | ||
| .dockerignore | ||
| .ecrc | ||
| .editorconfig | ||
| .flake8 | ||
| .gitignore | ||
| .gitmodules | ||
| .pre-commit-config.yaml | ||
| AGENTS.md | ||
| AUTHORS | ||
| build-xcframework.sh | ||
| CLAUDE.md | ||
| CMakeLists.txt | ||
| CMakePresets.json | ||
| CODEOWNERS | ||
| CONTRIBUTING.md | ||
| convert_hf_to_gguf.py | ||
| convert_hf_to_gguf_update.py | ||
| convert_llama_ggml_to_gguf.py | ||
| convert_lora_to_gguf.py | ||
| flake.nix | ||
| input | ||
| LICENSE | ||
| LOG.md | ||
| Makefile | ||
| mypy.ini | ||
| pyproject.toml | ||
| pyrightconfig.json | ||
| README.md | ||
| requirements.txt | ||
| SECURITY.md | ||
| TARDITS.md | ||
| ty.toml | ||
RAT @ LLAMA.CPP
the TARDITS model family, running on llama.cpp
Home repo - https://git.pvlb.dev/ml-lab/llama.cpp
Model lab: ml-lab/tardits · TARDITS.md · AGENTS.md
This is ml-lab's fork of llama.cpp. It adds the TARDITS model family to llama.cpp: complex- and hypercomplex-valued language models (Cayley-Dickson levels 1-7, up to 128 real dimensions) and RAT, a recurrent attention with a linear fast-weight memory and O(1) decode.
What is in here on top of upstream:
- Three arch strings:
tardits(RAT, recurrent),tardits-hyper(HyperFormer, attention with GyRoPE + SAIL) andtesseract(WereRAT: a RAT trunk with a borrowed SmolLM2 embedding/head behind a real bridge, for latent-distillation students). - Custom ggml ops:
ggml_cd_mul(elementwise Cayley-Dickson product) andggml_tardits_scan[_cd](the RAT recurrence), with CPU kernels. - GGUF conversion (
tardits2gguf/): split real/imag plane layout for levels 1-7, SmolLM2 BPE or char-level tokenizer, tied or hijacked embedding/head. - Parity-tested: logits match the PyTorch reference from the
step/recurrence path to ~1e-6-1e-5, with the drift of the training scan documented. A real trained quaternion model speaks through it. - Quantization-aware:
llama-quantizeunderstands the split complex planes; the RAT decay (attn_gamma) stays F32 by design, because the scan kernel reads it as raw floats and 4-bit decay was the one thing that measurably broke the recurrence.
The goal is to make these models shareable as GGUF and runnable on consumer hardware and phones.
The TARDITS-native story, commands and honest results are in TARDITS.md; the
engineering map is AGENTS.md.
Status: early but working - complex/hypercomplex levels run at 1e-6 parity, a real trained quaternion model (49M params, SmolLM2 tokenizer) converts and speaks English, and a WereRAT/Tessa checkpoint runs at 1.9e-5 parity. Upstream compatibility is a work in progress: treat this as a model-family fork, not a general llama.cpp replacement.
Everything below this line is the upstream llama.cpp README.
llama.cpp
LLM inference in C/C++
ggml / ops / maintainer PRs / dev stats / lib llama API / llama-server REST API
Quick start
A few options to get llama.cpp installed on your machine:
# curl
curl -LsSf https://llama.app/install.sh | sh
# powershell
irm https://llama.app/install.ps1 | iex
- Visit https://llama.app and follow the instructions
- Run with Docker - see our Docker documentation
- Download pre-built binaries from the releases page
- Build from source by cloning this repository - check out our build guide
Once installed:
# Download and run a model directly from Hugging Face
llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF
# Launch OpenAI-compatible API server
llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF
|
|
|
Description
The main goal of llama.cpp is to enable LLM (and VLM) inference with minimal setup and state-of-the-art performance on
a wide range of hardware - locally and in the cloud.
- Plain C/C++ implementation without any dependencies
- Apple silicon is a first-class citizen - optimized via ARM NEON, Accelerate and Metal frameworks
- AVX, AVX2, AVX512 and AMX support for x86 architectures
- RVV, ZVFH, ZFH, ZICBOP and ZIHINTPAUSE support for RISC-V architectures
- 1.5-bit, 2-bit, 3-bit, 4-bit, 5-bit, 6-bit, and 8-bit integer quantization for faster inference and reduced memory use
- Custom CUDA kernels for running LLMs on NVIDIA GPUs (support for AMD GPUs via HIP and Moore Threads GPUs via MUSA)
- Vulkan and SYCL backend support
- CPU+GPU hybrid inference to partially accelerate models larger than the total VRAM capacity
The llama.cpp project is build on top of the ggml library.
Supported backends
| Backend | Target devices |
|---|---|
| BLAS | All |
| BLIS | All |
| CANN | Huawei Ascend NPU |
| CUDA | Nvidia GPU |
| HIP | AMD GPU |
| Hexagon | Snapdragon |
| IBM zDNN | IBM Z & LinuxONE |
| MUSA | Moore Threads GPU |
| Metal | Apple Silicon |
| OpenCL | Adreno GPU |
| OpenVINO [In Progress] | Intel CPUs, GPUs, and NPUs |
| RPC | All |
| SYCL | Intel GPU |
| VirtGPU | VirtGPU APIR |
| Vulkan | GPU |
| WebGPU | All |
| ZenDNN | AMD CPU |
Documentation
Tools
Development
- How to build
- Running on Docker
- Build on Android
- Multi-GPU usage
- Performance troubleshooting
- GGML tips & tricks
- XCFramework
- Completions
- Models
- Release process
Contributing
- Contributors can open PRs
- Collaborators will be invited based on contributions
- Maintainers can push to branches in the
llama.cpprepo and merge PRs into themasterbranch - Any help with managing issues, PRs and projects is very appreciated!
- Read the CONTRIBUTING.md for more information
Acknowledgements
- yhirose/cpp-httplib - Single-header HTTP server, used by
llama-server- MIT license - nothings/stb - Single-header image format decoder, used by multimodal subsystem - Public domain
- nlohmann/json - Single-header JSON library, used by various tools/examples - MIT License
- mackron/miniaudio - Single-header audio format decoder, used by multimodal subsystem - Public domain
- sheredom/subprocess.h - Single-header process launching solution for C and C++ - Public domain