kev-4b-ONNX
kev-4b (revision 139fdd94f1b6a6ad80cc15e08fcb99cac885a101) by Jared Palmer, packaged for the browser by
runonweb (runonweb/classify).
Kev is a Jev-style decision model: typed questions about one text (noul yes/no, choice, score)
answered with calibrated probabilities, no text generation. Requests follow TypeSafe's System One API.
What changed from the original
- The rank-16 LoRA is merged into
Qwen/Qwen3.5-4B-Base(revision1001bb4d826a52d1f399e183466143f4da7b741b) in fp32. - The backbone is exported with the onnxruntime-genai builder without the LM head and MTP layer: the graph
returns
hidden_statesplus the recurrent/conv/KV cache, so the state is encoded once and each question runs as its own row on that cache (Kev's row form). - Weights are int4 (RTN, block 32), embeddings included; activations fp32. ~2.7 GB, split in two files under 2 GB. Needs the
LinearAttention/CausalConvWithStatecontrib ops: ONNX Runtime Web's native WebGPU build (onnxruntime-web/webgpu) on the GPU,onnxruntime-web/wasmon the CPU. - The pointer head is
head.bin(fp32:q.weight,q.bias,k.weight,k.bias);kev.jsonholds the calibration temperature, delimiter token ids and cache layout.
On 192 questions from Kev's development suites, probabilities differ from the fp32 export by 0.040 on average; 10 answers change, 3 with a margin above 0.2 (accuracy 0.776 vs 0.766). The fp32 export of the same graph matches Kev's PyTorch fp32 path within 4e-5.
Recipe: training/kev-onnx in the runonweb repo.
Use
import { Classifier } from 'runonweb/classify'
const classifier = new Classifier({ model: 'midudev/kev-4b-ONNX' })
const { answers } = await classifier.classify({
state: 'I was charged twice. Please fix this ASAP.',
questions: { billing: { type: 'noul', instructions: 'Is this ticket about billing?' } },
})
License
Apache-2.0, like Kev and the Qwen3.5 base. Kev's training datasets have their own licenses; see the original model card.