Contrastive Language Models (CLM): A System One Model for Fast and Generalizable Decision-Making
Summary
CLM (Contrastive Language Model) is a System One decision model: separate state and action encoders trained with bidirectional InfoNCE so each state is pulled toward the ground-truth action and pushed from others; at deploy time candidates are scored by cosine similarity of L2-normalized embeddings and softmaxed into typed answers (Noul/Choice/Score) or ranked for best-of-N. Released CLM-8B uses a frozen Qwen3-8B backbone (hidden 4096, last-token pooling, L2 norm) plus a trainable MLP projection head 4096→1536→1536→512 (GELU+LayerNorm; ~20M params, output dim 512); only the head is trained; LLM embeddings can be precomputed. Full Nemotron DQA pretrain ~1 hour on one RTX 4090. Dual-encoder disaggregation caches state and action embeddings independently (authors contrast with Jev state-only caching). Action-caching example (Super Mario): 4 action embeddings precomputed; per-step cost drops from 5 forwards to 1 (~4×). Zero-shot blog table (CLM vs Jev latency / success): T-Rex 16.5 vs 149.8 ms (5/5 both); BFCL V4 tool calling 76.8 vs 125.5 ms (95.2% vs 99.2%); WikiRacing 79.8 vs 225 ms (26/30 vs 30/30); Super Mario 33.5 vs 132.6 ms (5/5 both) — up to ~9× faster, roughly on-par accuracy. Latency microbench (200-token state, RTX 4090, 15 tok/candidate): at 1024 candidates CLM ~44 ms vs Jev ~579 ms (~13×) vs constrained decoding Qwen3-8B ~4.3 s (~97×); candidate-length sweep (5 cands) CLM stays ~36 ms through 2048 tok while CD goes to 3.4 s and Jev to 333 ms (~9× / ~95×). Agentic verifier (38 DeepSWE / 30 Terminal-Bench 2.1 held-out; Opus 5 / Fable 5 candidates; H100): DeepSWE CLM 81.6% vs Jev 71.1% vs Pass@1 73.7% (79 vs 449 ms, 5.7×); Terminal-Bench 2.1 CLM 87.6% vs Jev 83.1% vs Pass@1 84.0% (32 vs 131 ms, 4.1×) — Jev below Pass@1 on both. Data recipe: pretrain ~60M Nemotron DQA → midtrain ~30M Gemini 2.5 Flash-Lite hard negatives → posttrain ~1M ADP + Endless-Terminals + LiteCoder-Terminal-SFT (40% Nemotron replay / 60% agentic). Hard-neg study (~100K held-out, 1 gold+10 HN): pretrain 52.1% → two-stage 69.2% vs HN-from-scratch peak 62.4%. Replay keeps HN top-1 ~68.5% vs 56.2% agentic-only. Scaling fits (test InfoNCE): L≈(C/7.34e13)^-0.144; (D/2.12e9)^-0.117; (N/3.60e5)^-0.061; (N_enc/4.18e9)^-0.172; optimal head N*∝D^1.02 (~310 tokens/param). Posted 2026-09-23 Notion blog; Jacky Kwok† project lead; Stanford + NVIDIA Research. Roadmap: multimodal CLM-35B early next month; vision; more data/scaling. Contact jackykwok@stanford.edu.
- Venue
- Contrastive-LM / Stanford University / NVIDIA Research / Notion blog
- Publisher
- Contrastive-LM / Stanford University / NVIDIA Research / Notion blog
- Source
- x
- Access
- X announce https://x.com/jackyk02/status/2102905335925424285 ; Blog https://contrastive-lm.notion.site ; Code https://github.com/Contrastive-LM/CLM ; Playground https://github.com/Contrastive-LM/CLM#playground ; HF org https://huggingface.co/Contrastive-LM ; Discord https://discord.gg/5dAQEDJBs ; Contact jackykwok@stanford.edu ; DeepSWE https://deepswe.datacurve.ai/ ; Terminal Bench 2.1 https://www.tbench.ai/?version=2.1 ; Authors: https://jackyk02.github.io/ ; https://hgkang02.github.io/ ; https://tarsur909.github.io/ ; https://jonsaadfalcon.com/ ; https://research.nvidia.com/person/marco-pavone ; https://cs.stanford.edu/~chrismre/ ; https://azaliamirhoseini.com/ ; Head https://huggingface.co/Contrastive-LM/CLM-v0.1-8B ; DeepSWE head https://huggingface.co/Contrastive-LM/deepswe-clm-heads-8k ; Pretrain https://huggingface.co/datasets/Contrastive-LM/CLM-v0.1-Pretrain-Nemotron ; Midtrain https://huggingface.co/datasets/Contrastive-LM/CLM-v0.1-Midtrain-Synthetic-Negatives ; DeepSWE train emb https://huggingface.co/datasets/Contrastive-LM/deepswe-clm-train-embeddings-8k ; Encoder https://huggingface.co/Qwen/Qwen3-8B
- License
- Code/serving Apache-oriented release on GitHub; reference head Contrastive-LM/CLM-v0.1-8B Apache-2.0; DeepSWE head/embeddings MIT; check each Hub card
- License family
- Permissive
- Language
- en
- Hugging Face
- Contrastive-LM/CLM-v0.1-8B
- Purpose
- Open dual-encoder contrastive System One model (CLM-8B) that scores fixed action sets against evolving states faster than Jev, with TypeSafe-compatible API and published scaling laws
- Scale
- CLM-8B (Qwen3-8B encoder + ~20M head, head ckpt ~75 MB / ~75.6 MB Hub storage); pretrain 60M pairs; midtrain 30M hard negs; posttrain 1M trajectories; CLM-35B multimodal upcoming
- Domain
- System One decision models; contrastive state-action learning; verification / best-of-N; TypeSafe-compatible serving; latency vs Jev
- Used for
- System One / typed decisions; tool routing; computer-use and game action selection; best-of-N verification for coding agents; TypeSafe API drop-in experiments; contrastive scaling research
- Time period
- Notion blog posted 2026-09-23; X announce 2026-09-23T23:37:56Z; HF CLM-v0.1-8B created 2026-09-21; DeepSWE head 2026-09-22; Nemotron/midtrain datasets ~2026-09-24
- Author type
- academia (Stanford Hazy Research / Scaling Intelligence Lab; Marco Pavone also NVIDIA)
- Added
- Sep 24, 2026
- Verified
- Sep 24, 2026
- Research status
- done
Tags
Topics
System One decision models; contrastive state-action learning; verification / best-of-N; TypeSafe-compatible serving; latency vs Jev
Research notes
- Primary sources 2026-09-23: full X thread from jackyk02 (conversation_id 2102905335925424285) + GitHub README Contrastive-LM/CLM main + HF API/cards. Thread posts: announce https://x.com/jackyk02/status/2102905335925424285; (1) architecture https://x.com/jackyk02/status/2102906369162822006; (2) data https://x.com/jackyk02/status/2102906578966122595; (3) scaling https://x.com/jackyk02/status/2102906743558902101; (4) latency vs Jev/constrained decoding https://x.com/jackyk02/status/2102908627304751476; (5) zero-shot https://x.com/jackyk02/status/2102909017257558395; (6) agentic benches https://x.com/jackyk02/status/2102909765068484694; (7) Dino demo https://x.com/jackyk02/status/2102910077363683504; (8) Super Mario https://x.com/jackyk02/status/2102910172389933179; (9) WikiRacing https://x.com/jackyk02/status/2102910301087936846; playground https://x.com/jackyk02/status/2102910833550659937; CLM-35B roadmap https://x.com/jackyk02/status/2102911073653494209; authors https://x.com/jackyk02/status/2102911343640940966. X handles: @jackyk02 Jacky Kwok; @hangoo_kang Hangoo Kang; @TarunSures41845 Tarun Suresh; @JonSaadFalcon Jon Saad-Falcon; @drmapavone Marco Pavone; @Azaliamirh Azalia Mirhoseini; @HazyResearch. BibTeX title matches README citation (Notion Blog url contrastive-lm.notion.site). Cross-link catalog: System One/Jev 1363; Archer Hume Jev arch 1416; Jevlike 1394; RLCD 1396–1397. Benchmarks named: BFCL v4 tool calling, WikiRacing, Super Mario, T-Rex (examples/t_rex), DeepSWE, Terminal-Bench 2.1. Candidate generators in agentic eval: Opus 5 (DeepSWE), Fable 5 (Terminal-Bench). DeepSWE heldout details (head card): 75/38 train/eval task-disjoint split seed 42; heldout 31/38=81.579%, pass@1 28/38=73.684%, oracle 34/38=89.474%; init from CLM-v0.1-8B. README eval script also references Contrastive-LM/deepswe-clm-embeddings-8k (no train) — not present on Hub at catalog time (only deepswe-clm-train-embeddings-8k found). jackyk02/contrastive_learning release-branch README 404 at catalog time; research branch mentioned in CLM README for scaling/data/paper figures. Local research dump: /workspace/curator/research/clm-20260923/ (README.md + thread figure JPGs). Notion blog WebFetch empty; browser scrape may enrich later — technical content already in README How it works / Data Recipe / Scaling Laws. Treat Jev comparisons as author-reported, not independently re-run. Midtrain HF dataset page empty at catalog time (103 kB, uploading). Pretrain Nemotron Hub: ~62.45M rows, ~1.02 TB (npy q/a shards + parquet meta). Notion blog scrape 2026-09-23 enriched numeric tables (zero-shot latency/success, agentic DeepSWE/TB with Jev+Pass@1, latency vs constrained decoding, scaling-law fit constants, head MLP 4096→1536→1536→512, author homepages, jackykwok@stanford.edu, deepswe.datacurve.ai, tbench.ai/?version=2.1). Score is cosine similarity after L2 norm (equiv. to normalized dot product). Pretrain qualitative Romeo/Juliet example retained on blog only.
Similar entries
- Model deepswe-clm-heads-8k (DeepSWE CLM fixed-split verifier head)
- Idea System One Models and Jev (TypeSafe AI)
- Paper Just Ask Jev: Reinforcement Learning for Calibrated Decisions as a Zero-Shot Detector of AI Alignment Failures
- Paper Jev vs. LLMs as Rubric Judges: Cheaper, Faster, and Wrong in the Same Places
- Dataset CLM-v0.1-Midtrain-Synthetic-Negatives (Gemini hard negatives)
- Dataset deepswe-clm-train-embeddings-8k (DeepSWE CLM/PRM training embeddings)