JustVugg/colibri

GITHUB中文整理

主语言 C · 47,492 星 · Apache-2.0 · 创建于 2026-07-01

推理引擎MoEC 语言本地部署分层缓存
打开 GitHub 仓库

一个用 C 编写的大规模 MoE 模型分层推理引擎,按热度把专家分布到显存、内存与 NVMe 磁盘上,让已有硬件运行超大开源模型。

Stars 47,492 累计 star,越多说明被认可得越广
Watching 376 订阅该仓库变动的人数
Forks 5,368 被派生出去的仓库数
Issues 150 当前开放的 Issue 数
语言 C GitHub 自动判定的主语言
许可证 Apache-2.0 开源协议,用之前先确认能不能商用
24h 增长 +6,828 1 天前 47,492 星
7 日增长 +6,828 7 天前 47,492 星
30 日增长 +7,454 30 天前 46,866 星

仓库健康度

5 个维度
只看客观信号,不构成安全性结论
维护活跃度 数据完整
2026-11-03 00:13 最近推送

最近推送 2026-11-03 00:13(30 天前),属于活跃维护

社区响应 数据完整
150 开放 Issue

开放 Issue 150 个 · Fork 5,368 个

增长趋势 数据完整
+6,828 7 日新增

24 小时 +6,828 · 7 日 +6,828 · 30 日 +7,454

项目规范 数据完整
Apache-2.0 许可证

许可证 Apache-2.0

版本发布 证据不足
— 发布次数

这一项暂无数据,不代表项目没有发布

「证据不足」表示这项数据暂时没有取到,不能读成「项目有问题」;「部分数据」表示只拿到一部分信号。版本发布要额外调 Releases 接口,下一版补。

Star 趋势

31 天记录
最近 90 天站内记录的星数
54,320当前 Star +7,454首尾差值 2026-11-03最早记录 2026-12-03最近记录

横轴 2026-11-03 → 2026-12-03,纵轴按这段时间的最小/最大值拉伸。趋势来自站内每天记录一次的星数,页面打开时不会实时请求 GitHub。

它解决什么问题

据 README 归纳
没有它会怎样

数百亿到数千亿参数的 MoE 模型通常需要远超普通设备的显存和内存,没有这类引擎就只能依赖昂贵的大显存机器或放弃本地运行;它让已有内存和磁盘的主机也能承载这类模型,只是速度受放置策略影响。

核心能力

6 条
归纳自 README,不是功能列表照抄
  1. 1按路由热度把专家分到显存、内存和磁盘三层
  2. 2用每层 LRU 缓存加从对话学习的热点集合决定专家放置
  3. 3批量处理位置,使每个专家在一次前向中只被读取一次
  4. 4用加载器池在常驻专家计算时预读缺失专家
  5. 5仅由 C 实现、运行时不依赖 BLAS 和 Python
  6. 6通过路由前瞻减少对磁盘的重复等待

项目画像

6 个角度
决定要不要用之前,先看这六条

项目定位

一个用 C 编写的大规模 MoE 模型分层推理引擎,按热度把专家分布到显存、内存与 NVMe 磁盘上,让已有硬件运行超大开源模型。

适合谁

想在已有内存和磁盘的普通机器上本地运行超大 MoE 开源模型、并且能接受磁盘读取带来速度折损的个人或小团队。

典型场景

在内存约二十多 GB、十二核 CPU 的机器上加载数百 GB 的 MoE 模型进行本地对话;把频繁使用的专家逐步留在显存或内存中以获得更快响应;按平台发布包或源码构建引擎,并用转换工具把 FP8 模型转成分层容器格式。

部署难度

资料给出两条路径:下载对应平台的发布包解压后用 Python 启动器运行;或克隆源码,用 gcc/clang 与 OpenMP 构建并自检。还需另行下载并转换模型,整体步骤较多,前置依赖包括 Python 3 和模型数据。

风险限制

资料提到运行需要 Python 3 用于启动器和 API,模型需按说明从 Hugging Face 下载并转换,体积以数百 GB 计;具体内存、CPU 核心和硬件兼容要求需按仓库说明自行确认。

最近维护

最近一次推送是 2026-11-03 00:13。 实现方式:每个 token 的每层都按路由、合并、放置、重叠、学习五步处理;放置只影响速度,不改变路由决策与权重精度。按实测路由热度把专家放入显存、内存或磁盘,并以每层 LRU 缓存与使用记录维护热点集合;专家矩阵一次 pread 读出,加载器池在常驻专家计算时并发读取缺失专家,配合路由前瞻避免重复读盘。

README 原文细节

3 个板块
项目自己写的功能与用法,原文照录

怎么安装从零跑起来的步骤

Install by hand

