Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
a0b929c
Metal: chunk coli_metal_gemm to fix grid-size truncation at large pre…
RDouglasSharp Jul 21, 2026
7e707c7
feat(olmoe): port LFRU prefetch eviction guard to OLMoE testbed
EgonRuiter Jul 22, 2026
70f06cd
metal: clamp chunk size in 64-bit before narrowing (UB in the COLI_GE…
RDouglasSharp Jul 22, 2026
42b3f13
gemm-test: correct stale threshold comments (trigger is the dispatch …
RDouglasSharp Jul 22, 2026
f1b0f7e
Merge pull request #488 from RDouglasSharp/fix/metal-gemm-grid-trunca…
JustVugg Jul 22, 2026
b7d4835
inkling: Stage-A C engine for Thinking Machines Inkling (975B MoE), o…
nbeerbower Jul 16, 2026
b721a1e
tools: Inkling bf16 -> colibri int4 converter, e2e-validated
nbeerbower Jul 16, 2026
92bdb87
inkling: bf16-resident weights + AVX-512 BF16/VNNI kernels
nbeerbower Jul 16, 2026
593bc3d
convert_inkling: thread the per-expert quantization (12 workers)
nbeerbower Jul 16, 2026
de12586
convert_inkling: completion check counts only model-* shards
nbeerbower Jul 16, 2026
32b97a7
inkling: chunked pread for >2GB resident tensors
nbeerbower Jul 16, 2026
1ee59cc
inkling perf: packed-int4 cache, parallel expert fills, usage pinning…
nbeerbower Jul 16, 2026
524f2a4
inkling: fuse gate+up matmuls, OMP hot-thread re-exec (neutral on dec…
nbeerbower Jul 16, 2026
a34edb2
inkling: CUDA tier — bf16 residents in VRAM (A6000), +28% decode, bes…
nbeerbower Jul 16, 2026
d4f1145
inkling: spin-sync device flag + phase timers
nbeerbower Jul 16, 2026
d2fc927
inkling: default PIN_N to cap/2 (measured: pinning is the whole ballg…
nbeerbower Jul 16, 2026
deb3bd0
inkling: -f promptfile mode for usage warmup (one load, many prompts)
nbeerbower Jul 16, 2026
9210904
inkling: make cache warming toggleable
nbeerbower Jul 16, 2026
6ebac54
inkling: docs/inkling.md + honest usage-save reporting
nbeerbower Jul 16, 2026
2c396d8
ci: build inkling + token-exact oracle in CI
nbeerbower Jul 23, 2026
e4b5bf3
Merge pull request #312 from nbeerbower/inkling
JustVugg Jul 23, 2026
182b6d4
Remove google redirect from links
mcollinswisc Jul 23, 2026
2354540
inkling: serve mode (openai_server.py engine protocol) + sampling
nbeerbower Jul 23, 2026
aa188fe
openai_server: serve the inkling engine (ARCH detect + reasoning chan…
nbeerbower Jul 23, 2026
6a92177
test: fix CUDA env test for colibri rename + CPU-only CI
dqiaok Jul 23, 2026
2c4e9de
olmoe: add an AVX2 int8 dot-product path to matmul_q (x86 had none)
opxyc Jul 23, 2026
ee0b40d
tools: make convert_olmoe_merged.py disk/RAM-safe (streaming, resumable)
opxyc Jul 23, 2026
8b3f06c
serve: cross-slot KV prefix adoption (COLI_KV_SHARE=1) — shared-prefi…
ZacharyZcR Jul 23, 2026
8c00e0e
prefill: COLI_PREFILL_CHUNK=N — slice long prompts, bound activation …
ZacharyZcR Jul 23, 2026
a03c79e
cuda: fuse silu into the dual hidden kernels' epilogue — one less lau…
ZacharyZcR Jul 23, 2026
56b2ef9
cuda: DSA sparse decode on GPU via gather staging (COLI_DSA_GATHER=1)
ZacharyZcR Jul 23, 2026
a7c859c
MTP: auto draft depth 1, not 3
NeuralNotwerk Jul 23, 2026
db5b466
perf: balance causal attention prefill work
Jul 23, 2026
9da4c70
pipe2: download the resident residual before every exit from residency
Jul 23, 2026
6dc1ee0
router: guard best==-1 in top-K selection (NaN logits caused OOB read…
Jul 23, 2026
a13652e
moe: route the eight hot-path allocations through a checked alloc
Jul 23, 2026
1cc12c0
EXPERT_BUDGET: never trim a position to zero experts; compensate weig…
Jul 23, 2026
aabb4eb
COLI_GROUP_ASYNC: don't recompute a device whose async group already …
Jul 23, 2026
996a1a9
serve: split Anthropic thinking response blocks
winklemad Jul 23, 2026
857f725
build: portable build_cuda.bat with MSVC/CUDA/arch auto-detection
ghostnumber7 Jul 23, 2026
f6b1904
Merge pull request #538 from mcollinswisc/rm_google_redirects
JustVugg Jul 23, 2026
f17c9e4
Merge pull request #540 from dqiaok/fix/cuda-env-test-colibri-rename
JustVugg Jul 23, 2026
5fefde0
Merge pull request #539 from nbeerbower/feat/inkling-serve-upstream
JustVugg Jul 23, 2026
2363917
Merge pull request #564 from mxkev1n/fix/moe-unchecked-alloc
JustVugg Jul 23, 2026
b2d56b3
Merge pull request #563 from mxkev1n/fix/router-nan-oob
JustVugg Jul 23, 2026
db4b820
Merge pull request #566 from mxkev1n/fix/group-async-double-work
JustVugg Jul 23, 2026
c0e5b43
Merge pull request #562 from mxkev1n/fix/pipe2-stale-residual
JustVugg Jul 23, 2026
7d3c1d0
Merge pull request #565 from mxkev1n/fix/expert-budget-zero-and-weights
JustVugg Jul 23, 2026
a6c2cc4
Merge pull request #547 from ZacharyZcR/perf/silu-fused-epilogue
JustVugg Jul 23, 2026
8ffdf96
Merge pull request #545 from ZacharyZcR/feat/kv-cross-slot-adopt
JustVugg Jul 23, 2026
bdfa744
Merge pull request #546 from ZacharyZcR/feat/prefill-chunk
JustVugg Jul 23, 2026
defd424
Merge pull request #548 from ZacharyZcR/feat/dsa-gather-cuda
JustVugg Jul 23, 2026
fbdb109
docs/tools: document PILOT_EVICT_GUARD and add CLI overrides to test_…
EgonRuiter Jul 23, 2026
8182858
Merge pull request #556 from bherald/perf/554-causal-attention-static-1
JustVugg Jul 23, 2026
a391eee
serve: COLI_SERVE_ALL_STOPS re-arms the full stop set (#549)
JustVugg Jul 23, 2026
02984a8
Merge pull request #569 from NeuralNotwerk/draft-default-1
JustVugg Jul 23, 2026
75a7374
Merge pull request #568 from winklemad/fix/anthropic-thinking-blocks-c2
JustVugg Jul 23, 2026
5724dae
Merge pull request #572 from JustVugg/fix/serve-all-stops
JustVugg Jul 23, 2026
cc5df23
feat: support OpenAI stop sequences
bherald Jul 22, 2026
37c8fac
feat: support patient native stop handling
bherald Jul 22, 2026
83fc0a7
fix: stop chat at implicit role boundaries
Jul 23, 2026
74326b9
fix: scope implicit stops to GLM chat
Jul 23, 2026
db4ed61
serve: emit finish_reason=length on real cap-hits, not just at admission
NeuralNotwerk Jul 23, 2026
9491770
install: ship version.py to libexec and make the launcher's version i…
ZacharyZcR Jul 24, 2026
c5f7c91
web: ship the Expert Atlas data — Brain hover has fetched /experts.js…
ZacharyZcR Jul 24, 2026
21cbc29
convert: default to group-scaled int4 (gs64) — close the #455 trackin…
ZacharyZcR Jul 24, 2026
7ceb3a0
serve: single-slot MTP speculation in run_serve_mux (KV_SLOTS=1) — #4…
ZacharyZcR Jul 24, 2026
aa65e21
docker: add slim multi-stage image (Dockerfile.slim) + compose — 115M…
ZacharyZcR Jul 24, 2026
5dc736a
Merge pull request #578 from ZacharyZcR/feat/ship-expert-atlas
JustVugg Jul 24, 2026
6352a4e
Merge pull request #582 from ZacharyZcR/feat/docker-multistage
JustVugg Jul 24, 2026
e04bbdc
Merge pull request #577 from ZacharyZcR/fix/575-version-install
JustVugg Jul 24, 2026
e24995a
Merge pull request #579 from ZacharyZcR/fix/converter-default-gs64
JustVugg Jul 24, 2026
de62a18
Merge pull request #581 from ZacharyZcR/feat/serve-single-slot-mtp
JustVugg Jul 24, 2026
047968a
Merge pull request #576 from NeuralNotwerk/fix/serve-finish-reason-ca…
JustVugg Jul 24, 2026
ea13b5c
Merge pull request #571 from EgonRuiter/feature/olmoe-lfru-eviction-g…
JustVugg Jul 24, 2026
11cd1c6
Merge pull request #535 from bherald/contrib/openai-stop-sequences
JustVugg Jul 24, 2026
926dde9
fix(windows): enable direct I/O for mirror shards
Jul 24, 2026
f381d4c
Merge pull request #593 from bherald/fix/windows-mirror-direct-io
JustVugg Jul 24, 2026
26629e7
Merge pull request #570 from ghostnumber7/build/portable-cuda-bat
JustVugg Jul 24, 2026
00561ef
feat: enable rocWMMA tensor cores for AMD HIP backend
lucasgrecco Jul 24, 2026
27d8da8
Merge origin/dev into feature/amd-rx-7900-xtx
lucasgrecco Jul 24, 2026
0d5df23
Removing local folder from ignore file.
lucasgrecco Jul 24, 2026
ce80dc0
metal: compile-time SDK floor for the residency-set path
lBroth Jul 24, 2026
594c87e
serve: reverse-proxy Host allowlist + quiet prefill keepalive (#597)
JustVugg Jul 25, 2026
cc0fd12
Merge pull request #606 from JustVugg/fix/597-serve-allowlist-keepalive
JustVugg Jul 25, 2026
b2b50e9
serve: stream GLM reasoning through reasoning_content on the OpenAI e…
JustVugg Jul 25, 2026
cf56052
Merge pull request #607 from JustVugg/fix/597-glm-reasoning-content
JustVugg Jul 25, 2026
32aa34f
nix: fix flake build broken by the glm -> colibri rename
ZacharyZcR Jul 25, 2026
b4244f1
serve: ACCEPT frame so an oversized prompt is a clean 400, not a brok…
JustVugg Jul 25, 2026
c5aac27
Merge pull request #609 from JustVugg/fix/597-context-accept-frame
JustVugg Jul 25, 2026
aa6a279
Merge pull request #608 from ZacharyZcR/fix/595-nix-flake-binary-name
JustVugg Jul 25, 2026
0d1f658
Merge pull request #541 from opxyc/feat/olmoe-avx2-int8-dot
JustVugg Jul 25, 2026
43c13ac
Merge pull request #600 from lBroth/fix/596-metal-sdk-floor
JustVugg Jul 25, 2026
7b03ce0
Merge pull request #599 from lucasgrecco/feature/amd-rx-7900-xtx
JustVugg Jul 25, 2026
cd6a342
Merge pull request #543 from opxyc/feat/olmoe-safe-converter
JustVugg Jul 25, 2026
595c7db
serve: fix HTTP/1.1 keep-alive desync and SSE framing (#597 item 3)
ZacharyZcR Jul 25, 2026
fb0a726
Merge pull request #610 from ZacharyZcR/fix/597-http-keepalive-framing
JustVugg Jul 25, 2026
fda0071
ci(hip): assert backend_cuda.o is position-independent
NeuralNotwerk Jul 25, 2026
5eb7ee4
docs(benchmarks): i5-13600K + RTX 5070 Ti datapoint - 0.98 tok/s, hit…
silios Jul 25, 2026
3e5d68a
loader: diagnose a missing core tensor instead of just naming it
ZacharyZcR Jul 25, 2026
9640282
Merge pull request #611 from NeuralNotwerk/fix/hip-pic-link
JustVugg Jul 25, 2026
7cf3448
Merge pull request #613 from silios/docs/benchmark-i5-13600k-5070ti
JustVugg Jul 25, 2026
21e7a35
Merge pull request #614 from ZacharyZcR/fix/586-missing-tensor-diagno…
JustVugg Jul 25, 2026
9b2b7d1
feat: add deep doctor preflight
Jul 25, 2026
b6478e9
fix: harden deep doctor input validation
Jul 25, 2026
6764b6c
fix(colibri.c): conditional headers for Windows portability
4ny3l Jul 25, 2026
961e81f
perf(simd): add OpenMP SIMD reductions to hot-path matrix multiplicat…
EgonRuiter Jul 25, 2026
d8abaae
fix(colibri.c): add Windows fallbacks for now_s and rss_gb
4ny3l Jul 25, 2026
da1c765
fix(st.h): protect realloc with temporary variable
4ny3l Jul 25, 2026
7445150
fix(st.h): replace strcpy with snprintf in shard sort buffer
4ny3l Jul 25, 2026
994c061
fix(st.h): validate negative numel in st_read_f32_cap
4ny3l Jul 25, 2026
c1869cc
fix(st.h): prevent integer overflow in st_read_slice_f32 bounds check
4ny3l Jul 25, 2026
751e141
telemetry: read real hwinfo on macOS (sysctl + host_statistics64)
manjumihir Jul 26, 2026
5a906fe
Merge pull request #617 from EgonRuiter/perf/simd-matrix-reductions-f…
JustVugg Jul 26, 2026
6ec554b
Merge pull request #618 from 4ny3l/fix-windows-portability-security
JustVugg Jul 26, 2026
2d1cb27
Merge pull request #615 from bherald/contrib/doctor-deep-preflight
JustVugg Jul 26, 2026
9c45c58
Merge pull request #623 from manjumihir/fix/macos-hwinfo
JustVugg Jul 26, 2026
a9b8a47
metal/oracle: scope the token-exact claim to decode + implement DEBUG…
JustVugg Jul 26, 2026
6fcc555
Merge pull request #624 from JustVugg/fix/622-metal-prefill-docs-debu…
JustVugg Jul 26, 2026
033df1a
Apply the implicit GLM stop sequences on /v1/messages too
bharathgnana Jul 26, 2026
ce25594
cuda: fmt=6 (E8/IQ3) decode, so E8 containers can reach VRAM
ZacharyZcR Jul 26, 2026
8245766
Merge pull request #627 from ZacharyZcR/feat/fmt6-cuda-kernel
JustVugg Jul 26, 2026
c031307
Merge pull request #625 from bharathgnana/fix/anthropic-stop-sequences
JustVugg Jul 26, 2026
ab6c370
docs: add CUDA-backend build recipe for glibc >= 2.41
lornecodes Jul 26, 2026
455b071
cuda: keep async packed-int4 groups token exact
ZacharyZcR Jul 26, 2026
6ccb65a
fix(chat): retain role stop tokens in private mode
ZacharyZcR Jul 26, 2026
3472d41
test(stops): clear environment portably on Windows
ZacharyZcR Jul 26, 2026
1c6fdab
test(stops): update the Windows CRT environment
ZacharyZcR Jul 26, 2026
be79f45
doctor: report shared libraries the engine cannot load
duringcoffee Jul 26, 2026
72d2b70
docs: tell ARM64 users the prebuilt Linux archive will not run
duringcoffee Jul 26, 2026
cfd6dfa
Merge pull request #633 from ZacharyZcR/fix/381-chat-stop-set
JustVugg Jul 26, 2026
f5fe934
Merge pull request #632 from ZacharyZcR/fix/async-packed-int4-parity
JustVugg Jul 26, 2026
43e4de3
Merge pull request #636 from duringcoffee/docs/arm64-build
JustVugg Jul 26, 2026
39a3804
Merge pull request #630 from dawnfield-institute/docs/cuda-glibc241-b…
JustVugg Jul 26, 2026
874e8cf
Merge pull request #635 from duringcoffee/fix/serve-keep-stops
JustVugg Jul 26, 2026
adf6d68
fix(web): stop truncating reasoning at 512 tokens by default
JustVugg Jul 26, 2026
e8580e7
fix(serve): pin each conversation to a stable KV slot (#634)
JustVugg Jul 26, 2026
0e7b2c1
Merge pull request #638 from JustVugg/fix/web-reasoning-truncation
JustVugg Jul 26, 2026
d78f6e9
Merge pull request #639 from JustVugg/fix/kv-slot-conversation-affinity
JustVugg Jul 26, 2026
259f3cb
release: ship the web dashboard, so the Expert Atlas reaches users
ZacharyZcR Jul 26, 2026
847b1fd
Merge pull request #641 from ZacharyZcR/fix/ship-web-dashboard
JustVugg Jul 26, 2026
2278a08
docs: point the README to the gs64 model container (#642)
JustVugg Jul 26, 2026
f6ecf5f
Merge pull request #643 from JustVugg/fix/642-readme-hf-link
JustVugg Jul 26, 2026
227dd8a
site: new landing page (Anthropic-style)
JustVugg Jul 26, 2026
b3fafb1
Merge pull request #645 from JustVugg/site/anthropic-style-landing
JustVugg Jul 26, 2026
3544a12
tools: hoist the code-independent product out of the E8 sub-scale sea…
steve-m Jul 26, 2026
8e2ee1f
convert: block the quantizers by rows, and report progress on the loc…
steve-m Jul 26, 2026
e2c3d94
quant: AVX2 matmul_e8 — fmt=6 was 92% of decode on a scalar kernel
steve-m Jul 27, 2026
dbc312a
tools: native SIMD encoder for fmt=6, 15x over numpy (byte-identical)
steve-m Jul 26, 2026
bc6ccc4
fix(cuda): correct RAM budget on integrated/unified-memory GPUs (#653)
JustVugg Jul 27, 2026
176bb54
fix(cuda): resolve coli_cuda_device_integrated in the Windows DLL loader
JustVugg Jul 27, 2026
8c84da9
Merge pull request #659 from JustVugg/fix/cuda-integrated-mem-budget-653
JustVugg Jul 27, 2026
346f4f1
Merge pull request #654 from steve-m/feat-e8-avx2
JustVugg Jul 27, 2026
fa599e0
Merge pull request #655 from steve-m/feat-e8-converter
JustVugg Jul 27, 2026
23ca87a
quant: AVX-512 arm for matmul_i3 (fmt=5 int3-g64), high plane as __mm…
monotophic Jul 27, 2026
2a301ea
Merge pull request #661 from monotophic/kernel/avx512-matmul-i3
JustVugg Jul 28, 2026
9109961
fix(tooling): recognize AMD/ROCm GPUs in doctor + resource_plan (#662…
JustVugg Jul 28, 2026
eb7a881
Merge pull request #665 from JustVugg/fix/amd-rocm-tooling-discovery-…
JustVugg Jul 28, 2026
b0dbfdf
release: bump version to 1.2.0
JustVugg Jul 28, 2026
cd1b5e0
Merge origin/main into dev: sync website/favicon + #642 docs
JustVugg Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# The Docker build only needs c/ (engine sources + launcher). Everything else
# is either huge, host-specific, or irrelevant to the image.
.git
web/node_modules
web/dist
site
docs
**/*.o
**/*.exe
c/colibri
c/glm
c/olmoe
c/glm_tiny
**/.coli_usage
**/.coli_kv*
**/__pycache__
*.safetensors
*.log
CODEX-BRIEF.md
wt-inc4
55 changes: 51 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build colibri
run: cd c && make colibri
- name: Build colibri + inkling
run: cd c && make colibri inkling
- name: C test suite
run: cd c && make test-c

Expand All @@ -40,6 +40,38 @@ jobs:
nvcc -O2 -std=c++17 -arch=sm_80 -c backend_cuda.cu -o /dev/null \
-Xcompiler=-Wall,-Wextra
echo "CUDA syntax check passed"
- name: Compile backend_cuda_ink.cu (syntax only, no GPU)
run: |
cd c
# inkling's own CUDA backend (bf16 residents + int4 expert GEMM); same
# no-pipeline rule as above so a compile error can actually fail the job.
nvcc -O2 -std=c++17 -arch=sm_80 -c backend_cuda_ink.cu -o /dev/null \
-Xcompiler=-Wall,-Wextra
echo "inkling CUDA syntax check passed"

inkling-oracle:
name: Inkling oracle (token-exact vs transformers)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
cache-dependency-path: c/tools/oracle-requirements.txt
- name: Install torch (CPU) + transformers
run: pip install -r c/tools/oracle-requirements.txt
- name: Build inkling
run: cd c && make inkling
- name: Tiny-model fixture + token-exact oracle (f32, bit-exact experts)
run: |
cd c
# Random-init InklingForCausalLM via HF transformers, then the C engine
# reproduces it token-for-token. bits=0 keeps experts f32 (bit-exact
# forward); the greedy pass exits non-zero on any mismatch, so this
# gate fails the moment a shared-code change regresses the engine.
python3 tools/make_tiny_inkling.py tiny_inkling
SNAP=tiny_inkling ./inkling 8 0 tiny_inkling/ref_inkling.json

engine-hip-syntax:
name: HIP syntax check
Expand All @@ -58,8 +90,23 @@ jobs:
# link of the test binary below covers the single-source claim, and
# the engine link is exercised on real ROCm hardware (GPU_BACKENDS.md).
docker run --rm -v "$PWD":/src -w /src rocm/dev-ubuntu-24.04:6.2 bash -c '
apt-get update && apt-get install -y --no-install-recommends make gcc g++ &&
make -C c gpu-compile HIP=1 HIP_ARCH=gfx1100'
apt-get update && apt-get install -y --no-install-recommends make gcc g++ rocwmma-dev binutils &&
make -C c gpu-compile HIP=1 HIP_ARCH=gfx1100 &&
# The engine link is skipped here (see above), so assert the property
# that link needs instead: backend_cuda.o must be position-independent.
# hipcc emits a non-PIC/PIE object unless told otherwise, while gcc
# links -pie by default on the distros users build on, so absolute
# 32-bit relocations here mean `make HIP=1 colibri` dies with
# R_X86_64_32 ... can not be used when making a PIE object
# That is exactly what happened before -fPIE was added to HIPCCFLAGS:
# this job stayed green over a HIP build that could not link at all,
# because gpu-compile links the TEST binary with the hipcc driver
# (PIC-agnostic) and never runs the gcc engine link. One readelf keeps
# that regression from silently coming back.
if readelf -r c/backend_cuda.o | grep -qE "R_X86_64_32S?"; then
echo "backend_cuda.o has absolute 32-bit relocations: the PIE link of colibri will fail (HIPCCFLAGS needs -fPIE or -fPIC)" >&2
exit 1
fi'
echo "HIP syntax check passed"

windows-cuda-build:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,26 @@ jobs:
make colibri ${{ matrix.make_args }}
ls -lh colibri${{ matrix.ext }}
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
cache-dependency-path: web/package-lock.json

# The dashboard is what README shows and what serves the Expert Atlas, but it
# was never packaged: a release user has no web/ to build from, so `coli web`
# pointed them at a directory the archive does not contain. Built here rather
# than committed, so dist/ stays a build artifact.
# shell: bash — on Windows the job default is msys2, but setup-node installs
# the native node/npm, which msys2's minimal PATH does not see.
- name: Build web dashboard
shell: bash
run: |
cd web
npm ci
npm run build
ls -lh dist/index.html dist/experts.json
- name: Package
run: |
TAG=${GITHUB_REF#refs/tags/}
Expand All @@ -71,6 +91,10 @@ jobs:
cp c/resource_plan.py dist/
cp c/doctor.py dist/
cp LICENSE dist/
# web/dist sits NEXT TO coli in the archive; both coli and openai_server.py
# probe that layout as well as the source checkout's one-level-up form.
mkdir -p dist/web
cp -r web/dist dist/web/dist
cd dist
if [ "${{ matrix.ext }}" = ".exe" ]; then
7z a colibri-${TAG}-${{ matrix.name }}.zip *
Expand Down Expand Up @@ -100,6 +124,12 @@ jobs:
# (The v1.1.0 tag build failed here when the banner still said "colibrì".)
echo "$out" | grep -q "colibri" || { echo "FAIL: coli did not run"; exit 1; }
echo "OK: coli locates the engine in the published archive"
# Same reasoning for the dashboard: assert the files are there AND that the
# server resolves them, since a right-looking archive with an unresolvable
# path is exactly the failure this whole step exists to catch.
test -f web/dist/index.html || { echo "FAIL: dashboard missing from archive"; exit 1; }
test -f web/dist/experts.json || { echo "FAIL: expert atlas missing from archive"; exit 1; }
python3 -c "import sys; sys.path.insert(0, '.'); from openai_server import APIHandler as A; d = A.WEB_DIST; assert (d / 'index.html').is_file(), 'server resolved WEB_DIST to %s, which has no index.html' % d; assert (d / 'experts.json').is_file(), 'no expert atlas under %s' % d; print('OK: the packaged server resolves the dashboard at', d)"
# Only the archives -- never the loose files. `dist/colibri-*.*` used to work by accident
# (the engine was versioned, so it did not match); now that the engine is plainly named,
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ c/colibri.exe
c/glm
c/glm.exe
c/olmoe
c/inkling
c/olmoe.exe
c/iobench
c/iobench.exe
Expand Down Expand Up @@ -68,3 +69,4 @@ olmoe_merged/
olmoe_i4/
c/olmoe_merged/
c/olmoe_i4/
c/tiny_inkling/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ the full 756 GB on disk at once:
COLI_MODEL=/nvme/glm52_i4 ./coli chat # RAM budget, cache and MTP auto-detected
COLI_MODEL=/nvme/glm52_i4 ./coli plan # inspect the planned VRAM/RAM/disk placement
COLI_MODEL=/nvme/glm52_i4 ./coli doctor # read-only readiness check
COLI_MODEL=/nvme/glm52_i4 ./coli doctor --deep # strict tensors/shards/index/mirror preflight
./coli web --model /nvme/glm52_i4 # API + web dashboard on one port
./coli serve --model /nvme/glm52_i4 # OpenAI-compatible API only
```
Expand Down
3 changes: 3 additions & 0 deletions c/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ olmoe_i4/
.build-config
tests/test_st_mirror
tests/test_st_pread
tools/libiq3.so
tools/libiq3.dylib
tools/iq3.dll
49 changes: 45 additions & 4 deletions c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ HIP ?= 0
ROCM_HOME ?= /opt/rocm
HIPCC ?= $(ROCM_HOME)/bin/hipcc
HIP_ARCH ?= native
HIPCCFLAGS ?= -O3 -std=c++17 -x hip --offload-arch=$(HIP_ARCH) -Wall -Wextra
HIPCCFLAGS ?= -O3 -std=c++17 -x hip --offload-arch=$(HIP_ARCH) -Wall -Wextra -fPIE
GPUCC = $(NVCC)
GPUFLAGS = $(NVCCFLAGS)
GPUCC_NAME = nvcc (set CUDA_HOME or NVCC)
Expand All @@ -199,7 +199,7 @@ else
PYTHON ?= python3
endif
CUDA_OBJ =
TEST_BINS = tests/test_json$(EXE) tests/test_st$(EXE) tests/test_st_mirror$(EXE) tests/test_st_pread$(EXE) tests/test_tier$(EXE) tests/test_grammar$(EXE) tests/test_schema_gbnf$(EXE) tests/test_decode_batch$(EXE) tests/test_idot$(EXE) tests/test_i4_grouped$(EXE) tests/test_stops$(EXE) tests/test_topp$(EXE) tests/test_sample_nan$(EXE) tests/test_temp_env$(EXE) tests/test_tok_o200k$(EXE) tests/test_kv_alloc$(EXE) tests/test_int3$(EXE) tests/test_int3_load$(EXE) tests/test_i4_acc512$(EXE) tests/test_compat_direct$(EXE) tests/test_dsa_select$(EXE) tests/test_logit_nan$(EXE) tests/test_pipe_block$(EXE) tests/test_e8_kernel$(EXE)
TEST_BINS = tests/test_json$(EXE) tests/test_st$(EXE) tests/test_st_mirror$(EXE) tests/test_st_pread$(EXE) tests/test_tier$(EXE) tests/test_grammar$(EXE) tests/test_schema_gbnf$(EXE) tests/test_decode_batch$(EXE) tests/test_idot$(EXE) tests/test_i4_grouped$(EXE) tests/test_stops$(EXE) tests/test_topp$(EXE) tests/test_sample_nan$(EXE) tests/test_temp_env$(EXE) tests/test_tok_o200k$(EXE) tests/test_kv_alloc$(EXE) tests/test_int3$(EXE) tests/test_int3_load$(EXE) tests/test_i4_acc512$(EXE) tests/test_compat_direct$(EXE) tests/test_dsa_select$(EXE) tests/test_logit_nan$(EXE) tests/test_router_nan$(EXE) tests/test_pipe_block$(EXE) tests/test_e8_kernel$(EXE)
ifneq (,$(LINUX))
TEST_BINS += tests/test_uring$(EXE)
endif
Expand Down Expand Up @@ -227,6 +227,7 @@ endif
CFLAGS += -DCOLI_CUDA
LDFLAGS += -L$(CUDA_HOME)/lib64 -Wl,-rpath,$(CUDA_HOME)/lib64 -lcudart -lstdc++
CUDA_OBJ = backend_cuda.o
INK_CUDA_OBJ = backend_cuda_ink.o
endif

ifeq ($(HIP),1)
Expand Down Expand Up @@ -300,6 +301,10 @@ cuda-dll: backend_cuda.cu backend_cuda.h
-L"$(CUDA_HOME)/lib/x64" -lcudart \
backend_cuda.cu -o coli_cuda.dll

backend_cuda_ink.o: backend_cuda_ink.cu backend_cuda_ink.h .build-config
@command -v "$(NVCC)" >/dev/null 2>&1 || { echo "nvcc not found: set CUDA_HOME or NVCC" >&2; exit 1; }
"$(NVCC)" $(NVCCFLAGS) -c backend_cuda_ink.cu -o $@

backend_cuda.o: backend_cuda.cu backend_cuda.h backend_gpu_compat.h .build-config
@command -v "$(GPUCC)" >/dev/null 2>&1 || { echo "$(GPUCC_NAME) not found" >&2; exit 1; }
"$(GPUCC)" $(GPUFLAGS) -c backend_cuda.cu -o $@
Expand All @@ -311,6 +316,27 @@ metal-test: tests/test_backend_metal.mm backend_metal.mm backend_metal.h
$(METALXX) tests/test_backend_metal.mm backend_metal.mm -framework Metal -framework Foundation -o backend_metal_test
./backend_metal_test

# Standalone large-batch GEMM correctness sweep — reproduces the long-context prefill
# corruption in seconds (no model). OMP-parallel CPU reference.
gemm-test: tests/test_gemm_largebatch.mm backend_metal.mm backend_metal.h
$(METALXX) $(OMPC) tests/test_gemm_largebatch.mm backend_metal.mm $(OMPL) -framework Metal -framework Foundation -o gemm_largebatch_test
./gemm_largebatch_test

# fmt=6 (E8/IQ3) encoder for tools/convert_fp8_to_int4.py. OPTIONAL: iq3_pack.py
# falls back to its numpy path when the library is absent, producing the same
# bytes ~13x slower. Uses the same ARCH as the engine, so an AVX2 host gets the
# SIMD search and anything else compiles the scalar fallback.
ifneq (,$(DARWIN))
IQ3LIB = tools/libiq3.dylib
else ifneq ($(IS_WIN),)
IQ3LIB = tools/iq3.dll
else
IQ3LIB = tools/libiq3.so
endif
iq3: $(IQ3LIB)
$(IQ3LIB): tools/iq3_encode.c
$(CC) $(CFLAGS) -fPIC -shared $< -o $@ $(LDFLAGS)

cuda-test: backend_cuda.cu backend_cuda.h backend_gpu_compat.h tests/test_backend_cuda.cu
@command -v "$(GPUCC)" >/dev/null 2>&1 || { echo "$(GPUCC_NAME) not found" >&2; exit 1; }
"$(GPUCC)" $(GPUFLAGS) backend_cuda.cu tests/test_backend_cuda.cu -o backend_cuda_test$(EXE)
Expand All @@ -333,6 +359,9 @@ cuda-bench: backend_cuda.cu backend_cuda.h backend_gpu_compat.h tests/bench_tens
olmoe$(EXE): olmoe.c st.h json.h compat.h
$(CC) $(CFLAGS) olmoe.c -o olmoe$(EXE) $(LDFLAGS)

inkling$(EXE): inkling.c st.h json.h compat.h $(INK_CUDA_OBJ)
$(CC) $(CFLAGS) inkling.c $(INK_CUDA_OBJ) -o inkling$(EXE) $(LDFLAGS)

# Use a baseline that matches the compiler target. macOS already targets a
# portable baseline when ARCH is empty; forcing the x86 value there breaks
# Apple Silicon. Unknown targets use native rather than an invalid x86 flag.
Expand Down Expand Up @@ -421,6 +450,9 @@ tests/test_int3_load$(EXE): tests/test_int3_load.c colibri.c st.h uring.h json.h
tests/test_logit_nan$(EXE): tests/test_logit_nan.c colibri.c st.h uring.h json.h tok.h tok_unicode.h compat.h grammar.h tier.h
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)

tests/test_router_nan$(EXE): tests/test_router_nan.c colibri.c st.h uring.h json.h tok.h tok_unicode.h compat.h grammar.h tier.h
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)

tests/test_i4_acc512$(EXE): tests/test_i4_acc512.c
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)

Expand Down Expand Up @@ -495,8 +527,17 @@ install: colibri$(EXE) olmoe$(EXE)
$(INSTALL) -m 755 coli $(DESTDIR)$(BINDIR)/coli
$(INSTALL) -m 755 colibri$(EXE) $(DESTDIR)$(LIBEXECDIR)/colibri$(EXE)
$(INSTALL) -m 755 olmoe$(EXE) $(DESTDIR)$(LIBEXECDIR)/olmoe$(EXE)
$(INSTALL) -m 644 resource_plan.py doctor.py openai_server.py $(DESTDIR)$(LIBEXECDIR)/
$(INSTALL) -m 644 resource_plan.py doctor.py openai_server.py version.py $(DESTDIR)$(LIBEXECDIR)/
$(INSTALL) -m 644 tools/*.py $(DESTDIR)$(LIBEXECDIR)/tools/
@# The dashboard is an optional build artifact (cd web && npm run build), so install
@# it only when it exists. It goes NEXT TO openai_server.py, which probes ./web/dist.
@if [ -f ../web/dist/index.html ]; then \
$(INSTALL) -d $(DESTDIR)$(LIBEXECDIR)/web/dist; \
cp -R ../web/dist/. $(DESTDIR)$(LIBEXECDIR)/web/dist/; \
echo "installed the web dashboard"; \
else \
echo "web/dist absent -- skipping the dashboard (build it with: cd web && npm run build)"; \
fi

uninstall:
rm -f $(DESTDIR)$(BINDIR)/coli
Expand All @@ -507,4 +548,4 @@ clean:

bench: iobench$(EXE)
@if [ -n "$(ARGS)" ]; then ./iobench$(EXE) $(ARGS); else echo "built iobench$(EXE) — run: ./iobench$(EXE) <file> <MB> <iters> <threads> <direct 0|1>"; fi
.PHONY: all colibri glm cuda-test hip-test gpu-compile cuda-bench cuda-dll portable test-c test-python test check clean install uninstall bench
.PHONY: all colibri glm iq3 cuda-test hip-test gpu-compile cuda-bench cuda-dll portable test-c test-python test check clean install uninstall bench
Loading
Loading