This model is a fine-tuned version of JetLM/SDAR-8B-Chat-b8 on the sdarwebshopbs4eighthreason dataset. The following hyperparameters were used during training: - learningrate: 1e-05 - trainbatchsize: 1 - evalbatchsize: 8 - distributedtype: multi-GPU - numdevices: 4 - totaltrainbatchsize: 4 - totalevalbatchsize: 32 - lrschedulertype: constantwithwarmup - lrschedulerwarmupratio: 0.03 - numepochs: 1.0 - Transformers 4.52.4 - Pytorch 2.9.1+cu129 - Datasets 3.6.0 - Tokenizers 0.21.1
CLM-v0.1-8B-MLX is an open-weight model for feature extraction from Zhu Lin, released under Apache License 2.0. It has 8.2B parameters and a 40,960-token context. At 16-bit it needs about 19.7 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index.
The encoder half of Contrastive-LM/CLM-v0.1-8B, quantised for MLX on Apple Silicon. One repository per bit width, matching mlx-community. Each has the weights at the repo root, so the Hub file browser lists every file with its size and mlxlm.load(" ") works.
Runs On
What it takes to serve CLM-v0.1-8B-MLX (8.2B parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.
| Precision | Weights | Memory needed | Cheapest setup | Per hour | Also fits |
|---|---|---|---|---|---|
| 16-bit | 16.4 GB | 19.7 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 8-bit | 8.2 GB | 9.8 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 4-bit | 4.1 GB | 4.9 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Oct 7, 2026.
CLM-v0.1-8B-MLX on every accelerator the SAVRN Index prices, at every precision
Model Card
By Zhu Lin, published under apache-2.0, revision dba2c0e37c2a.
The encoder half of Contrastive-LM/CLM-v0.1-8B, quantised for MLX on Apple Silicon. One repository per bit width, matching mlx-community. Each has the weights at the repo root, so the Hub file browser lists every file with its size and mlxlm.load(" ") works. Agreement against a bf16 MLX reference of the same encoder in the same runtime, over 23,926 scored System One questions, through the real head stack (argmax(scale · cos), scale = 100.0 — cosine error is amplified 100×). Pass line. top-1 >= 1.0000 — the measured bf16-vs-bf16 noise floor of this corpus in this runtime — and top-1 (decisive) >= 0.995, where decisive means the reference's own top-1 led by more than 1 nat. A third condition…
Read Zhu Lin's full model card
CLM-v0.1-8B — MLX encoder
The encoder half of Contrastive-LM/CLM-v0.1-8B,
quantised for MLX on Apple Silicon.
Repositories
One repository per bit width, matching mlx-community. Each has the weights at the repo root,
so the Hub file browser lists every file with its size and mlx_lm.load("<repo>") works.
| repo | width | verdict |
|---|---|---|
czl/CLM-v0.1-8B-MLX-8bit |
8-bit | recommended |
czl/CLM-v0.1-8B-MLX-6bit |
6-bit | recommended |
czl/CLM-v0.1-8B-MLX-4bit |
4-bit | not recommended |
czl/CLM-v0.1-8B-MLX (this repo) |
bf16 | the reference |
Evaluation
Agreement against a bf16 MLX reference of the same encoder in the same runtime, over
23,926 scored System One questions, through the real head stack
(argmax(scale · cos), scale = 100.0 — cosine error is amplified 100×).
| variant | cos min | cos mean | top-1 | top-1 (decisive) | planner acc. Δ | verdict |
|---|---|---|---|---|---|---|
bf16 |
– | – | 1.0000 (ref) | 1.0000 (ref) | – | reference |
8bit |
0.98294 | 0.99985 | 0.9888 | 1.0000 | -0.46 pts | yes |
6bit |
0.89642 | 0.99918 | 0.9828 | 1.0000 | +0.70 pts | yes |
4bit |
0.87825 | 0.99191 | 0.6186 | 0.8897 | -31.95 pts | no |
Pass line. top-1 >= 1.0000 — the measured bf16-vs-bf16 noise floor of this corpus in this runtime — and top-1 (decisive) >= 0.995, where decisive means the reference's own top-1 led by more than 1 nat. A third condition applies: planner accuracy Δ, the change in accuracy against the T-Rex physics planner's label. A variant that holds every decisive decision but still loses measurable accuracy is marked usable rather than recommended.
Against the numbers published in the parent model card
| case | model card (vLLM bf16) | this runtime (bf16 reference) |
|---|---|---|
anchor-invoice/department |
billing |
billing — argmax matches, billing=0.98818, technical=0.01182 |
anchor-tides/rank |
0 |
0 — argmax matches, 0=0.99386, 1=0.00003, 2=0.00611 |
How to use
Each per-width repo is a standard mlx-community layout. Load one directly:
mlx_lm.load("czl/CLM-v0.1-8B-MLX-8bit")
Or serve it for CLM:
python -m clm_mlx.server --model <dir> --port 8092
clm-serve --emb-url http://127.0.0.1:8092/v1/embeddings
Quantization details
Tool: mlx-lm 0.31.3, one mlx_lm.convert pass per width:
mlx_lm.convert --hf-path Qwen/Qwen3-8B --mlx-path <dir> -q --q-bits N --q-group-size 32
- affine mode, per-group bf16 scale and bias.
group_size = 32— measured best at every width. mlx-lm's default (64) and Qwen'smlx-communityrepos (128) are both worse here. See the per-width cards for the full group-size ladder.
Limitations
- The projection heads are encoder-locked to Qwen3-8B last-token-pooled 4096-d embeddings.
- This is a ranker, not a generator.
lm_headis never evaluated under pooling. - The head stack amplifies cosine error 100×. Read the confident-decision column.
- Probabilities are relative to the candidate set.
License
Apache-2.0, inherited from Qwen/Qwen3-8B and Contrastive-LM/CLM-v0.1-8B. Not gated.
Citation
@misc{kwok2026contrastivelanguagemodels,
title={Contrastive Language Models: A System One Model for Fast and Generalizable Decision-Making},
author={Jacky Kwok and Hangoo Kang and Tarun Suresh and Jon Saad-Falcon and Marco Pavone and Christopher Ré and Azalia Mirhoseini},
year={2026},
note={Notion Blog},
url={https://contrastive-lm.notion.site}
}
Configuration
- Architecture
- Qwen3ForCausalLM
- Context length (tokens)
- 40,960
- Layers
- 36
- Hidden size
- 4,096
- Feed-forward size
- 12,288
- Attention heads
- 32
- Key/value heads
- 8
- Head dimension
- 128
- Vocabulary size
- 151,936
- RoPE base
- 1,000,000
- Stored precision
- bfloat16
- Model type
- qwen3
Identity and Version
- Repository
- czl/CLM-v0.1-8B-MLX
- Publisher
- Zhu Lin
- Task
- Feature extraction
- Modality
- Text
- Library
- mlx
- Parameters
- 8.2B parameters
- Languages
- en
- Revision
- dba2c0e37c2a431bb6c92bc0dc64dfaa25281bbd
- First published
- 2026-09-26
- Last updated
- 2026-09-27
Files and Weights
21 files, 16.5 GB in total. The weights are 5 files totalling 16.5 GB in safetensors.
Every file
| File | Type | Size | SHA-256 |
|---|---|---|---|
| heads/CLM_v0.1-8B.safetensors | Weights | 75.6 MB | 6abdda23dab7 |
| model-00001-of-00004.safetensors | Weights | 5.3 GB | 23fe2ba47612 |
| model-00002-of-00004.safetensors | Weights | 5.3 GB | 9c8fea44a4df |
| model-00003-of-00004.safetensors | Weights | 4.5 GB | 2fa2f22ffa5a |
| model-00004-of-00004.safetensors | Weights | 1.2 GB | 3b37554fa92e |
| clm_mlx.json | Configuration | 804 B | — |
| clm_mlx/__init__.py | Configuration | 966 B | — |
| clm_mlx/encoder.py | Configuration | 6.7 KB | — |
| clm_mlx/server.py | Configuration | 4.8 KB | — |
| config.json | Configuration | 818 B | — |
| generation_config.json | Configuration | 239 B | — |
| heads/config.json | Configuration | 1.7 KB | — |
| model.safetensors.index.json | Configuration | 34.5 KB | — |
| parity.json | Configuration | 157.9 KB | — |
| quantization.json | Configuration | 2.6 KB | — |
| LICENSE | Documentation | 11.4 KB | — |
| README.md | Documentation | 4.2 KB | — |
| chat_template.jinja | Other | 4.2 KB | — |
| .gitattributes | Repository | 101 B | — |
| tokenizer.json | Tokenizer | 11.4 MB | be75606093db |
| tokenizer_config.json | Tokenizer | 729 B | — |
License and Download
- License
- apache-2.0
- Access
- Open weights, no gate
- Download size
- 16.5 GB
Released by Zhu Lin through its official repository on Hugging Face. Read the license.
Built From
- Derived from Contrastive-LM/CLM-v0.1-8B
- Quantized from Contrastive-LM/CLM-v0.1-8B
Memory Requirements
| Precision | Weights in memory |
|---|---|
| As published | 16.5 GB |
| 16-bit | 16.4 GB |
| 8-bit | 8.2 GB |
| 4-bit | 4.1 GB |
Weights only, from the published parameter count; the key-value cache and runtime add to this.
Questions About CLM-v0.1-8B-MLX
How much GPU memory does CLM-v0.1-8B-MLX need?
About 19.7 GB at 16-bit and 4.9 GB at 4-bit: the weights (8.2B parameters) plus a working margin. A long context needs more.
What is the cheapest GPU to run CLM-v0.1-8B-MLX on?
At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.
Can I use CLM-v0.1-8B-MLX commercially?
Yes. CLM-v0.1-8B-MLX is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.
What is CLM-v0.1-8B-MLX's context length?
40,960 tokens, from the maximum position embeddings in its published configuration.
Similar Models
This is the 8bit variant. Also available: czl/CLM-v0.1-8B-MLX-4bit, czl/CLM-v0.1-8B-MLX-6bit, and the bf16 reference. The encoder half of Contrastive-LM/CLM-v0.1-8B, quantised for MLX on Apple Silicon. mlxlm is generate-only — it has no embeddings entrypoint, and mlxlm.server routes just /v1/completions, /v1/chat/completions, /v1/models and /health. So clmmlx supplies the pooling pass over mlxlm internals: Qwen3Model.call already returns self.norm(h), the post-final-RMSNorm hidden states, which is what vLLM's pooling runner returns in last-token mode. Agreement against a bf16 MLX reference of the same encoder in the same runtime, over 23,926 scored System One questions, through the real…
This is the 6bit variant. Also available: czl/CLM-v0.1-8B-MLX-4bit, czl/CLM-v0.1-8B-MLX-8bit, and the bf16 reference. The encoder half of Contrastive-LM/CLM-v0.1-8B, quantised for MLX on Apple Silicon. mlxlm is generate-only — it has no embeddings entrypoint, and mlxlm.server routes just /v1/completions, /v1/chat/completions, /v1/models and /health. So clmmlx supplies the pooling pass over mlxlm internals: Qwen3Model.call already returns self.norm(h), the post-final-RMSNorm hidden states, which is what vLLM's pooling runner returns in last-token mode. Agreement against a bf16 MLX reference of the same encoder in the same runtime, over 23,926 scored System One questions, through the real…
The Qwen3 Embedding model series is the latest proprietary model of the Qwen family, specifically designed for text embedding and ranking tasks. Building upon the dense foundational models of the Qwen3 series, it provides a comprehensive range of text embeddings and reranking models in various sizes (0.6B, 4B, and 8B). This series inherits the exceptional multilingual capabilities, long-text understanding, and reasoning skills of its foundational model. The Qwen3 Embedding series represents significant advancements in multiple text embedding and ranking tasks, including text retrieval, code retrieval, text classification, text clustering, and bitext mining. Exceptional Versatility: The…
This model is a quantized version of the original model intfloat/e5-mistral-7b-instruct. It's quantized using the BitsAndBytes library to 4-bit using the bnb-my-repo space. - bnb4bitquanttype: nf4 - bnb4bitusedoublequant: True - bnb4bitcomputedtype: bfloat16 - bnb4bitquantstorage: uint8 Improving Text Embeddings with Large Language Models. Liang Wang, Nan Yang, Xiaolong Huang, Linjun Yang, Rangan Majumder, Furu Wei, arXiv 2024 This model has 32 layers and the embedding size is 4096. Below is an example to encode queries and passages from the MS-MARCO passage ranking dataset. Have a look at configsentencetransformers.json for the prompts that are pre-configured, such as websearchquery…
GPTQ Quantized Qwen/Qwen3-Embedding-4B with THUIR/T2Ranking and m-a-p/COIG-CQIA for calibration set. ~0.72% lost in C-MTEB. Evaluation performed with official code. pip install compressed-tensors optimum and auto-gptq / gptqmodel, then goto the official usage guide.