Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
414 commits
Select commit Hold shift + click to select a range
5d7fd65
updated rag test conditions (#488)
nshejwalkar Mar 4, 2026
fcf0ea9
optimize scale correction in cactus_attention_f16_h64 (#485)
jakmro Mar 4, 2026
ba48150
fix greedy sampler ignoring logit suppression (#486)
jakmro Mar 4, 2026
da4c917
v1.10
HenryNdubuaku Mar 4, 2026
f2307c7
Fix/issue#490 (#491)
lennartvoelz Mar 4, 2026
078340f
simplify and align sdks (#489)
jakmro Mar 4, 2026
a750ffd
remove models (#492)
jakmro Mar 4, 2026
5a941b3
Update model configurations and enhance workflow settings in publish_…
jakmro Mar 5, 2026
072d542
Update workflow to use macos-latest instead of macos-latest-xlarge (#…
jakmro Mar 5, 2026
bc268ad
Add dynamic max_tokens estimation based on audio length in cactus_tra…
jakmro Mar 5, 2026
fd7ded8
macOS: link clang_rt.osx to fix SME2 (__arm_tpidr2_*) link failures u…
yujonglee Mar 5, 2026
f3f63fd
Add FFI log control: cactus_log_set_level and cactus_log_set_callback…
yujonglee Mar 5, 2026
734d477
Karen/qwen3p5 (#481)
kar-m Mar 6, 2026
a77754f
updates
HenryNdubuaku Mar 6, 2026
4f662ca
update docs
HenryNdubuaku Mar 6, 2026
79fb915
update
HenryNdubuaku Mar 6, 2026
687a610
CLI upgrades (#504)
rshemet Mar 6, 2026
d5cd5c0
feat(stt): add custom vocabulary hotword biasing for transcription (#…
vyomshah05 Mar 7, 2026
81b6b3c
Add Gemma 3N (text-only) model support (#493)
ncylich Mar 7, 2026
f8b714c
fix: make FunctionGemma prompt formatting strict (remove injected exa…
lennartvoelz Mar 7, 2026
55abbff
fix: apply logit bias before greedy sampling (#507)
ncylich Mar 9, 2026
59ad684
remove redundant file linking for tie_word_embeddings (#506)
jakmro Mar 9, 2026
f69b3c6
Port general engine improvements for TinyLlama (#513)
ncylich Mar 10, 2026
849ce3f
Speech-to-Text Timestamps (#515)
jakmro Mar 11, 2026
a5acad3
v1.11
HenryNdubuaku Mar 11, 2026
bf599a3
Update README.md
HenryNdubuaku Mar 11, 2026
0e208cb
Versioned docs with quickstart and SDK chooser (#522)
rshemet Mar 16, 2026
1cc961c
add CACTUS_CLOUD_API_BASE (#521)
yujonglee Mar 16, 2026
c05ed19
Model weights discoverability (#520)
jakmro Mar 16, 2026
5d3177e
fix: set telemetry framework to "rust" for Rust bindings (#519)
rshemet Mar 16, 2026
5444c1e
fix: prefer local libcactus over system-installed in test build (#516)
rshemet Mar 16, 2026
f2d2e0d
Engine updates: tool calling, compute_entropy, converter improvements…
ncylich Mar 16, 2026
cb66f77
`cactus_prefill` (#512)
mhayes853 Mar 16, 2026
57c39c3
Missing torch ops (#518)
cattermelon1234 Mar 16, 2026
0af7bb2
streamline tests
HenryNdubuaku Mar 17, 2026
140fab8
Docs fixes (#524)
jakmro Mar 17, 2026
dc9b4b9
Fix testing bug
HenryNdubuaku Mar 19, 2026
e8e9363
docs: document custom vocabulary support for transcription (#525)
ayushmk7 Mar 19, 2026
4c90e13
updates
HenryNdubuaku Mar 22, 2026
682ae98
Youtu (#530)
jakmro Mar 23, 2026
e2ba139
Update README.md
HenryNdubuaku Mar 23, 2026
486c576
Roadmap updates
HenryNdubuaku Mar 23, 2026
990c938
Update README.md
HenryNdubuaku Mar 23, 2026
a216539
Update README.md
HenryNdubuaku Mar 23, 2026
a6432b2
Clean up Hugging Face cache after model export (#533)
jakmro Mar 24, 2026
5d66022
Added parakeet optimizations for apple (#534)
ParkiratS Mar 25, 2026
d49e93d
Cactus torch api clean (#529)
cattermelon1234 Mar 26, 2026
f433564
add CACTUS_CLOUD_HEADERS support (#531)
yujonglee Mar 26, 2026
e413e4d
task-specific tests
HenryNdubuaku Mar 26, 2026
b631a09
Parakeet encoder optimization (#535)
ParkiratS Mar 26, 2026
b825607
Update docs site_url to docs.cactuscompute.com (#527)
rshemet Mar 31, 2026
aeee44b
Custom vocabulary support for Parakeet TDT (#532)
rshemet Mar 31, 2026
2d457c7
Fix VLM crash when adding multiple images in multi-turn conversation …
FarooqMulla Mar 31, 2026
410e1c5
New LayerNorm Kernel (#540)
nshejwalkar Mar 31, 2026
17bcbe6
affinity
HenryNdubuaku Mar 31, 2026
c38aec7
LFM2 blog
HenryNdubuaku Mar 31, 2026
0b9ad55
update mkdocs
HenryNdubuaku Mar 31, 2026
66372e6
Add pyannote/segmentation-3.0 speaker diarization (10ms, 976× realtim…
rshemet Apr 1, 2026
e210028
Tinyllama (#536)
ParkiratS Apr 2, 2026
636e09f
updates
HenryNdubuaku Apr 2, 2026
8647c25
Improve model publishing error handling in workflow (#546)
jakmro Apr 3, 2026
dd5bd27
Fix VLM prefill cache reuse passing all image paths for delta tokens …
KayaanT Apr 3, 2026
18c48f2
Add cache cleanup for Hugging Face models in export_and_publish_model…
jakmro Apr 3, 2026
d69695d
Add branch override option to publish workflow (#548)
ncylich Apr 4, 2026
6273c48
Use raw state dict loading for Gemma 3n conversion (#549)
ncylich Apr 4, 2026
f03da54
Update blog URL in README.md (#544)
amerkld Apr 4, 2026
aa23d7e
aggressive graph and kernel refactor
HenryNdubuaku Apr 4, 2026
35495d7
refactor engine and cactus
HenryNdubuaku Apr 5, 2026
aa21354
Parakeet streaming fix (#551)
ParkiratS Apr 6, 2026
c768b04
Tool call prompt formatting (#558)
jakmro Apr 6, 2026
97d4414
Update CMakeLists.txt to include gemma4 model sources and fix Dart ty…
jakmro Apr 7, 2026
57a6ccc
Feature Cleanup (#559)
ParkiratS Apr 7, 2026
e65ae06
Add Whisper v3 (large-v3) support (#557)
ncylich Apr 7, 2026
6228b62
done (#567)
yujonglee Apr 9, 2026
f2385f3
LFM2-VL-450M: fix garbled output (vision tower, template, kernel) (#565)
ncylich Apr 9, 2026
d4af1a1
Change default transcribe model to nvidia/parakeet-tdt-0.6b-v3 (#566)
rshemet Apr 9, 2026
e9cc468
Expose min_p and repetition_penalty in completion options (#560)
DuFanYin Apr 9, 2026
35de8df
Graph save load (#556)
cattermelon1234 Apr 10, 2026
4e54859
Pyannote features and optimizations (#571)
jakmro Apr 10, 2026
f8afc46
Karen/needle (#574)
kar-m Apr 13, 2026
0d44b06
fix apple i8mm detection to use runtime sysctl check (#562)
DuFanYin Apr 13, 2026
130a60d
Fix streaming transcribe (#576)
jakmro Apr 14, 2026
4cc8202
commit
HenryNdubuaku Apr 14, 2026
b41f89a
Enable SDL2 live mic recording in chat build (#579)
rshemet Apr 15, 2026
cbbee1b
fix gemma4 conversion and cli (#581)
jakmro Apr 15, 2026
1e1a300
Made non-thinking default for gemma4 & Introduce simultaneous multimo…
ParkiratS Apr 15, 2026
1d51143
optimize weight management (#590)
jakmro Apr 16, 2026
c078595
added a prompt fix for better vision+audio prompt, removed code that …
kar-m Apr 16, 2026
e1b0a20
added default confidence and wired that for vlm (#591)
kar-m Apr 16, 2026
a875fc3
Gemma4 fixes (#588)
ParkiratS Apr 16, 2026
34df072
Gemma4 tool calling and RoPE fixes (#594)
ncylich Apr 17, 2026
d6b5efb
increased rolling window size for gemma4 (#593)
kar-m Apr 17, 2026
10d04d7
SDKs alignment
jakmro Apr 18, 2026
40a7123
v1.14
HenryNdubuaku Apr 18, 2026
1fe8a51
Lfm tool arg fixes (#596)
justinl66 Apr 20, 2026
6f1c63d
Gemma4 multimodal multi-turn fixes (#598)
ncylich Apr 21, 2026
3404637
TurboQuant-H
HenryNdubuaku Apr 22, 2026
dc49d36
Update turboquant-h
HenryNdubuaku Apr 22, 2026
4e72a9f
update blog release
HenryNdubuaku Apr 22, 2026
07f565e
updates
HenryNdubuaku Apr 22, 2026
d683683
mathjax
HenryNdubuaku Apr 22, 2026
b5cc03a
updated llm.txt
HenryNdubuaku Apr 22, 2026
09d3d79
LFM NPU Fallback + Tokenizer Fixes (#605)
ParkiratS Apr 22, 2026
f197e4e
Fix converter logic for models not on cactus huggingface (#608)
cattermelon1234 Apr 25, 2026
b338aeb
Graph remaining ops (#578)
cattermelon1234 Apr 25, 2026
b8527fe
Aggressive Refactor!
HenryNdubuaku Apr 27, 2026
510752b
more refactor
HenryNdubuaku Apr 27, 2026
0008507
Cactus-kernels
HenryNdubuaku Apr 27, 2026
4951333
cactus-graph
HenryNdubuaku Apr 27, 2026
e09b963
cactus-graph
HenryNdubuaku Apr 30, 2026
dadeb7e
Karen/v2 tq (#615)
kar-m May 1, 2026
990d7bd
cleanup engine
HenryNdubuaku May 1, 2026
502c751
refactor TQ
HenryNdubuaku May 1, 2026
dd73244
optimise f16
HenryNdubuaku May 1, 2026
7a608cd
optimize tq-kernels
HenryNdubuaku May 2, 2026
5669630
test fixes
HenryNdubuaku May 2, 2026
20448e2
optimisations
HenryNdubuaku May 2, 2026
a53f0ce
Add fused dense INT4 MLP op for Gemma-4 E2B decode (#617)
ncylich May 4, 2026
d917981
inner 1 fast path (#618)
cattermelon1234 May 4, 2026
45753df
Hybrid INT8/FP16 decode kernel: 2× faster + sliding-window fast path …
ncylich May 6, 2026
c40aed0
axis reductions fast path -> v2 (#629)
cattermelon1234 May 6, 2026
d36558e
Pytorch capture -> cactus v2 (#622)
cattermelon1234 May 6, 2026
60f8721
Karen/tq v2 debugging (#630)
kar-m May 7, 2026
b7d15d3
cactus-kernels/src/matmul.cpp — Three fixes:
HenryNdubuaku May 9, 2026
b99db76
Streamline further
HenryNdubuaku May 9, 2026
0f87894
added cactus download cq flag (#631)
kar-m May 12, 2026
7276100
align c++ official Needle inference (#637)
jakmro May 13, 2026
a085fc7
streamline conversion for CQ
HenryNdubuaku May 13, 2026
ea9d5e8
bugfix
HenryNdubuaku May 13, 2026
eac6966
bug fixes
HenryNdubuaku May 13, 2026
554fd0b
Fix CQ decode fast path for mmap weights (#633)
ncylich May 13, 2026
2931f7a
bugfix
HenryNdubuaku May 13, 2026
26094db
bugfix
HenryNdubuaku May 13, 2026
6e32e47
Cactus Quant Speedup (#641)
justinl66 May 15, 2026
ecdfafb
Transpiler complete (#640)
ParkiratS May 16, 2026
3227a7f
fix: add missing <iomanip> include for Linux ARM64 builds (#647)
ramanishka May 18, 2026
2cbcd80
Everything (#649)
justinl66 May 18, 2026
24f7589
Transpiler complete (#652)
ParkiratS May 19, 2026
b2d84f7
Refactor quantization parameters in CLI and publish workflow (#651)
jakmro May 19, 2026
71e109f
Bindings (#653)
jakmro May 19, 2026
52c06ee
Cleanup V2 (Cpp Native + CLI Update) (#650)
justinl66 May 20, 2026
0e97e13
KV Cache Bugfix (reset cache, think token data shift, underflow guard…
justinl66 May 20, 2026
09d0fdc
bug fixes, cleanups, docs & blog (#657)
jakmro May 20, 2026
78719e8
Karen/v2 transcribe (#660)
kar-m May 21, 2026
95880ae
Build system, bindings, CI cleanup, pypi & brew (#661)
jakmro May 22, 2026
75f9a04
Add scipy to requirements
jakmro May 22, 2026
c0f6914
clean cli
jakmro May 24, 2026
4e592ff
Add native chunked prefill for transpiled LLM bundles (#659)
ncylich May 25, 2026
4b66a06
fix and cleanup cli
jakmro May 26, 2026
ba15b09
Refactor CLI commands and documentation for clarity, update transcrib…
jakmro May 26, 2026
7a9e1b4
fix clean method
jakmro May 26, 2026
cad2ebc
Optimize orthogonal CQ4 LM head layout (#663)
ncylich May 26, 2026
bed4558
fix release workflow
jakmro May 26, 2026
cbc7974
update docs
HenryNdubuaku May 27, 2026
fb0adae
Make Android scheduling load-aware (#666)
ncylich May 27, 2026
d94478c
V2 NPU Support (#664)
justinl66 May 29, 2026
da383d3
Add v2 local HTTP server (#669)
ncylich May 29, 2026
2c08602
Multiple model fixes (#673)
jakmro May 29, 2026
c9b08fb
Jax Transpiler path (#671)
Ayan9074 May 29, 2026
828571a
test: fix test_model.py for v2 transpiled bundle requirement
ncylich May 29, 2026
c4aea8e
Propagate test executable failures (#683)
psymon-ai Jun 1, 2026
add442d
Wire text/image/audio embeddings on the v2 transpiler; add /v1/embedd…
ncylich Jun 2, 2026
7ab3eac
Full implmentation into Gemma4 (#668)
ParkiratS Jun 2, 2026
bf31835
Jaxtranspilerpath (#681)
Ayan9074 Jun 2, 2026
53f5c50
Merge v2 into main
HenryNdubuaku Jun 4, 2026
55d1cd4
Refactor and optimize kernel functions for improved performance and r…
HenryNdubuaku Jun 4, 2026
e65fb73
Update default model paths and remove unused model references in scri…
HenryNdubuaku Jun 4, 2026
460eefe
Add attach_conv_bias method and refactor convolution functions for bi…
HenryNdubuaku Jun 4, 2026
09519a0
Add json string escaping functions and refactor related code for cons…
HenryNdubuaku Jun 4, 2026
6f3b0c5
Merge cleanup (#692)
jakmro Jun 8, 2026
8a9adf8
Fix docs deploy: align SDK handling and rewrite all absolute links
jakmro Jun 8, 2026
fd61cbd
add missing cactus transpile flags
jakmro Jun 8, 2026
ce1c1b4
Long-context: rolling KeyDiff KV-cache compaction + chunked prefill (…
ncylich Jun 8, 2026
14ac567
Correct docs to match current code (#696)
ncylich Jun 8, 2026
57040c8
Use NPU vision encoder for Gemma 4 in chunk-prefill path
jakmro Jun 9, 2026
01e6a70
Add entitlements file for increased memory limit in iOS tests
jakmro Jun 9, 2026
930d6c8
align chat-template image-token count with vision encoder output
jakmro Jun 10, 2026
7a4ad3a
Karen/needle v2 (#690)
kar-m Jun 10, 2026
8e7b71e
Update bundle resolution messages and add bundle management functions
HenryNdubuaku Jun 11, 2026
bbb3e9a
fixed multiturn gemma tool chat template, fixed qwen and lfm tool cha…
kar-m Jun 11, 2026
5c17824
fixed needle rope bug, moved repeated rope table instantiations from …
kar-m Jun 11, 2026
1db5aad
added language model embed component (#714)
kar-m Jun 11, 2026
366d9e2
engine+graph: thread-safe last_error + JSON option-parse hardening (#…
ncylich Jun 11, 2026
dfd3d8b
Fix Gemma 4 NPU vision encoder on non-square images (#718)
jakmro Jun 11, 2026
7dd1ed5
rag interface fix for lm embeddings (#719)
kar-m Jun 12, 2026
6d0c441
bindings: JNI & React-Native FFI memory-safety (#708)
ncylich Jun 12, 2026
87ad2e6
convert/CLI: conversion & tokenizer robustness (#707)
ncylich Jun 12, 2026
ed1cbcf
transpiler: op routing, fusion & JAX-capture correctness (#706)
ncylich Jun 12, 2026
07741ed
transpiler: JAX attention causality + reduction precision, attention-…
ncylich Jun 12, 2026
dabdc37
telemetry: JSON-escape records + bound the offline event cache (#704)
ncylich Jun 12, 2026
81857ca
cactus-engine: runtime correctness & memory-safety (#703)
ncylich Jun 12, 2026
4dbc03d
Fuse dispatch for the legacy interleaved CQ4 GEMV (#717)
ncylich Jun 12, 2026
d51dbcf
Pad the chunked-prefill tail for sliding-window models (#716)
ncylich Jun 12, 2026
06946c8
LFM2-VL: resolution-native tiling for non-square images
jakmro Jun 12, 2026
852ea07
Fix multi-turn chat and tool-call defects across model families (#721)
ncylich Jun 14, 2026
e8c21df
Fix onboarding quickstart bugs and guard destructive `cactus clean` (…
rshemet Jun 14, 2026
a8f634a
convert: fold gemma4 audio projection scaling into the weight reparam…
ncylich Jun 14, 2026
c413796
Update default model and transcription model IDs for testing
HenryNdubuaku Jun 15, 2026
8422b4d
Update platform options to include 'auto' as default accelerator choice
HenryNdubuaku Jun 15, 2026
73105da
Enhance command output formatting and update default audio prompt mes…
HenryNdubuaku Jun 15, 2026
c228a20
Add ANSI color support and improve terminal output formatting
HenryNdubuaku Jun 15, 2026
1daff3b
Refactor entropy handling and update confidence threshold in response…
HenryNdubuaku Jun 15, 2026
b85d62a
Update README to reflect hybrid edge-cloud architecture and add bench…
HenryNdubuaku Jun 15, 2026
09147fc
Parakeet-TDT NPU acceleration on the Apple Neural Engine (#729)
ncylich Jun 16, 2026
eb191b5
fixed lfm and qwen vl handling and run.cpp multiturn behavior (#728)
kar-m Jun 16, 2026
774e1be
Simplify CLI: one bundle-resolution ladder + CQ level in list (#715)
rshemet Jun 16, 2026
6b510c6
Add weight revision resolution and version parsing utilities
jakmro Jun 16, 2026
e4da95d
Add CQ quantization and platform options to CLI commands
jakmro Jun 16, 2026
76bae59
Enhance cloud handoff logging and response handling with detailed rea…
HenryNdubuaku Jun 16, 2026
f37a9a5
gemma4: fix 16x audio soft-token magnitude on NPU via single-source s…
ncylich Jun 16, 2026
a90aae7
readme: add Parakeet decode tps numbers (#732)
ncylich Jun 16, 2026
07d8297
Centralize build flags into cactus_flags; shrink libs (#735)
jakmro Jun 17, 2026
da5649f
Stt streaming (#730)
jakmro Jun 17, 2026
c4c9cfa
Karen/parakeet probe (#739)
kar-m Jun 18, 2026
7726789
parakeet: honor should_stop during TDT transcription (#738)
rshemet Jun 18, 2026
0d3bff3
coreml dependency
jakmro Jun 17, 2026
1285315
fix slow parakeet loading
jakmro Jun 18, 2026
0058fd9
squash convert &transpile, and align cli commands (#740)
jakmro Jun 19, 2026
0afa515
Package Gemma-4 cloud-handoff probe as a convert asset
jakmro Jun 19, 2026
c52d2b2
M3 pro numbers (#742)
ParkiratS Jun 20, 2026
0557094
Refactor Cactus Graph for batch inference
HenryNdubuaku Jun 21, 2026
3811cbc
ragged + continuous batching
HenryNdubuaku Jun 21, 2026
712d15f
detect SDL2 via pkg-config on all platforms
jakmro Jun 22, 2026
4200620
fix(graph): apply SIGMOID/TANH activations in MoE layer (#736)
yus100 Jun 22, 2026
ce9bef7
asynchronous continupus batching
HenryNdubuaku Jun 22, 2026
88c18be
gemma4: fix fp16 -inf overflow in audio encoder mask, route audio to …
ncylich Jun 22, 2026
e07e26c
Removed unnecessary null pointer checks (#724)
wasup-yash Jun 22, 2026
69e612f
MOE (#727)
ParkiratS Jun 24, 2026
ddaf5b1
Refactor model batch processing and update tests
HenryNdubuaku Jun 24, 2026
2b304a9
added cq4 optimizations to cq2 and cq3 (#744)
kar-m Jun 25, 2026
5780ee2
Enhance dynamic batching support in model component specs
HenryNdubuaku Jun 25, 2026
acf3ef2
Cactus code (#745)
jakmro Jun 26, 2026
f08497a
Fix C++ test build: expose vendored libs include (picojson) (#748)
rshemet Jul 1, 2026
263c1fc
Trie-based grammar constraints for Gemma force_tools (#747)
rshemet Jul 1, 2026
eaca207
Metal Support (#750)
jakmro Jul 7, 2026
76a91a6
Benchmarks (#752)
jakmro Jul 8, 2026
f91d066
Add benchmark command and update README with inference speed details
HenryNdubuaku Jul 8, 2026
3c4d926
Streamline tests
HenryNdubuaku Jul 8, 2026
3703568
v2.0
HenryNdubuaku Jul 9, 2026
e313fca
updates
HenryNdubuaku Jul 9, 2026
68cb6a9
Remove coreml (#754)
jakmro Jul 9, 2026
3bac821
fix brew (#755)
jakmro Jul 9, 2026
7e7eada
fix brew (#758)
jakmro Jul 9, 2026
1c2c91c
docs: fix "HuggigFace" typo in README (#746)
DaveyEke Jul 10, 2026
785cd06
Fix formatting in README.md
HenryNdubuaku Jul 10, 2026
1e121d3
Revise model performance metrics in README
HenryNdubuaku Jul 10, 2026
0969edb
M3 pro bench results (#762)
ParkiratS Jul 11, 2026
49e1256
add wider cq support (#763)
jakmro Jul 11, 2026
0fd8a93
add needle support (#765)
jakmro Jul 13, 2026
c23f95b
fix: anchor content search to object start in parse_messages_json
Jul 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 0 additions & 10 deletions .githooks/prepare-commit-msg

This file was deleted.

24 changes: 24 additions & 0 deletions .github/actions/stamp-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Stamp version
description: Resolve the release version and write python/cactus/_version.py
runs:
using: composite
steps:
- shell: bash
env:
TAG: ${{ github.event.release.tag_name }}
INPUT_VERSION: ${{ github.event.inputs.version }}
run: |
if [ -n "$TAG" ]; then
raw="${TAG#v}"
elif [ -n "$INPUT_VERSION" ]; then
raw="${INPUT_VERSION#v}"
else
raw=$(sed 's/^v//' CACTUS_VERSION)
fi
version=$(RAW="$raw" python3 -c 'import os; r=os.environ["RAW"]; print(r + ".0" if r.count(".") == 1 else r)')
if [ -z "$version" ]; then
echo "::error::No version source available (TAG, INPUT_VERSION, CACTUS_VERSION all empty)"
exit 1
fi
printf '__version__ = "%s"\n' "$version" > python/cactus/_version.py
echo "Stamped version: $version"
223 changes: 223 additions & 0 deletions .github/assemble-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
#!/usr/bin/env bash
# Assembles site_docs/ from scattered source files and rewrites internal links.
# Used by the release.yml workflow.
set -euo pipefail

DOCS_VERSION="${1:-}"

if sed --version >/dev/null 2>&1; then
sedi() { sed -i "$@"; }
else
sedi() { sed -i '' "$@"; }
fi

rm -rf site_docs
mkdir -p site_docs/docs site_docs/python site_docs/apple site_docs/android \
site_docs/flutter site_docs/rust site_docs/swift site_docs/kotlin \
site_docs/react-native site_docs/blog site_docs/assets

cp -r assets/* site_docs/assets/

echo "docs.cactuscompute.com" > site_docs/CNAME

mkdir -p site_docs/stylesheets site_docs/javascripts
cp .github/docs-overrides/stylesheets/custom.css site_docs/stylesheets/custom.css
cp .github/docs-overrides/javascripts/mathjax.js site_docs/javascripts/mathjax.js

[ -f CONTRIBUTING.md ] && cp CONTRIBUTING.md site_docs/CONTRIBUTING.md
[ -f DCO.md ] && cp DCO.md site_docs/DCO.md

cp docs/*.md site_docs/docs/

cp python/README.md site_docs/python/README.md
cp apple/README.md site_docs/apple/README.md
cp android/README.md site_docs/android/README.md
cp bindings/flutter/README.md site_docs/flutter/README.md
cp bindings/swift/README.md site_docs/swift/README.md
cp bindings/kotlin/README.md site_docs/kotlin/README.md
cp bindings/react-native/README.md site_docs/react-native/README.md
cp bindings/rust/README.md site_docs/rust/README.md

if [ -d blog ] && ls blog/*.md >/dev/null 2>&1; then
cp blog/*.md site_docs/blog/
fi

{
echo '---'
echo 'title: "Cactus"'
echo 'description: "Energy-efficient AI inference engine for phones, wearables, Macs, and ARM devices."'
echo '---'
echo ''
cat README.md
} > site_docs/index.md

sedi 's/^# Cactus$//' site_docs/index.md

sedi 's|(/docs/cactus_engine\.md)|(docs/cactus_engine.md)|g' site_docs/index.md
sedi 's|(/docs/cactus_graph\.md)|(docs/cactus_graph.md)|g' site_docs/index.md
sedi 's|(/docs/cactus_index\.md)|(docs/cactus_index.md)|g' site_docs/index.md
sedi 's|(/docs/cactus_kernels\.md)|(docs/cactus_kernels.md)|g' site_docs/index.md
sedi 's|(/docs/cactus_quants\.md)|(docs/cactus_quants.md)|g' site_docs/index.md
sedi 's|(/docs/cactus_transpiler\.md)|(docs/cactus_transpiler.md)|g' site_docs/index.md
sedi 's|(/docs/cactus_hybrid\.md)|(docs/cactus_hybrid.md)|g' site_docs/index.md
sedi 's|(/docs/finetuning\.md)|(docs/finetuning.md)|g' site_docs/index.md
sedi 's|(/docs/compatibility\.md)|(docs/compatibility.md)|g' site_docs/index.md
sedi 's|(/docs/quickstart\.md)|(docs/quickstart.md)|g' site_docs/index.md
sedi 's|(/docs/choose-bindings\.md)|(docs/choose-bindings.md)|g' site_docs/index.md
sedi 's|(/CONTRIBUTING\.md)|(CONTRIBUTING.md)|g' site_docs/index.md
sedi 's|(/bindings/swift/)|(swift/README.md)|g' site_docs/index.md
sedi 's|(/bindings/kotlin/)|(kotlin/README.md)|g' site_docs/index.md
sedi 's|(/bindings/python/)|(python/README.md)|g' site_docs/index.md
sedi 's|(/bindings/react-native/)|(react-native/README.md)|g' site_docs/index.md
sedi 's|(/bindings/flutter/)|(flutter/README.md)|g' site_docs/index.md
sedi 's|(/bindings/rust/)|(rust/README.md)|g' site_docs/index.md
sedi 's|(/python/)|(python/README.md)|g' site_docs/index.md
sedi 's|(/apple/)|(apple/README.md)|g' site_docs/index.md
sedi 's|(/android/)|(android/README.md)|g' site_docs/index.md
sedi 's|(/blog/hybrid_transcription\.md)|(blog/hybrid_transcription.md)|g' site_docs/index.md
sedi 's|(/blog/lfm2_24b_a2b\.md)|(blog/lfm2_24b_a2b.md)|g' site_docs/index.md
sedi 's|(/blog/parakeet\.md)|(blog/parakeet.md)|g' site_docs/index.md
sedi 's|(/blog/lfm2\.5_350m\.md)|(blog/lfm2.5_350m.md)|g' site_docs/index.md
sedi 's|(/blog/gemma4\.md)|(blog/gemma4.md)|g' site_docs/index.md
sedi 's|(/blog/turboquant-h\.md)|(blog/turboquant-h.md)|g' site_docs/index.md

for f in site_docs/docs/*.md; do
sedi 's|(/docs/cactus_engine\.md)|(cactus_engine.md)|g' "$f"
sedi 's|(/docs/cactus_graph\.md)|(cactus_graph.md)|g' "$f"
sedi 's|(/docs/cactus_index\.md)|(cactus_index.md)|g' "$f"
sedi 's|(/docs/cactus_kernels\.md)|(cactus_kernels.md)|g' "$f"
sedi 's|(/docs/cactus_quants\.md)|(cactus_quants.md)|g' "$f"
sedi 's|(/docs/cactus_transpiler\.md)|(cactus_transpiler.md)|g' "$f"
sedi 's|(/docs/cactus_hybrid\.md)|(cactus_hybrid.md)|g' "$f"
sedi 's|(/docs/finetuning\.md)|(finetuning.md)|g' "$f"
sedi 's|(/docs/compatibility\.md)|(compatibility.md)|g' "$f"
sedi 's|(/docs/quickstart\.md)|(quickstart.md)|g' "$f"
sedi 's|(/docs/choose-bindings\.md)|(choose-bindings.md)|g' "$f"
sedi 's|(/docs/index\.md)|(../index.md)|g' "$f"
sedi 's|(/blog/hybrid_transcription\.md)|(../blog/hybrid_transcription.md)|g' "$f"
sedi 's|(/blog/lfm2_24b_a2b\.md)|(../blog/lfm2_24b_a2b.md)|g' "$f"
sedi 's|(/blog/parakeet\.md)|(../blog/parakeet.md)|g' "$f"
sedi 's|(/blog/lfm2\.5_350m\.md)|(../blog/lfm2.5_350m.md)|g' "$f"
sedi 's|(/blog/gemma4\.md)|(../blog/gemma4.md)|g' "$f"
sedi 's|(/blog/turboquant-h\.md)|(../blog/turboquant-h.md)|g' "$f"
sedi 's|(/CONTRIBUTING\.md)|(../CONTRIBUTING.md)|g' "$f"
sedi 's|(/bindings/swift/)|(../swift/README.md)|g' "$f"
sedi 's|(/bindings/kotlin/)|(../kotlin/README.md)|g' "$f"
sedi 's|(/bindings/python/)|(../python/README.md)|g' "$f"
sedi 's|(/bindings/react-native/)|(../react-native/README.md)|g' "$f"
sedi 's|(/bindings/flutter/)|(../flutter/README.md)|g' "$f"
sedi 's|(/bindings/rust/)|(../rust/README.md)|g' "$f"
sedi 's|(/python/)|(../python/README.md)|g' "$f"
sedi 's|(/apple/)|(../apple/README.md)|g' "$f"
sedi 's|(/android/)|(../android/README.md)|g' "$f"
done

for f in site_docs/python/README.md site_docs/apple/README.md site_docs/android/README.md site_docs/flutter/README.md site_docs/swift/README.md site_docs/kotlin/README.md site_docs/react-native/README.md site_docs/rust/README.md; do
sedi 's|(/docs/cactus_engine\.md)|(../docs/cactus_engine.md)|g' "$f"
sedi 's|(/docs/cactus_graph\.md)|(../docs/cactus_graph.md)|g' "$f"
sedi 's|(/docs/cactus_index\.md)|(../docs/cactus_index.md)|g' "$f"
sedi 's|(/docs/cactus_kernels\.md)|(../docs/cactus_kernels.md)|g' "$f"
sedi 's|(/docs/cactus_quants\.md)|(../docs/cactus_quants.md)|g' "$f"
sedi 's|(/docs/cactus_transpiler\.md)|(../docs/cactus_transpiler.md)|g' "$f"
sedi 's|(/docs/cactus_hybrid\.md)|(../docs/cactus_hybrid.md)|g' "$f"
sedi 's|(/docs/finetuning\.md)|(../docs/finetuning.md)|g' "$f"
sedi 's|(/docs/compatibility\.md)|(../docs/compatibility.md)|g' "$f"
sedi 's|(/docs/quickstart\.md)|(../docs/quickstart.md)|g' "$f"
sedi 's|(/docs/choose-bindings\.md)|(../docs/choose-bindings.md)|g' "$f"
sedi 's|(/docs/index\.md)|(../index.md)|g' "$f"
sedi 's|(/blog/hybrid_transcription\.md)|(../blog/hybrid_transcription.md)|g' "$f"
sedi 's|(/blog/lfm2_24b_a2b\.md)|(../blog/lfm2_24b_a2b.md)|g' "$f"
sedi 's|(/blog/parakeet\.md)|(../blog/parakeet.md)|g' "$f"
sedi 's|(/blog/lfm2\.5_350m\.md)|(../blog/lfm2.5_350m.md)|g' "$f"
sedi 's|(/blog/gemma4\.md)|(../blog/gemma4.md)|g' "$f"
sedi 's|(/blog/turboquant-h\.md)|(../blog/turboquant-h.md)|g' "$f"
sedi 's|(/CONTRIBUTING\.md)|(../CONTRIBUTING.md)|g' "$f"
sedi 's|(/bindings/swift/)|(../swift/README.md)|g' "$f"
sedi 's|(/bindings/kotlin/)|(../kotlin/README.md)|g' "$f"
sedi 's|(/bindings/python/)|(../python/README.md)|g' "$f"
sedi 's|(/bindings/react-native/)|(../react-native/README.md)|g' "$f"
sedi 's|(/bindings/flutter/)|(../flutter/README.md)|g' "$f"
sedi 's|(/bindings/rust/)|(../rust/README.md)|g' "$f"
sedi 's|(/python/)|(../python/README.md)|g' "$f"
sedi 's|(/apple/)|(../apple/README.md)|g' "$f"
sedi 's|(/android/)|(../android/README.md)|g' "$f"
sedi 's|(\.\.\/README\.md)|(../index.md)|g' "$f"
done

if ls site_docs/blog/*.md >/dev/null 2>&1; then
for f in site_docs/blog/*.md; do
sedi 's|(/docs/cactus_engine\.md)|(../docs/cactus_engine.md)|g' "$f"
sedi 's|(/docs/cactus_graph\.md)|(../docs/cactus_graph.md)|g' "$f"
sedi 's|(/docs/cactus_index\.md)|(../docs/cactus_index.md)|g' "$f"
sedi 's|(/docs/cactus_kernels\.md)|(../docs/cactus_kernels.md)|g' "$f"
sedi 's|(/docs/cactus_quants\.md)|(../docs/cactus_quants.md)|g' "$f"
sedi 's|(/docs/cactus_transpiler\.md)|(../docs/cactus_transpiler.md)|g' "$f"
sedi 's|(/docs/cactus_hybrid\.md)|(../docs/cactus_hybrid.md)|g' "$f"
sedi 's|(/docs/finetuning\.md)|(../docs/finetuning.md)|g' "$f"
sedi 's|(/docs/compatibility\.md)|(../docs/compatibility.md)|g' "$f"
sedi 's|(/docs/quickstart\.md)|(../docs/quickstart.md)|g' "$f"
sedi 's|(/docs/choose-bindings\.md)|(../docs/choose-bindings.md)|g' "$f"
sedi 's|(/docs/index\.md)|(../index.md)|g' "$f"
sedi 's|(/CONTRIBUTING\.md)|(../CONTRIBUTING.md)|g' "$f"
sedi 's|(/bindings/swift/)|(../swift/README.md)|g' "$f"
sedi 's|(/bindings/kotlin/)|(../kotlin/README.md)|g' "$f"
sedi 's|(/bindings/python/)|(../python/README.md)|g' "$f"
sedi 's|(/bindings/react-native/)|(../react-native/README.md)|g' "$f"
sedi 's|(/bindings/flutter/)|(../flutter/README.md)|g' "$f"
sedi 's|(/bindings/rust/)|(../rust/README.md)|g' "$f"
sedi 's|(/python/)|(../python/README.md)|g' "$f"
sedi 's|(/apple/)|(../apple/README.md)|g' "$f"
sedi 's|(/android/)|(../android/README.md)|g' "$f"
sedi 's|(/blog/hybrid_transcription\.md)|(hybrid_transcription.md)|g' "$f"
sedi 's|(/blog/lfm2_24b_a2b\.md)|(lfm2_24b_a2b.md)|g' "$f"
sedi 's|(/blog/parakeet\.md)|(parakeet.md)|g' "$f"
sedi 's|(/blog/lfm2\.5_350m\.md)|(lfm2.5_350m.md)|g' "$f"
sedi 's|(/blog/gemma4\.md)|(gemma4.md)|g' "$f"
sedi 's|(/blog/turboquant-h\.md)|(turboquant-h.md)|g' "$f"
done
fi

if [ -f site_docs/CONTRIBUTING.md ]; then
sedi 's|(/docs/cactus_engine\.md)|(docs/cactus_engine.md)|g' site_docs/CONTRIBUTING.md
sedi 's|(/docs/cactus_graph\.md)|(docs/cactus_graph.md)|g' site_docs/CONTRIBUTING.md
sedi 's|(/docs/cactus_index\.md)|(docs/cactus_index.md)|g' site_docs/CONTRIBUTING.md
sedi 's|(/docs/cactus_kernels\.md)|(docs/cactus_kernels.md)|g' site_docs/CONTRIBUTING.md
sedi 's|(/docs/cactus_quants\.md)|(docs/cactus_quants.md)|g' site_docs/CONTRIBUTING.md
sedi 's|(/docs/cactus_transpiler\.md)|(docs/cactus_transpiler.md)|g' site_docs/CONTRIBUTING.md
sedi 's|(/docs/cactus_hybrid\.md)|(docs/cactus_hybrid.md)|g' site_docs/CONTRIBUTING.md
sedi 's|(/docs/index\.md)|(index.md)|g' site_docs/CONTRIBUTING.md
fi

if [ -n "$DOCS_VERSION" ]; then
{
echo "!!! note \"Version ${DOCS_VERSION}\""
echo " You're viewing docs for **${DOCS_VERSION}**. If you are cloning the repository, make sure to check out this release: \`git checkout ${DOCS_VERSION}\`"
echo ""
cat site_docs/docs/quickstart.md
} > site_docs/docs/quickstart.tmp && mv site_docs/docs/quickstart.tmp site_docs/docs/quickstart.md
fi

for nav_path in \
"python/README.md" \
"swift/README.md" \
"kotlin/README.md" \
"flutter/README.md" \
"react-native/README.md" \
"rust/README.md" \
"blog/README.md" \
"blog/hybrid_transcription.md" \
"blog/lfm2_24b_a2b.md" \
"blog/parakeet.md" \
"blog/lfm2.5_350m.md" \
"blog/gemma4.md" \
"blog/turboquant-h.md" \
"CONTRIBUTING.md" \
"docs/compatibility.md"; do
if [ ! -f "site_docs/$nav_path" ]; then
grep -vF "$nav_path" mkdocs.yml > mkdocs.yml.tmp && mv mkdocs.yml.tmp mkdocs.yml
fi
done

if ! ls site_docs/blog/*.md >/dev/null 2>&1; then
grep -v "^ - Blog:" mkdocs.yml > mkdocs.yml.tmp && mv mkdocs.yml.tmp mkdocs.yml
fi
12 changes: 12 additions & 0 deletions .github/docs-overrides/javascripts/mathjax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
window.MathJax = {
tex: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
processEscapes: true,
processEnvironments: true
},
options: {
ignoreHtmlClass: ".*|",
processHtmlClass: "arithmatex"
}
};
8 changes: 8 additions & 0 deletions .github/docs-overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% extends "base.html" %}

{% block outdated %}
You're not viewing the latest version.
<a href="{{ '../' ~ base_url }}">
<strong>Click here to go to latest.</strong>
</a>
{% endblock %}
50 changes: 50 additions & 0 deletions .github/docs-overrides/stylesheets/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
@font-face {
font-family: 'Geist';
src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-sans/Geist-Regular.woff2') format('woff2');
font-weight: 400;
font-display: swap;
}
@font-face {
font-family: 'Geist';
src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-sans/Geist-Medium.woff2') format('woff2');
font-weight: 500;
font-display: swap;
}
@font-face {
font-family: 'Geist';
src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-sans/Geist-Bold.woff2') format('woff2');
font-weight: 700;
font-display: swap;
}
@font-face {
font-family: 'Geist Mono';
src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-mono/GeistMono-Regular.woff2') format('woff2');
font-weight: 400;
font-display: swap;
}

:root {
--md-text-font: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
--md-code-font: 'Geist Mono', 'SFMono-Regular', 'Menlo', monospace;
}

[data-md-color-scheme="slate"] {
--md-default-bg-color: #000000;
--md-footer-bg-color: #000000;
--md-footer-bg-color--dark: #000000;
}

[data-md-color-scheme="slate"] .md-header,
[data-md-color-scheme="slate"] .md-tabs,
[data-md-color-scheme="slate"] .md-sidebar {
background-color: #000000;
}

.md-banner--warning {
background-color: #d4a017;
color: #000000;
}

.md-banner--warning a {
color: #000000;
}
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build

on:
pull_request:
paths:
- cactus-engine/**
- cactus-graph/**
- cactus-kernels/**
- apple/**
- android/**
- .github/workflows/build.yml
push:
branches: [main]
paths:
- cactus-engine/**
- cactus-graph/**
- cactus-kernels/**
- apple/**
- android/**
- .github/workflows/build.yml
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
apple:
runs-on: macos-15
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- run: bash cactus-engine/build.sh
- run: BUILD_STATIC=true BUILD_XCFRAMEWORK=false bash apple/build.sh
- run: bash android/build.sh

linux:
runs-on: ubuntu-24.04-arm
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update && sudo apt-get install -y cmake build-essential libcurl4-openssl-dev
- run: bash cactus-engine/build.sh
Loading