Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ jobs:
# run it -- the second half of #720.
mkdir -p dist/tools
cp c/tools/k3_tokenizer.py dist/tools/
# check_ablate_evidence.py verifies the ABLATE evidence that eval_glm.py
# (packaged above) produces. Nothing in the code names it -- its caller is a
# person with argparse arguments -- so pack_python's import walk cannot reach
# it, exactly like k3_tokenizer.py. Copied explicitly for the same reason.
cp c/tools/check_ablate_evidence.py dist/tools/
cp c/coli dist/
# Windows has nothing to click otherwise: `coli` is an extensionless
# Python script, and the .exe files are engines that exit at once
Expand Down Expand Up @@ -190,6 +195,9 @@ jobs:
# Kimi K3 needs tokenizer.json synthesized from tiktoken.model; without this
# script in the archive the engine ships but cannot be driven by coli chat.
test -f tools/k3_tokenizer.py || { echo "FAIL: k3_tokenizer.py missing from archive"; exit 1; }
# Same position as k3_tokenizer.py: reachable only by a person, so only an
# explicit gate can prove it shipped.
test -f tools/check_ablate_evidence.py || { echo "FAIL: check_ablate_evidence.py missing from archive"; exit 1; }
# E tutto cio' che coli raggiunge, import e sottoprocessi. Il controllo
# qui sopra guarda l'unico file che il passo di copia aveva appena
# scritto: conferma se stesso, ed e' il motivo per cui la v1.10.0 e'
Expand All @@ -202,6 +210,18 @@ jobs:
# fine. The check was wrong, not the artifact.
python3 -c "import ast; ast.parse(open('tools/k3_tokenizer.py', encoding='utf-8').read())" \
|| { echo "FAIL: packaged k3_tokenizer.py does not parse"; exit 1; }
python3 -c "import ast; ast.parse(open('tools/check_ablate_evidence.py', encoding='utf-8').read())" \
|| { echo "FAIL: packaged check_ablate_evidence.py does not parse"; exit 1; }
# test -f and ast.parse both only look at this one file, and only at its
# syntax -- neither one executes it, so neither catches a real import-time
# failure: an undefined name at module scope, a decorator that raises, or
# (were a local import ever reintroduced here) a dependency pack_python's
# walk did not carry into the archive. Import it for real, from the archive
# root, the same way a person running the shipped `coli` would reach it --
# never execute it, an import is enough to prove every name it needs at
# module load resolves.
python3 -c "import tools.check_ablate_evidence" \
|| { echo "FAIL: packaged check_ablate_evidence.py does not import"; exit 1; }
COLI_EXPECT="$SIBLINGS" python3 - <<'PYCHK'
import importlib.machinery, importlib.util, json, os, sys, tempfile
from family_registry import all_families
Expand Down
16 changes: 15 additions & 1 deletion c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ $(file >.build-config,$(BUILD_CONFIG))
endif
.build-config: ;

colibri$(EXE): colibri.c cli_args.h st.h uring.h json.h tok.h tok_unicode.h compat.h grammar.h quant.h sample.h kv_persist.h telemetry.h route_trace.h omp_tune.h kv_fp8.h kv_tq.h abl.h backend_cuda.h backend_metal.h backend_vulkan.h decode_batch.h edge_adapters.h edge_runtime.h edge_tok_internal.h schema_gbnf.h segment_adapter_internal.h segment_adapters.h segment_runtime.h tier.h $(CUDA_OBJ) $(METAL_OBJ) $(VK_OBJ) $(VK_SPV) .build-config
colibri$(EXE): colibri.c cli_args.h st.h uring.h json.h tok.h tok_unicode.h compat.h grammar.h quant.h sample.h kv_persist.h telemetry.h route_trace.h omp_tune.h kv_fp8.h kv_tq.h abl.h backend_cuda.h backend_metal.h backend_vulkan.h decode_batch.h edge_adapters.h edge_runtime.h edge_tok_internal.h evidence_digest.h schema_gbnf.h segment_adapter_internal.h segment_adapters.h segment_runtime.h tier.h $(CUDA_OBJ) $(METAL_OBJ) $(VK_OBJ) $(VK_SPV) .build-config
$(CC) $(CFLAGS) colibri.c $(CUDA_OBJ) $(METAL_OBJ) $(VK_OBJ) -o colibri$(EXE) $(LDFLAGS)

# Vulkan backend object (plain C + vulkan headers) and its SPIR-V shaders.
Expand Down Expand Up @@ -1321,6 +1321,20 @@ tests/test_rope_invfreq$(EXE): tests/test_rope_invfreq.c colibri.c st.h uring.h
tests/test_grammar_cache$(EXE): tests/test_grammar_cache.c colibri.c st.h uring.h json.h tok.h tok_unicode.h compat.h grammar.h tier.h quant.h sample.h kv_persist.h telemetry.h route_trace.h
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)

# The classified logit-row reduction in sample.h and the digest in
# evidence_digest.h: no model/weights, published SHA-256 vectors, an
# agreement check against the plain logprob_target the sampling path uses
# on rows a float subtraction cannot mis-round, and a double-precision
# check against a second double computation on rows that do.
tests/test_logprob_status$(EXE): tests/test_logprob_status.c colibri.c sample.h evidence_digest.h st.h uring.h json.h tok.h tok_unicode.h compat.h grammar.h tier.h quant.h kv_persist.h telemetry.h route_trace.h
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)

# The ablation mode's manifest loader, evidence writer and dispatch contract.
# The adapter build bypasses only the model computation, so the parser/writer
# path is exercised for real with no model and no weights.
tests/test_ablate_mode$(EXE): tests/test_ablate_mode.c colibri.c sample.h evidence_digest.h abl.h st.h uring.h json.h tok.h tok_unicode.h compat.h grammar.h tier.h quant.h kv_persist.h telemetry.h route_trace.h
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)

# Standalone: drives a faithful miniature of moe()'s routing+accumulate and links
# the SAME abl.h the engine links -- no model/weights needed (the ablation-logic gate).
tests/test_ablate$(EXE): tests/test_ablate.c abl.h
Expand Down
Loading
Loading