gitwtfhub

wtf is kortex?

vage91/kortex — explained in plain English

Analysis updated 2026-05-18

4RustAudience · developerComplexity · 4/5Setup · hard

TL;DR

A from-scratch Rust engine that runs large language models bigger than your GPU's memory by streaming weights from disk through RAM into video memory.

Mindmap

mindmap
  root((Kortex))
    What it does
      Streams LLM weights
      NVMe to RAM to VRAM
      Runs oversized models
    Tech stack
      Rust
      wgpu
      Vulkan
    Use cases
      Run 70B models on 20GB GPU
      Speculative decoding
      Benchmark inference speed
    Audience
      ML engineers
      Systems developers
      Researchers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Run large language models that are bigger than your GPU's video memory.

REASON 2

Compare inference speed against llama.cpp on the same hardware.

REASON 3

Use speculative decoding to speed up token generation with a draft model.

REASON 4

Benchmark GPU kernel performance and verify output correctness.

What's in the stack?

RustwgpuVulkanDX12GGUF

How it stacks up

vage91/kortex6elphegor/warpadoslabsproject-gif/liara-toolkit
Stars444
LanguageRustRustRust
Setup difficultyhardeasyhard
Complexity4/55/54/5
Audiencedeveloperresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

Windows only for now, requires stable Rust and a Vulkan or DX12 capable GPU.

Wtf does this do

Kortex is an inference engine for running large language models, written from scratch in Rust. Its main idea is to treat inference as a streaming problem across the whole memory hierarchy, moving data from NVMe storage to RAM to video memory to the GPU's compute units. This lets it run models that are much larger than a single GPU's video memory would normally allow. On a consumer GPU with 20 GB of video memory, the project reports running a 70 billion parameter Llama model at about 2 tokens per second, and a fully loaded 30 billion parameter mixture of experts model at around 160 tokens per second, which the README says is faster than the popular llama.cpp project on the same hardware. Kortex is not built on top of llama.cpp. Its GGUF file parser, tokenizer, quantized math kernels, GPU backend, and streaming pipeline are all original code. llama.cpp is used only as a reference to check that Kortex produces identical output tokens. The project currently only works on Windows, because its streaming path relies on Windows specific direct disk access. The part of the code that runs fully in video memory is built with a portable graphics library and should be easier to move to other systems, but a Linux version is only a planned future step, not something available now. Kortex can load GGUF model files for the Llama 3.x and Qwen3 families, supports several quantization formats that shrink model size, and offers greedy decoding, temperature based sampling, and a chat template mode. It also supports streaming layers from disk when a model does not fit in video memory, and speculative decoding, where a small draft model proposes tokens that a larger model then verifies. There is a benchmarking command and a verification command for checking output correctness. Some things it cannot do yet: it does not support streaming for mixture of experts models, which must currently run fully loaded in video memory, it has no Linux support, and it has no server mode, so it only runs as a single command line tool rather than something with an always on API. The README frames Kortex as most useful for the case where a model is too big for video memory, while suggesting llama.cpp for models that fit. Building it requires stable Rust.

Yoink these prompts

Prompt 1
Help me build Kortex from source using stable Rust and explain what the build produces.
Prompt 2
Explain how Kortex streams model weights from NVMe to VRAM to run models larger than my GPU memory.
Prompt 3
Walk me through setting up speculative decoding in Kortex with a draft model.
Prompt 4
Compare Kortex and llama.cpp for my use case and tell me which one fits a 70B model on a 20GB GPU.

Frequently asked questions

wtf is kortex?

A from-scratch Rust engine that runs large language models bigger than your GPU's memory by streaming weights from disk through RAM into video memory.

What language is kortex written in?

Mainly Rust. The stack also includes Rust, wgpu, Vulkan.

How hard is kortex to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is kortex for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.