Espelho do repositório github do llama.cpp
Find a file
Pascal 7e28f10a46 cuda: decode the conv2d patch indices with fastdiv
The implicit GEMM conv2d kernel recovers the channel and the kernel
position of each reduction index with three integer divisions by
runtime divisors, once per loaded row of every tile. Outside the 3x3
and 1x1 specializations this integer division bounds the kernel:
removing it halves the time on long reductions.

Divide with the precomputed magic numbers of fastdiv instead. The 3x3
and 1x1 specializations keep their compile time divisors.

test-backend-ops -o CONV_2D: 2006/2006 on CUDA0.

CONV_2D, F16 kernel, us/run on an RTX PRO 6000:
  [2054,1,768] k [7,1,768,768]       221 -> 138
  [16390,1,384] k [7,1,384,384]      433 -> 266
  [65542,1,192] k [7,1,192,192]      420 -> 271
  [8240,1,256] k [11,1,256,256]      165 -> 108
  [19,19,256,16] k [4,4,256,4096]   1672 -> 1076
2026-11-17 19:48:30 +01:00
.devops ui: Llama UI design system: tokens, surfaces and fonts (#32468) 2026-11-17 14:39:03 +01:00
.gemini contributing: tighten AI usage policy (#18388) 2025-12-29 16:01:32 +01:00
.github ui: Llama UI design system: tokens, surfaces and fonts (#32468) 2026-11-17 14:39:03 +01:00
.pi/gg pi : turn .pi/gg into a system prompt addendum (#30762) 2026-10-19 09:11:13 +03:00
app cmake : use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR (#28771) 2026-09-15 05:26:09 +02:00
benches benches : add Nemotron 3 Nano on DGX Spark (#20652) 2026-03-16 21:50:43 +02:00
ci vulkan: Explicitly include SPIRV-Headers (#31416) 2026-11-14 23:37:14 +01:00
cmake ci: move test models to ggml-org-dev (#32096) 2026-11-11 21:17:16 +01:00
common server : return 400 when grammar and ignore_eos are on (#32377) 2026-11-17 17:03:21 +01:00
conversion mtmd: Add support for Qwen3-TTS' ICL/reference mode (#32438) 2026-11-17 18:59:11 +01:00
docs mtmd: Add support for Qwen3-TTS' ICL/reference mode (#32438) 2026-11-17 18:59:11 +01:00
examples llama : migrate to llama_batch_ext (#32356) 2026-11-16 15:16:12 +01:00
ggml cuda: decode the conv2d patch indices with fastdiv 2026-11-17 19:48:30 +01:00
gguf-py mtmd: Add support for Qwen3-TTS' ICL/reference mode (#32438) 2026-11-17 18:59:11 +01:00
grammars common : implement common_schema internal representation for JSON schemas (#28736) 2026-09-12 16:14:50 -05:00
include chat: add tts_dict for kokoro G2P template (#32397) 2026-11-17 12:52:50 +01:00
licenses refactor : remove libcurl, use OpenSSL when available (#18828) 2026-01-14 18:02:47 +01:00
media ui: update the README banner to the new llama.cpp cover and remove the legacy brand assets (#31789) 2026-11-10 22:43:27 +01:00
models mtmd: support Minimax-Music3 (#32435) 2026-11-17 12:53:19 +01:00
pocs cmake : fix build when GGML_CPU=OFF and GGML_CUDA=ON (#29026) 2026-09-18 11:44:03 +03:00
requirements requirements, Fix CI: support Python 3.15 (#32199) 2026-11-13 17:50:03 +01:00
scripts ui: Llama UI design system: tokens, surfaces and fonts (#32468) 2026-11-17 14:39:03 +01:00
skills skills: explicitly specify paths to README-dev.md (#32431) 2026-11-16 21:52:12 +01:00
src qwen4exp : fix graph reallocation from the n-gram table scale (#32483) 2026-11-18 00:35:54 +08:00
tests server : return 400 when grammar and ignore_eos are on (#32377) 2026-11-17 17:03:21 +01:00
tools mtmd: Add support for Qwen3-TTS' ICL/reference mode (#32438) 2026-11-17 18:59:11 +01:00
ui ui: turn the live markdown preview off by default (#32469) 2026-11-17 16:17:46 +01:00
vendor vendor: sync stb_image (#32305) 2026-11-15 09:37:30 +01:00
.clang-format fix: apply clang-format to CUDA macros (#16017) 2025-09-16 08:59:19 +02:00
.clang-tidy clang-tidy : disable warning about performance enum size (#16127) 2025-09-22 19:57:46 +02:00
.dockerignore ui: move the web UI to ui/apps/chat and call it Llama Chat (#32032) 2026-11-16 17:23:36 +01:00
.ecrc cmake : use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR (#28771) 2026-09-15 05:26:09 +02:00
.editorconfig ui: move the web UI to ui/apps/chat and call it Llama Chat (#32032) 2026-11-16 17:23:36 +01:00
.flake8 ci : re-enable type/lint-check for skills (#30713) 2026-10-20 01:03:03 +02:00
.gitignore ui: PWA support (#23871) 2026-06-12 15:53:26 +02:00
.gitmodules ggml : remove kompute backend (#14501) 2025-07-03 07:48:32 +03:00
.pre-commit-config.yaml convert.py : add python logging instead of print() (#6511) 2024-05-03 22:36:41 +03:00
AGENTS.md skills: add slice-model (#30677) 2026-10-17 02:11:56 +02:00
AUTHORS readme : update (#32382) 2026-11-16 13:28:31 +02:00
build-xcframework.sh metal : add metallib build support for xcframework (#28163) 2026-09-02 07:45:56 +08:00
CLAUDE.md contributing: tighten AI usage policy (#18388) 2025-12-29 16:01:32 +01:00
CMakeLists.txt ui: move the web UI to ui/apps/chat and call it Llama Chat (#32032) 2026-11-16 17:23:36 +01:00
CMakePresets.json cmake : Add CMake presets for Linux and GCC (#14656) 2025-07-13 08:12:36 +03:00
CODEOWNERS ui: move the web UI to ui/apps/chat and call it Llama Chat (#32032) 2026-11-16 17:23:36 +01:00
CONTRIBUTING.md contributing: mark agents.md and code-review as required (#32416) 2026-11-16 19:26:10 +01:00
convert_hf_to_gguf.py feat: external PLE file loading (#31185) 2026-11-09 19:41:01 +01:00
convert_hf_to_gguf_update.py feat: add Inkling 2 support (text + vision) (#32217) 2026-11-15 00:51:31 +01:00
convert_llama_ggml_to_gguf.py ci : switch from pyright to ty (#20826) 2026-03-21 08:54:34 +01:00
convert_lora_to_gguf.py ci : bump ty to 0.0.100 (#32030) 2026-11-10 21:54:14 +01:00
flake.nix nix: expose a SYCL package (#31066) 2026-11-17 11:04:12 +02:00
LICENSE docs : Minor cleanups (#19252) 2026-02-02 08:38:55 +02:00
Makefile make : remove make in favor of CMake (#15449) 2025-08-20 13:31:16 +03:00
mypy.ini convert : partially revert PR #4818 (#5041) 2024-01-20 18:14:18 -05:00
pyproject.toml requirements, Fix CI: support Python 3.15 (#32199) 2026-11-13 17:50:03 +01:00
pyrightconfig.json ci : switch from pyright to ty (#20826) 2026-03-21 08:54:34 +01:00
README.md ui: move the web UI to ui/apps/chat and call it Llama Chat (#32032) 2026-11-16 17:23:36 +01:00
requirements.txt tool-call: fix Qwen 2.5 Coder support, add micro benchmarks, support trigger patterns for lazy grammars (#12034) 2025-03-05 13:05:13 +00:00
SECURITY.md ui: move the web UI to ui/apps/chat and call it Llama Chat (#32032) 2026-11-16 17:23:36 +01:00
ty.toml examples : clean-up old/obsolete stuff (#32184) 2026-11-13 10:33:17 +02:00

llama.cpp

llama.cpp

Description

The main goal of llama.cpp is to enable LLM (and MLLM) inference with minimal setup and state-of-the-art performance on a wide range of hardware - locally and in the cloud.

The llama.cpp project is built on top of the ggml library.

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

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
VLM session with `llama cli` VLM session with llama cli Llama Chat, the built-in chat app, against `llama serve` running Qwen 3.6 Llama Chat, the built-in chat app, against llama serve

Documentation

Tools

Development

Contributing

  • Contributors can open PRs
  • Collaborators will be invited based on contributions
  • Maintainers can push to branches in the llama.cpp repo and merge PRs into the master branch
  • 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