CoolFace
Modelpublic

catalystsec/Kimi-K3-Audit-240E-MLX-MXFP4

sourceHugging Faceotherupdated 2mo agoView on Hugging Face
0likes1kdownloads
Model Card

Kimi-K3-Audit-240E-MLX-MXFP4

Kimi-K3-Audit-240E is Kimi K3 specialised for security auditing. It keeps 240 of the 896 routed experts in each layer, which brings the model onto a single 512 GB Apple silicon machine. Expert selection was calibrated on kernel source and audit traces, targeting domain focus rather than compression.

For a pair of 512 GB machines, the larger Kimi-K3-Audit-451E build measures at parity with the full release.

Basemoonshotai/Kimi-K3, MXFP4 release
Routed experts240 of 896 per layer
Retained expert weightsbit-identical to the release
Size408 GiB, 91 shards
Modalitytext, vision tower is retained but unevaluated
Loadermlx-lm with Kimi K3 support (PR #1626)

Intended use

Security auditing and analysis of source code, with tool use. General conversation, translation and non-technical writing are out of scope, and a general-purpose model should be used for them.

corpusperplexity ratioaccuracy 896Eaccuracy 240Echange, pts
XNU kernel C1.07×80.8%79.1%−1.7
Linux kernel C1.05×92.3%90.8%−1.5
English prose19.0×92.0%38.5%−53.5

Across eight code corpora in five languages, pruning changes perplexity least on C and C++, ranging from 1.05× on Linux to 1.38× on Python.

[image]

Evaluation

Measured against the original MXFP4 release (896E) on identical tokens. KLD is KL(896E ‖ 240E) over the full output distribution.

Audit traces

Each of 24 kernel-audit sessions contributes one 1025-token window, rendered through the model's own chat template so the structure matches deployment.

spanppl 896Eppl 240Emean KLDmedian KLDtop-1 agreement
tool call1.6161.6350.0680.0000195.5%
think5.8746.7960.2050.11978.1%
response3.7283.5540.2290.01887.4%
other5.0445.8800.4670.25470.3%
all4.2324.4190.2360.05783.0%

Tool-call spans diverge least of any span measured. 78% of tool-call tokens fall below 0.01 divergence, against 16% of thinking tokens.

[image]

Code and prose corpora

corpuslanguageppl 896Eppl 240Emean KLDtop-1 agreement
Linux kernelC1.3741.4480.07695.2%
XNUC2.2132.3610.08991.6%
Swift stdlibSwift1.5461.7020.11892.7%
llama.cppC++1.6641.8440.14292.0%
JavaScriptCoreC++1.5601.8200.19490.6%
V8C++1.6601.9790.19590.0%
Linux rust/Rust1.5962.0280.26687.6%
SGLangPython1.7192.3670.35485.5%
wikitextEnglish1.40226.6322.93440.2%

Build comparison

buildsizeperplexity ratio512 GB machines
MXFP4 release, 896E1.56 TB1.00×4
2bit-UVMAX, 896E761 GiB1.20×2
451E725 GiB0.99×2
240E, this model408 GiB1.04×1

Usage

This model requires Kimi K3 support from mlx-lm PR #1626, which has not yet been merged. Until it lands in an mlx-lm release, install from the PR branch.

bash
pip install git+https://github.com/ml-explore/mlx-lm.git@refs/pull/1626/head
pip install tiktoken
python
from mlx_lm import load, generate

model, tokenizer = load(
    "catalystsec/Kimi-K3-Audit-240E-MLX-MXFP4",
    tokenizer_config={"trust_remote_code": True},
    trust_remote_code=True,
)

prompt = "Audit do_wp_page() in mm/memory.c for memory-safety issues."
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
response = generate(model, tokenizer, prompt=prompt, verbose=True)

Prefill step size

Prefill memory scales with chunk × context and is separate from the weights, so long contexts need a smaller step size than the default. Maximum context on a 512 GB M3 Ultra at batch size 1:

`--prefill-step-size`max context
2048, the default~198k
512~528k
256~731k
bash
mlx_lm.server --model catalystsec/Kimi-K3-Audit-240E-MLX-MXFP4 \
              --prefill-step-size 512

Throughput

Batch size 1 on 512 GB machines at the default step size. The two-machine figures use tensor parallelism over Thunderbolt RDMA, with peak memory per node.

1× M3 Ultra
prompt tokensprefill tok/sgeneration tok/speak memory
51280.07.3411 GiB
8k91.17.2422 GiB
16k88.07.0426 GiB
32k81.86.9433 GiB
64k71.66.4447 GiB
2× M3 Ultra
prompt tokensprefill tok/sgeneration tok/speak memory
512138.711.0211 GiB
8k161.210.8215 GiB
16k156.710.7217 GiB
32k146.910.3221 GiB
64k129.59.6228 GiB

Generation is bandwidth-bound and changes little with context, since the latent KV cache is small next to the weights read per token. A second machine gives 1.5× generation and 1.8× prefill.

Sampling follows the base model, temperature 1.0 and top-p 0.95.

Limitations

Evaluation is teacher-forced throughout and measures next-token prediction on reference text. Generation-time behaviour, including loop rate and stop-token reliability, was not evaluated.

Standard downstream benchmarks were not evaluated. Pruning preserves next-token performance less well on Rust and Python than on C, C++ and Swift.

License

Inherits the Kimi K3 license from the base model.