Skip to content

About

Superfast llama for v100s

Resources

Contributing

Security policy

Stars

11 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Llama Superfast

There are many llama forks, but this one is mine :)

We have made llama ultra superfast for v100. We specialize in two models: Qwen 27B 3.8 and Qwen Flash Next 3.8.

The operational models are pretty simple: 27B can run one user on two cards or one user on one card. It's fast in either mode. Flash Next can run with one user on two cards. Two users on two cards for flash next is still experimental. I don't recommend it yet.

Headline figures: Qwen3.8-27B

Tesla V100 32 GB PCIe cards, MTP speculative decoding, temperature 1.0. Decode speeds are the server's steady rate on real coding-agent work. Prefill means a cold prompt with nothing cached.

  • One user, one card (131,072-token context).
    • Decode: about 100–113 tok/s on long agentic coding sessions, and about 125 tok/s on short coding tasks.
    • Prefill: 951 tok/s for a 16K prompt and 770 tok/s for a 64K prompt.
  • One user, two cards (tensor parallel).
    • Decode: 152–156 tok/s on the same agentic work, 1.35× one card.
    • Prefill: averages 1,383 tok/s reading a prompt up to 64K, 969 tok/s up to 128K and 686 tok/s up to 240K. On agents' real requests it reads 1.7× as fast as one card.
  • Two users, two cards (131,072 tokens each).
    • Decode: about 200 tok/s combined while both users are decoding (about 100 each), and 150–160 tok/s for one user while the other is idle.
    • Prefill: each user's prompts read at 1,020–1,080 tok/s of its own GPU time, or 800–830 tok/s by the wall clock with the other user active.
    • Throughput: over a whole agentic session, the pair does about 1.2× the work of one user on the same two cards.

How these were measured, figures by context depth and the 27B's build and run details are in README-27B.md.

Build and run instructions are at the bottom of this page, under llama-superfast-v100.

llama.cpp

llama

Quick start

A few options to get llama.cpp installed on your machine:

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 Built-in web UI against `llama serve` running Qwen 3.6 Built-in web UI against llama serve

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 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

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

llama-superfast-v100

A llama.cpp fork tuned for the Tesla V100 (Volta, sm_70): Qwen3.8-27B on one or two cards and Qwen3.8-Flash-Next on two, with MTP speculative decoding. Build steps, model files, measurements and credits are in README-27B.md.

Hardware and software

  • One or two Tesla V100 32 GB PCIe (no NVLink needed). Other GPUs are untested.
  • NVIDIA driver 580, CUDA 12.8, gcc/g++ 14, Ubuntu 26.04.
  • Two cards in tensor parallel (GGML_CUDA_P2P=1) need the IOMMU in passthrough mode. The cards write to each other's memory directly over PCIe. On our AMD board with the IOMMU translating, the first peer copy raised hundreds of AMD-Vi IO_PAGE_FAULTs and stopped the second card (Xid 62), and the server's output was garbage from the first token. Boot with iommu=pt: add it to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, run sudo update-grub, reboot, and check that grep -o iommu=pt /proc/cmdline prints it. Intel boards with VT-d on are untested and may need the same. Layer split (the Flash-Next line below) does not set GGML_CUDA_P2P.

Build

cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=70 -DCMAKE_CUDA_COMPILER=/usr/local/cuda-12.8/bin/nvcc -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_CUDA_HOST_COMPILER=g++-14 -DGGML_NATIVE=OFF -DGGML_CUDA_CUB_3DOT2=ON
cmake --build build --target llama-server -j 12

Models

Put them flat in ./models.

  • Qwen3.8-27B: Qwen3.8-27B-UD-Q4_K_XL.gguf and the MTP head mtp-Qwen3.8-27B-Q4_0.gguf from unsloth/Qwen3.8-27B-GGUF (download lines in README-27B.md). The draft vocabulary ships in models/.
  • Qwen3.8-Flash-Next: ISTA-DASLab's Qwen3.8-Flash-Next-GSQ-RCO-GGUF (IQ3_XXS, two shards) and the shared MTP head mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf.

Run options

Our default serving modes on 32 GB V100s. All commands run from the repository root, with the models in ./models ($MODELS). Sampling: temperature 1.0, top-p 0.95, top-k 20, thinking on.

1. Qwen3.8-27B, one card (131,072 tokens)

scripts/serve-27b.sh mtp

That is one user. For two users on the card, add --parallel 2 to the script's line in README-27B.md; they share the 131,072 tokens (65,536 each). Two users on one card is untested.

2. Qwen3.8-27B, two cards, two users (tensor parallel, 131,072 tokens each)

CUDA_VISIBLE_DEVICES=0,1 GGML_CUDA_P2P=1 LLAMA_SPEC_DRAFT_VOCAB_FILE=models/draft-vocab-qwen3.8-27b.txt build/bin/llama-server -m $MODELS/Qwen3.8-27B-UD-Q4_K_XL.gguf -md $MODELS/mtp-Qwen3.8-27B-Q4_0.gguf --spec-type draft-mtp --spec-draft-n-max 7 -c 262144 -fa on -ngl 99 -ctk f16 -ctv f16 -ctkd f16 -ctvd f16 -t 12 -b 4096 -ub 2048 --jinja --parallel 2 --split-mode tensor --temp 1.0 --top-p 0.95 --top-k 20

For one user, use --parallel 1 -c 131072. Two-user scheduling is on by default; LLAMA_TU=0 turns it off.

3. Qwen3.8-Flash-Next, two cards, two users (layer split, 131,072 tokens each)

CUDA_VISIBLE_DEVICES=0,1 GGML_SCHED_COPIES=2 build/bin/llama-server -m $MODELS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf -md $MODELS/mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf --spec-type draft-mtp --spec-draft-n-max 2 -c 262144 -fa on -ngl 99 -ncmoe 0 --tensor-split 55,45 -ctk bf16 -ctv bf16 -ctkd f16 -ctvd f16 -t 12 -b 4096 -ub 1024 --spec-draft-ubatch 512 -lm mmap --lazy-mode on --jinja --parallel 2 --no-cache-idle-slots --temp 1.0 --top-p 0.95 --top-k 20

This leaves only about 240 MB free on the second card; -b 6144 -ub 1536 does not fit with two users. For one user with the whole 262,144 tokens, use --parallel 1 -b 6144 -ub 1536, which reads prompts faster.

Switches (environment, all optional)

  • LLAMA_SPEC_REJECTION=0: exact-match draft acceptance instead of rejection sampling.
  • LLAMA_SPEC_DRAFT_VOCAB=-1: draft over the full vocabulary.
  • LLAMA_TU=0: no two-user scheduling.
  • LLAMA_QSA_ATTN_MMA=1: Flash-Next's alternative tensor-core prompt attention (slower here, off by default).
  • LLAMA_KQ_MASK_DEVICE=0: build the attention mask on the host.

Add --host, --port and your sampling settings as usual. Ours: temperature 1.0, top-p 0.95, top-k 20, thinking on.

About

Superfast llama for v100s

Resources

Contributing

Security policy

Stars

11 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages