1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# Standalone, cross-vendor (Metal/Vulkan/DX12/GL) inference engine on wgpu + hand-written WGSL
# kernels, with a pure-Rust CPU fallback. LFM2/Qwen3 generation, the encoder family (BERT, XLM-R,
# ColBERT, Qwen3-embed, SigLIP, CrossEncoder), sharded fleet serving, and grammar-constrained
# decoding. Extracted from osfkb "crates/lfm2-wgpu" (history preserved); no OSFKB deps — it builds
# and benchmarks standalone. Correctness oracle = the candle LFM2 reference.
[]
= "inferencelayer"
= "0.2.3"
= "2024"
= ["Kortexya"]
# Proprietary — Kortexya owner; see LICENSE. Published to crates.io as SOURCE-AVAILABLE under
# that proprietary license (crates.io does not require an open-source license; the license
# governs use, publication only makes the source readable). Version must match the release
# tag — the CI publish job enforces it.
= "LICENSE"
= "Kortexya's engine-native inference layer — LLM generation + embedding/encoder family on wgpu (WGSL kernels, any adapter) with a pure-Rust CPU fallback"
= "https://gitlab.com/kortexya/inferencelayer"
= "README.md"
# crates.io ships ONLY the buildable surface: the 100+ MB of oracle fixtures (tests/) and every
# internal artifact (bench notes, Dockerfile, CI, .claude/) stay out of the public package.
= ["src/**", "web/moshi_webrtc_demo.html", "LICENSE", "README.md"]
[]
= "30"
= "0.4"
= { = "1.18", = ["derive"] }
= { = "2.4", = ["bytemuck"] }
= "0.4"
= "1.0"
= "1.0"
# Tokenizer — used by the CLIs/tests only, never by the engine core (so the core stays
# wasm-targetable: `tokenizers` pulls the `onig_sys` C library that has no wasm build).
= { = "0.22.2", = true }
# The gliner2 relation processor's word splitter (its `WhitespaceTokenSplitter` is a specific regex —
# it splits "hawaii." into "hawaii"+".", which the tokenization+offsets depend on). CLI/tests only.
= { = "1", = true }
# HTTP serving layer (optional adapter — the engine core stays dependency-light/standalone).
= { = "0.8", = ["macros", "ws"], = true }
= { = "1.42", = ["full"], = true }
= { = "1.0", = ["derive", "rc"], = true }
= { = "0.3", = true }
# Fleet transport (`shard`/`shard_serve`): std::net/thread, native-only.
= { = "0.26", = true }
# Mic/speaker I/O for the live full-duplex demo (`moshi-live`). Feature-gated like webrtc:
# CoreAudio/ALSA/WASAPI backends are native-only weight the default build must not carry.
= { = "0.16", = true }
# Opus audio codec (libopus C bindings) for the WebRTC media leg of `moshi-serve`. The one
# non-Rust dependency in the tree, gated behind `webrtc-media` and OFF by default — WebRTC
# audio is Opus-over-RTP by the browser spec, so it is unavoidable for that path (Kyutai's own
# moshi-server uses the same crate). The pure-Rust default build never links it.
= { = "0.3", = true }
# Native WebRTC data-channel endpoint (feature `webrtc`, native-only) — the last-rung P2P
# transport for peers behind NAT. Off by default: pulls a large async stack (tokio + ICE/DTLS/SCTP),
# so only the `webrtc` build carries it. Latest stable; 0.20 is prerelease-only at time of writing.
= { = "0.17", = true }
# Only for the WebRTC data-channel byte pipe (`dc.send(&Bytes)`); same version `webrtc` resolves.
= { = "1", = true }
# In-process TURN server for the hermetic relay-fallback proof (`spawn_local_turn_server`). Both are
# already transitive deps of `webrtc`, so naming them here is zero extra compilation; native-only.
= { = "0.17", = true }
= { = "0.17", = true }
# Surfaces webrtc-rs's internal `log` output (ICE/DTLS/TURN) for diagnostics; init in the CLI bins.
= { = "0.11", = true }
# webrtc-rs's DTLS uses rustls 0.23, which panics unless a process-level CryptoProvider is installed;
# we install `ring` explicitly at startup. Pinning the feature here also makes the lean worker binary
# resolve rustls WITH a crypto backend (the full workspace gets one transitively; the bin doesn't).
= { = "0.23", = false, = ["ring"], = true }
# CPU encoder runtime + parity oracle (feature `encoder-cpu`, native-only). `gemm` is the exact
# pure-Rust backend candle-CPU uses (already compiled in the workspace via candle 0.10), so the
# CPU embedding path competes on equal footing without any candle dependency; rayon parallelizes
# the non-gemm stages; libm supplies exact erff for erf-GELU.
= { = "0.19", = true }
= { = "1.11", = true }
= { = "0.2", = true }
# Image DECODING only (PNG/JPEG/WebP) for the vision tower — default features off, so no font,
# no filesystem codecs, and no C dependency: the resampler and every other pixel op is ours.
= { = "0.25", = false, = [
"png",
"jpeg",
"webp",
], = true }
= { = "0.19.8", = false, = ["driver", "nvrtc", "cublas", "f16", "dynamic-loading", "cuda-12020", "std"], = true }
# wasm-only: async GPU readback awaits the `map_async` completion (WebGPU has no blocking
# poll). Native never compiles this — the sync `read_stage_out` uses std::sync::mpsc.
[]
= "0.3"
[]
# The native default: the pipeline-sharding fleet layer + the CLI tokenizer. A wasm build
# (`--no-default-features`) drops both, leaving only the wgpu compute core.
= ["net", "cli", "encoder-cpu"]
# `net` gates the std::net/thread fleet transport modules (`shard`, `shard_serve`) and their
# re-exports; the compute core (forward/deltanet/turboquant/server/weights) never needs it.
= []
# `cli` = the tokenizer dependency for the command-line binaries.
= ["dep:tokenizers", "dep:regex"]
# The CPU embedding-encoder runtime (no-GPU fallback) + the parity oracle for the GPU encoder
# kernels. Native-only (a wasm build is GPU-only by construction).
= ["dep:gemm", "dep:rayon", "dep:libm", "dep:image"]
# `server` implies `encoder-cpu`: the serving binary embeds via EmbedEngine::auto, whose CPU
# fallback is what keeps GPU-less hosts serving.
= ["dep:axum", "dep:tokio", "dep:serde", "dep:futures-core", "cli", "encoder-cpu"]
# WebSocket transport for the shard fleet (join/hops/sink accept `ws://host:port` addresses;
# listeners auto-detect WS vs raw-TCP peers on one port). The browser-stage prerequisite.
= ["dep:tungstenite", "net"]
# Native WebRTC data-channel endpoint: a feature-gated optional adapter (per the feature-flags rule)
# so V100/Mac/Linux workers can speak data channels to browser or native peers. Implies `net` (the
# `shard` OP_SIGNAL arm lives there) and needs a tokio runtime to drive the async `webrtc-rs` stack.
= ["dep:webrtc", "dep:tokio", "dep:bytes", "dep:turn", "dep:webrtc-util", "dep:env_logger", "dep:rustls", "net"]
# Audio device I/O (mic + speaker) for the live demo binaries.
= ["dep:cpal"]
# WebRTC media leg for `moshi-serve` — SDP /v1/realtime/calls + Opus/RTP tracks + oai-events data
# channel. Pulls the webrtc-rs stack + libopus (the tree's only C dependency); OFF by default.
= ["server", "webrtc", "dep:opus"]
= ["dep:cudarc"]
# Dev-only: an INDEPENDENT JSON-Schema validator used as the corpus oracle for the G1 grammar
# gate (every FSM-accepted byte string must also validate here). Never linked into the engine.
[]
= "0.47"
# The GLM-OCR vision parity gate decodes the oracle's embedded PNG.
= "0.22"
# Dump naga's SPIR-V for the hot GEMV to inspect codegen (compiler-wall investigation).
= { = "30", = ["wgsl-in", "spv-out"] }
[[]]
= "lfm2-serve"
= "src/bin/serve.rs"
= ["server"]
[[]]
= "cuda-tower-gate"
= "src/bin/cuda_tower_gate.rs"
= ["cudarc", "encoder-cpu"]
[[]]
= "deepencoder-bench"
= "src/bin/deepencoder_bench.rs"
[[]]
= "lfm2-shard-worker"
= "src/bin/shard_worker.rs"
= ["net"]
[[]]
= "lfm2-shard-run"
= "src/bin/shard_run.rs"
= ["net", "cli"]
[[]]
= "lfm2-generate"
= "src/bin/generate.rs"
= ["cli"]
[[]]
= "lfm2-profile-stage"
= "src/bin/profile_stage.rs"
= ["net"]
[[]]
= "kernel-lab"
= "src/bin/kernel_lab.rs"
# Pure-CPU Qwen3.5 (NuExtract-3) decode parity check against the transformers gold. No GPU.
[[]]
= "qwen35-cpu"
= "src/bin/qwen35_cpu.rs"
# The hold-the-crown perf ledger (core-only: engine rows + pins gate; fleet rows via --record).
[[]]
= "scoreboard"
= "src/bin/scoreboard.rs"
# The quantization RULER: teacher-forced KL divergence between a reference arm and a candidate
# arm over a calibration corpus (the metric that ranks quant schemes; see src/kld.rs).
[[]]
= "kld-eval"
= "src/bin/kld_eval.rs"
= ["cli"]
# Native GGUF producer: safetensors -> quantized GGUF with in-repo encoders (no llama.cpp).
[[]]
= "gguf-quantize"
= "src/bin/gguf_quantize.rs"
= ["cli"]
# Per-model precision policy search: greedy dKLD/dMB over blk:/head candidates, judged by the
# KLD ruler (the engine's own "Dynamic 2.0" tuner; see src/bin/precision_search.rs).
[[]]
= "precision-search"
= "src/bin/precision_search.rs"
= ["cli"]
# The CROWN gate: engine vs PyTorch on the production encoder workloads (torch baselines ingested
# from tests/fixtures/bench_encoders.py; hold + crown gates).
[[]]
= "encoder-scoreboard"
= "src/bin/encoder_scoreboard.rs"
= ["encoder-cpu", "cli"]
# Pocket TTS: text + a voice (a pre-computed KV cache) -> a 24 kHz WAV, streamed per 80 ms frame.
[[]]
= "pocket-tts"
= "src/bin/pocket_tts.rs"
= ["encoder-cpu", "cli"]
# whisper speech-to-text: encoder on the GPU (Metal/Vulkan/DX/WebGPU) when available else CPU,
# OpenAI-Realtime-compatible WS server over the duplex stack (client_secrets + /v1/realtime).
[[]]
= "moshi-serve"
= "src/bin/moshi_serve.rs"
= ["server"]
# Live full-duplex conversation: mic -> Moshi -> speaker, with transcript + action hooks.
[[]]
= "moshi-live"
= "src/bin/moshi_live.rs"
= ["encoder-cpu", "cli", "audio-io"]
# Voice-message demo of the full-duplex stack: WAV in -> Moshi's spoken reply + transcript.
[[]]
= "moshi-talk"
= "src/bin/moshi_talk.rs"
= ["encoder-cpu", "cli"]
[[]]
= "moshi-converse"
= "src/bin/moshi_converse.rs"
= ["encoder-cpu", "cli"]
# KV-cached greedy decode + BPE detokenize. `whisper <model-dir> <audio.wav>` (16 kHz mono PCM16).
[[]]
= "whisper"
= "src/bin/whisper.rs"
= ["encoder-cpu", "cli"]
# Chatterbox Phase-0 manifest dumper: parse each checkpoint's safetensors header (Rust-only).
[[]]
= "chatterbox-dbg"
= "src/bin/chatterbox_dbg.rs"
= ["encoder-cpu", "cli"]
# Chatterbox provenance checker: does this WAV carry our clone watermark? (exit 0 = yes)
[[]]
= "chatterbox-wmcheck"
= "src/bin/chatterbox_wmcheck.rs"
= ["encoder-cpu", "cli"]
# Qwen3-TTS Phase-0 manifest dumper + config validator (Rust-only; see HANDOFF_qwen3tts.md).
[[]]
= "qwen3tts-dbg"
= "src/bin/qwen3tts_dbg.rs"
= ["encoder-cpu", "cli"]
# Backbone-conv A/B arm for the Docling layout port (see bench/conv_ab.py).
[[]]
= "conv-bench"
= "src/bin/conv_bench.rs"
= ["encoder-cpu"]
# Layout-model A/B arm (torch twin: tests/fixtures/bench_layout_torch.py).
[[]]
= "layout-bench"
= "src/bin/layout_bench.rs"
= ["encoder-cpu"]
# TableFormer manual A/B: page/crop PNG → OTSL tags + cell boxes (JSON).
[[]]
= "tableformer"
= "src/bin/tableformer.rs"
= ["encoder-cpu"]