SuperAPI AI Directory

Kev - An open-source family of Jev-style decision models, self-trainable and self-deployable

Author: AI小集 · Original source: AI工具集

What is Kev

Kev is an open-source family of decision models from Jared Palmer, VP of Engineering at Cognition, based onQwen3.5/Qwen3.8, offering multiple model sizes from 0.8B to 27B. Kev does not generate text; it takes state text plus structured questions as input and directly outputs calibrated probabilities in a single forward pass. It supports three types of decisions: yes/no, option routing, and graded scoring. Its API is compatible with TypeSafe System One.

Kev

Kev's main features

  • Structured decisions: Input a piece of state text plus several structured questions, and a single request directly outputs the calibrated probability of each option, never generating explanatory text.
  • Three decision primitives: Supports noul、choice、score。
  • Batch question isolation: Multiple questions share the same input state and are isolated from one another via attention masks. A single forward pass answers all questions simultaneously without cross-contamination.
  • Local deployment: Provides kev.serve to start the service with a single command, exposing the POST /v1/systemone endpoint, compatible with CUDA, ROCm, and Apple Silicon (MLX).
  • Low-cost fine-tuning: Supports continued training from official checkpoints using your own labeled data, with the accompanying kev-finetune skill allowing a coding agent to automatically complete the entire workflow of data preparation, training, evaluation, and deployment.
  • Built-in evaluation system: Includes a frozen evaluation set, reports accuracy, Brier score, calibration error, and the proportion of decisions that can be automated, and CI automatically verifies the published numbers.

Kev's technical principles

  • Pointer head turns generation into discrimination: Kev freezes the Qwen base weights and attaches a rank-16 LoRA adapter and a pointer head. Each candidate's </opt> hidden state is scored against the question's <decide> hidden state, and a softmax yields probabilities. Essentially, it transforms the large model's "writing task" into a "multiple-choice task," skipping token-by-token generation.
  • Block causal attention enables question isolation: The input sequence is organized as "state + multiple question blocks." The attention mask ensures each token can only read the state and the interior of its own question, and positional IDs restart at each question. Thus, a single forward pass can answer multiple unrelated questions simultaneously, sharing state computation without leaking information between them. On models with hybrid Gated DeltaNet such as Qwen3.5/3.8, it instead places each question on its own row and reuses the state KV cache, providing stricter isolation.
  • Training and calibration: Cross-entropy is used to train the adapter and pointer head on the correct labels, with the base frozen throughout; each checkpoint fits a temperature parameter on held-out data, and inference directly outputs calibrated probabilities. Temperature does not change the ranking, only calibrates the confidence values.
Dig into GitHub

Follow WeChat and reply "open source" to join theAI open-source project community group

How to use Kev

  • Environment preparation: Install Python 3.12/3.13 and uv, clone the repository, then run uv sync --extra serve to install dependencies.
  • Start the service locally: Run KEV_DTYPE=bf16 uv run --extra serve python -m kev.serve --run jaredpalmer/kev-4b --port 8009 to start the model; weights are automatically downloaded on first run.
  • Send decision requests: Submit state text and questions to POST /v1/systemone and receive calibrated probabilities for each option.
  • Python SDK calls: Use the official TypeSafe SDK to point base_url to the local service, and existing Jev applications switch with zero changes.
  • Browser Playground: Visit the Hugging Face Space or run the playground locally to try it without installation.
  • Fine-tune on Your Own Data: Prepare annotated data in JSONL format and use uv run python -m kev.train --init_from jaredpalmer/kev-4b ... to continue training from the official checkpoint.
  • Fully Automated Agent Fine-tuning: After running npx skills add jaredpalmer/kev@kev-finetune , let the coding agent complete the entire workflow of finding problems, generating data, training, evaluating, and deploying, with no local GPU required.
  • Cloud Deployment: Run pip install modal && modal deploy kev_serve.py to deploy an HTTPS endpoint with one click, automatically scaling to zero when idle with no charges.
  • Evaluation and Validation: Use uv run python -m kev.benchmark --run <模型> --suite evals/v4/transfer-v4 to validate performance on the frozen evaluation set; evaluate before going live.

Kev's Core Advantages

  • Extremely Low Cost: A single forward pass directly outputs probabilities, eliminating token-by-token generation. Answering 6 questions on an H100 takes only 18ms, with zero invocation fees when self-hosted.
  • Cheap and Reproducible Training: The official three-tier porting training costs only about $95, and a single personal fine-tune costs about $1, with the full bill publicly transparent.
  • Open Source and Controllable: Under the Apache-2.0 license, the weights, training code, and frozen evaluation set are all public, allowing self-training, auditing, and no vendor lock-in.
  • Plug-and-Play API: Fully compatible with TypeSafe System One; existing Jev applications can switch with zero changes by changing the base_url.
  • Multiple Questions at Once: Shared input state and block causal attention isolation allow answering any number of questions in a single forward pass without contaminating each other.

Kev's Project Address

  • GitHub Repository:https://github.com/jaredpalmer/kev

Kev's Comparison with Similar Competing Products

Comparison Dimension Kev (Open Source) Jev
Nature Open-source model family, Apache-2.0 Closed-source commercial API
Architecture Qwen3.5/3.8 base + LoRA + pointer head Undisclosed (Kev reproduced it by referencing its architectural approach)
Model Tiers 0.8B / 4B / 9B / 27B available Single hosted model
New Source Accuracy 27B 0.848,4B 0.838,9B 0.852 0.857 (development set)
Calibration Quality Confidence error rate 4.0%, automation 0.45~0.57 at a 5% error budget Confidence error rate 3.7%, automation 0.70
Speed 18ms for 6 questions on an H100, self-hosted batch inference possible Limited by API network latency
Cost Weights are free, self-hosting has zero invocation fees; fine-tuning costs about $1 per run Pay per call
Data Privacy Fully local/own server, data does not leave the premises Data passes through a third-party API

Kev's Application Scenarios

  • Customer Service Ticket Routing: In a single forward pass, simultaneously determine "which department to transfer to, whether to escalate to a human, and the customer's anger level," automatically routing by probability thresholds and transferring to a human when confidence is low.
  • Content Safety Moderation: Execute "whether noul violates rules + choice violation type + score severity" in parallel on UGC text, with high-confidence automatic handling.
  • Financial/credit preliminary review: Determine complaint type, whether manual intervention is needed, and risk level; the probability distribution assists compliance record-keeping and prioritization of manual review.
  • E-commerce product/intent classification: Route user queries to downstream systems such as search, recommendation, or after-sales, handling the multi-label distribution problem of "one term hitting multiple categories."