MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash

github.com/antirez/llama.cpp-deepseek-v4-flash @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
16,936 symbols 57,497 edges 1,134 files 1,833 documented · 11% updated 2mo ago★ 3241 open issues

Browse by type

Functions 13,473 Types & classes 3,460 Endpoints 3
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DeepSeek v4 Flash experimental support

This is a fork of llama.cpp that implements DSv4 support, with generated GGUF that aims to target MacBooks with just 128GB of RAM using 2bit quantization of routed experts.

Disclaimer: * This code was written with heavy help from GPT 5.5 and the official DeepSeek v4 Flash as reference. * The model quantized in this way behaves very very well in the chat, frontier-model vibes, but it was not extensively tested. * The code runs both with CPU and Metal backends. With Metal is faster.

Download the GGUF from: https://huggingface.co/antirez/deepseek-v4-gguf

Then to test it run with (but for production you may want to tune context, disable thinking for faster replies and so forth):

llama-cli \
    -m DeepSeek-V4-Flash-IQ2XXS-w2Q2K-AProjQ8-SExpQ8-OutQ8-chat.gguf \
    -cnv

llama.cpp

llama

License: MIT Release Server

Manifesto / ggml / ops

LLM inference in C/C++

Recent API changes

Hot topics


Quick start

Getting started with llama.cpp is straightforward. Here are several ways to install it on your machine:

Once installed, you'll need a model to work with. Head to the Obtaining and quantizing models section to learn more.

Example command:

# Use a local model file
llama-cli -m my_model.gguf

# Or download and run a model directly from Hugging Face
llama-cli -hf ggml-org/gemma-3-1b-it-GGUF

# Launch OpenAI-compatible API server
llama-server -hf ggml-org/gemma-3-1b-it-GGUF

Description

The main goal of llama.cpp is to enable LLM 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 the main playground for developing new features for the ggml library.

Models

Typically finetunes of the base models below are supported as well.

Instructions for adding support for new models: HOWTO-add-model.md

Text-only

Multimodal

Bindings

UIs

(to have a project listed here, it should clearly state that it depends on llama.cpp)

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 7,994
Method 5,479
Class 2,871
Enum 463
Interface 126
Route 3

Languages

C++71%
Python14%
C8%
TypeScript6%
Kotlin1%

Modules by API surface

convert_hf_to_gguf.py854 symbols
tests/test-backend-ops.cpp668 symbols
ggml/src/ggml.c478 symbols
ggml/src/ggml-vulkan/ggml-vulkan.cpp390 symbols
gguf-py/gguf/gguf_writer.py283 symbols
ggml/src/ggml-cpu/ops.cpp236 symbols
src/llama-sampler.cpp224 symbols
ggml/src/ggml-sycl/dpct/helper.hpp213 symbols
src/llama-vocab.cpp203 symbols
ggml/src/ggml-sycl/ggml-sycl.cpp197 symbols
ggml/src/ggml-opencl/ggml-opencl.cpp196 symbols
src/llama-context.cpp186 symbols

Datastores touched

chatDatabase · 1 repos

For agents

$ claude mcp add llama.cpp-deepseek-v4-flash \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page