CLM:Qwen3-8B开源替代Jev,延迟降低4-13倍
JEV almost dead: CLM vs JEV
Agent开发者关注Jev的API成本与延迟问题,这篇详细对比了开源替代方案CLM的性能取舍,有具体数据和可复现的GitHub链接,值得收藏参考。
Original post: https://www.reddit.com/r/LocalLLaMA/comments/1woscea/contrastive_language_models/
原帖:https://www.reddit.com/r/LocalLLaMA/comments/1woscea/contrastive_language_models/
(sorry I felt it wasn't giving CLM the highlight it deserves)
(抱歉,我觉得它没有得到应有的关注)
What it is: a new projection head for Qwen3-8B.
这是什么:Qwen3-8B 的一种新的投影头。
github: https://github.com/Contrastive-LM/CLM
hf: https://huggingface.co/Contrastive-LM
At the API and functional interface level, CLM supports everything Jev does—it is not a subset. However, there are important trade-offs in generalization, context scale, and architecture between the two.
在 API 和功能接口层面,CLM 支持 Jev 所支持的一切——它不是子集。然而,两者在泛化能力、上下文规模和架构方面存在重要的权衡。
1. Functional Parity (Same Primitives)
1. 功能对等(相同的基元)
CLM was specifically engineered as an open-weights, self-hostable alternative to TypeSafe AI's Jev. It implements the exact same "System One" decision interface and supports all three of Jev’s core question primitives:
CLM 是专门作为 TypeSafe AI 的 Jev 的开源权重、可自托管替代品而设计的。它实现了完全相同的“系统一”决策接口,并支持 Jev 的三个核心问题基元:
- Choice: Evaluates a discrete set of candidates and returns a categorical probability distribution.
- Noul: Outputs a calibrated true/false probability for a proposition or guardrail check.
- Score: Scores an input against an ordered rubric or scale.
- Choice(选择):评估一组离散候选项,并返回分类概率分布。
- Noul:输出命题或护栏检查的校准后的真/假概率。
- Score(评分):根据有序的评价标准或量表对输入进行评分。
Code written for the TypeSafe Jev client can be pointed directly at a clm-serve endpoint with drop-in compatibility (from clm import CLMClient, Choice, Noul, Score).
为 TypeSafe Jev 客户端编写的代码可以直接指向 clm-serve 端点,实现即插即用兼容性(from clm import CLMClient, Choice, Noul, Score)。
2. Where CLM Outperforms Jev
2. CLM 优于 Jev 的地方
- Latency and Disaggregated Caching: Jev is a proprietary cloud model that evaluates state and question choices jointly. CLM separates the state head from the action head. If an agent has a persistent set of tools or actions, CLM embeds those actions once and caches them. In benchmarks like interactive browser agents and gaming (T-Rex, Super Mario), CLM is 4× to 13× faster than Jev.
- Open Weights & Fine-Tunability: Jev is a closed API with no user fine-tuning (you can only prompt it via state and question instructions). Because CLM’s heads are tiny open weights (~75 MB), you can fine-tune them on your own agent trajectories.
- Coding Benchmark Verifiers: When fine-tuned on agent trajectories, CLM achieves state-of-the-art verifier performance on Terminal-Bench 2.1 (87.6%) and DeepSWE (81.6%), whereas zero-shot Jev struggled on those exact benchmarks (scoring ~71% on DeepSWE).
- 延迟与解耦缓存:Jev 是一个专有云模型,联合评估状态和问题选择。CLM 将状态头和动作头分离。如果智能体有一组持久化的工具或动作,CLM 只需对这些动作进行一次嵌入并缓存它们。在交互式浏览器智能体和游戏(T-Rex、超级马里奥)等基准测试中,CLM 比 Jev 快 4 到 13 倍。
- 开放权重与可微调性:Jev 是一个封闭的 API,不支持用户微调(你只能通过状态和问题指令来提示它)。由于 CLM 的头非常小且权重开放(约 75 MB),你可以使用自己的智能体轨迹对其进行微调。
- 编码基准验证器:当在智能体轨迹上进行微调时,CLM 在 Terminal-Bench 2.1(87.6%)和 DeepSWE(81.6%)上达到了最先进的验证器性能,而零样本 Jev 在这些基准测试中表现挣扎(DeepSWE 得分约为 71%)。
3. Where Jev Still Has the Edge (CLM-8B Limitations)
3. Jev 仍占优势的地方(CLM-8B 的局限性)
While CLM covers the entire feature surface of Jev, the current CLM-v0.1-8B release trails Jev in a few areas:
虽然 CLM 涵盖了 Jev 的全部功能面,但当前的 CLM-v0.1-8B 发布版在某些方面落后于 Jev:
- Zero-Shot Broad Knowledge: Jev is backed by a larger, proprietary model On zero-shot open-domain tasks, Jev still holds an edge in edge-case accuracy (e.g., Berkeley Function Calling Leaderboard v4: Jev scored 99.2% vs. CLM-8B’s 95.2%; WikiRacing: Jev 30/30 vs. CLM-8B 26/30).
- Context Budget: Jev accepts requests up to a 64K token context out-of-the-box. CLM-8B was tested and calibrated at 2K to 8K context. While its Qwen3 backbone can accept longer prompts, representations past 8K haven't been calibrated for the reference head.
- Probability Normalization: CLM calculates probabilities via dot products and softmax over the candidates passed in that request Its probabilities are inherently relative to the candidate set provided, whereas Jev’s scoring is calibrated internally against absolute criteria.
- 零样本广泛知识:Jev 由一个更大的专有模型提供支持。在零样本开放域任务中,Jev 在边缘情况准确性方面仍保持优势(例如,Berkeley Function Calling Leaderboard v4:Jev 得分为 99.2%,而 CLM-8B 为 95.2%;WikiRacing:Jev 30/30,而 CLM-8B 为 26/30)。
- 上下文预算:Jev 开箱即用支持高达 64K token 的上下文请求。CLM-8B 是在 2K 到 8K 上下文中进行测试和校准的。虽然其 Qwen3 骨干网络可以接受更长的提示,但超过 8K 的部分尚未针对参考头进行校准。
- 概率归一化:CLM 通过点积和在请求中传入的候选项上进行 softmax 计算概率。其概率本质上相对于所提供的候选集,而 Jev 的评分则是根据绝对标准进行内部校准的。
Summary
总结
If you are asking if you will lose API features by using CLM instead of Jev: No, you get the full primitive set (Choice, Noul, Score) with massive latency gains and zero API costs. You only sacrifice some zero-shot generalization on niche out-of-domain tasks compared to TypeSafe's hosted service.
如果你想知道改用 CLM 而不是 Jev 是否会失去 API 功能:不会,你获得了完整的原始功能集(Choice、Noul、Score),并实现了巨大的延迟提升且零 API 成本。与 TypeSafe 的托管服务相比,你仅在利基领域的零样本泛化能力上做出了一些牺牲。
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力