1. The program. Take the archive for your platform from Releases (Linux x8664, macOS, Windows; no compiler needed, only Python 3 for the launcher and the API) and unpack it, then python3 coli info. The Linux and Windows engines have Vulkan built in, with their shaders/ beside them, and the macOS ones Metal; for an NVIDIA card on Windows add the CUDA archive. Or build from source with gcc (or clang) and OpenMP:

2. A model. Any download in the tables above: the setup's ids map to Hugging Face repositories, and each model's page has the download and conversion command. For GLM-5.2 use the group-scaled (gs64) container with the int8 MTP head, mastouri/GLM-5.2-colibri-int4-g64-with-int8-mtp (429 GB), or Justvugg/GLM-5.3-colibri-int4-g64 for GLM-5.3 (419 GB, no MTP head). Not the older per-row int4 mirrors: they measure about 9 points worse on quality and caused the looping answers of #455. ./coli convert --model /nvme/glm52i4 builds the same container from the FP8 release, shard by shard, without ever ne

3. Run it. From c/ in a source checkout, or from the unpacked release. The launcher reads the model's config.json and picks the engine and its chat template, so the commands are the same for every model:

On Windows a release archive ships coli.cmd (coli.cmd chat --model D:\qwen36); from a source checkout use py -3 c\coli. The .exe files are the engines, not the launcher. Every option and variable: SETTINGS.md, ENVIRONMENT.md.

git clone https://github.com/JustVugg/colibri && cd colibri/c
./setup.sh                                # checks gcc/OpenMP, builds, self-tests
make qwen36 VK=1                          # one engine, here with Vulkan (CUDA=1 for CUDA)

实现原理它内部是怎么做的

How it works

Every layer of every token walks the same five steps: route, union, place, overlap, learn. The design goal is that placement only ever decides speed: the router's decisions and the weights' precision are the same whether an expert answered from VRAM, from RAM or from disk.

The engine is one C file per model family (c/colibri.c for GLM-5.2) over shared headers, with no BLAS and no Python at runtime: Python runs only the setup, the launcher, the converters and the API gateway.

  • A JIT for weights. A compiler JIT never compiles the whole program: it
  • watches what runs and compiles the hot paths. colibri makes the same bet
  • about weights. Measured routing heat decides which experts earn VRAM, RAM or
  • disk: a per-layer LRU cache, plus a pinned hot set learned from your own
  • conversations (.coliusage, updated every turn). colibri gets faster the
  • more you use it. It works because routing has measurable structure (the
  • expert atlas).
  • Never wait for the disk twice. An expert's three matrices are read in one
  • pread; a pool of loaders reads the missing experts while the resident ones
  • compute; a batch of positions reads each expert once; a router-lookahead
  • one layer ahead). DIRECT=1 (ODIRECT) is often a large win on fast NVMe drives and
  • neutral or worse on others: measure it on yours (tuning.md).
  • reads from a copy on a second drive. Two NVMe drives on independent
  • controllers measured +37.5% decode; a partial mirror on a smaller drive works

其它说明README 里剩下的内容

Get started in one step

You need a computer with 8 GB of RAM at the very least (16 GB or more is better), 22 GB free on the disk for the smallest model, and an internet connection. A graphics card is optional.

Linux (Ubuntu and Debian; other distributions have the same packages under their own names)

You answer one question, which model, and Enter takes the recommendation. Then the setup:

Next time, run START-HERE.bat or ./start-here.sh again: colibri starts straight away, with no download and no build. c/coli status shows what is installed and whether it runs, c/coli stop stops it (c\coli.cmd status and c\coli.cmd stop on Windows).

  • On this page click Code, then Download ZIP, and unzip it.
  • Double-click START-HERE.bat in the unzipped folder. If Python is
  • missing, it offers to install it for you.
  • looks at your machine: RAM, free disk, CPU and GPUs;
  • recommends a model that fits: the part of the model that always stays in
  • RAM, plus a minimum cache of experts, must fit in your RAM, and the download
  • on your disk;
  • gets the engine: it builds it for your machine when a compiler is there,
  • otherwise it downloads the prebuilt one, which runs on the CPU and, on Linux
  • and Windows, on a Vulkan GPU too. It builds
  • for your GPU when that pays: CUDA for an NVIDIA card on Linux when the CUDA toolkit is installed,
  • otherwise Vulkan. On a discrete GPU it always does; on an integrated GPU,
  • which shares the CPU's RAM, only for the models measured faster there
  • prints the exact command to install it and carries on with the CPU; run the

If something goes wrong

  • it stopped during the download — run the same command again: it resumes from the bytes already on disk
  • to use the GPU through ..., first run: — run that command, then the setup again: it rebuilds for the GPU and does not download again
  • the ... build failed, for example Unsupported gpu architecture when the installed CUDA toolkit no longer supports the card — the setup checks the toolkit against the card first and picks Vulkan by its
  • needs N GB free for the download — --dir with a folder on a bigger disk
  • on WSL, the model folder is under /mnt/c — keep it on the Linux disk (the default, ~/colibri-models): /mnt/c is many times slower
  • you updated the checkout (git pull) — run ./start-here.sh again: it rebuilds the engine when the sources changed, then starts it
  • anything else — c/coli logs -n 50 shows the log of a server started in the background (one started in the foreground prints to its own terminal) and c/coli logs --install the setup's; open an issue wi

概述

Tiny engine, immense model. colibri runs very large open models on the machine you already have. A mixture-of-experts model of hundreds of billions of parameters uses only a small part of itself for each token, so colibri keeps that part in RAM and reads the rest, the experts, from the disk when the model asks for them. Pure C, one file per model family, no GPU required.

Thirteen engines run today. Ten are for language models: GLM-5.2/5.3 (which also runs Mistral-Large-4), GLM-5.3-Flash, Inkling, Kimi K3, DeepSeek V4 Flash, DeepSeek V4.1 Flash, MiMo-V2.6 Flash (and Pro), Qwen3.8-Flash-Next, Qwen3.6 (which also runs Qwen3-Coder, the dense Qwen3.8-27B, Flint, Muse Spark Open and LFM3-VL) and OLMoE. One draws pictures: Qwen-Image-2.1. Two answer decisions: Laya and GLiNER2.5-Decide, with a third decision model, Clef, on the Qwen3.6 engine. The language models also run from the GGUF files already published, read as they are (GGUF), on the CPU, on any GPU through V

colibri is free and open source. If it has earned a place on your machine, a coffee helps pay for the next engine and the next speedup.

关于 colibri 的常见问题

7 个问题
答案来自 README 归纳与 GitHub 实时数据
colibri 是做什么的?

一个用 C 编写的大规模 MoE 模型分层推理引擎,按热度把专家分布到显存、内存与 NVMe 磁盘上,让已有硬件运行超大开源模型。 数百亿到数千亿参数的 MoE 模型通常需要远超普通设备的显存和内存,没有这类引擎就只能依赖昂贵的大显存机器或放弃本地运行;它让已有内存和磁盘的主机也能承载这类模型,只是速度受放置策略影响。

colibri 有哪些功能?

核心能力:按路由热度把专家分到显存、内存和磁盘三层;用每层 LRU 缓存加从对话学习的热点集合决定专家放置;批量处理位置,使每个专家在一次前向中只被读取一次;用加载器池在常驻专家计算时预读缺失专家;仅由 C 实现、运行时不依赖 BLAS 和 Python;通过路由前瞻减少对磁盘的重复等待。

colibri 适合谁用?

想在已有内存和磁盘的普通机器上本地运行超大 MoE 开源模型、并且能接受磁盘读取带来速度折损的个人或小团队。

colibri 是怎么工作的?

每个 token 的每层都按路由、合并、放置、重叠、学习五步处理;放置只影响速度,不改变路由决策与权重精度。按实测路由热度把专家放入显存、内存或磁盘,并以每层 LRU 缓存与使用记录维护热点集合;专家矩阵一次 pread 读出,加载器池在常驻专家计算时并发读取缺失专家,配合路由前瞻避免重复读盘。

怎么安装 colibri?

按项目 README 的说明:1. The program. Take the archive for your platform from Releases (Linux x8664, macOS, Windows; no compiler needed, only Python 3 for the lau;2. A model. Any download in the tables above: the setup's ids map to Hugging Face repositories, and each model's page has the download and c。完整命令见下方「怎么安装」一节或 GitHub 仓库的 README。

用 colibri 有什么门槛或限制?

资料提到运行需要 Python 3 用于启动器和 API,模型需按说明从 Hugging Face 下载并转换,体积以数百 GB 计;具体内存、CPU 核心和硬件兼容要求需按仓库说明自行确认。

colibri 现在还在维护吗?数据怎么样?

目前 47,492 星,5,368 个 Fork,主语言 C,创建于 2026-07-01,最近一次推送 2026-11-03 00:13,许可证 Apache-2.0。星数、Fork、推送时间都是 GitHub 返回的实时数据,「最近推送」离现在越近说明越活跃;长期不动要留意是否已停止维护。

这些内容来自哪

读法说明
中文整理据 README 归纳,数据取自 GitHub
中文说明据项目 README 归纳只写 README 能确认的内容,不替作者补功能与数字
关键数据与 GitHub 页面一致星数、Fork、语言与时间都不做二次加工
数据日期2026-11-03 02:49星数与介绍这份数据是哪一天的

项目数据取自 GitHub 官方接口与项目 README;星数、Fork、语言与时间以 GitHub 页面为准,档案更新于 2026-11-03 02:49。