library_name: mlx
pipeline_tag: image-text-to-text
inference: false
license: apache-2.0
base_model: orcarouter/Qwen3.8-27B-Uncensored
base_model_relation: quantized
language:
- zh
- en
tags: - mlx
- omlx
- oq
- quantized
- qwen3.8
- qwen3_5
- uncensored
- mtp
- multimodal
- apple-silicon
Qwen3.8-27B-Uncensored-oQ4e-mtp
这是用 oMLX oQ 从 BF16 源模型量化出来的 Apple MLX 部署包。不是 GGUF,也不是把现成 4-bit MLX 再压一遍。
源模型
- 量化源:orcarouter/Qwen3.8-27B-Uncensored(Transformers / BF16,约 55.6 GB,18 个分片)
- 上游基座:Qwen/Qwen3.8-27B
- 不是 orcarouter/Qwen3.8-27B-Uncensored-MLX 的 4-bit 包。oMLX 的 oQ 会拒绝已量化权重,必须从 BF16 做。
- Uncensored 标签和拒绝对齐被削弱的行为全部继承自源模型。这里没有重新训练,也没有再做 abliteration。
量化配方对齐公开包 pyros-vault/Qwen3.8-27B-Uncensored-oQ4e-mtp。
怎么量化的
| 项目 | 值 |
|---|---|
| 运行时 | oMLX 0.6.4(oQ mixed-precision) |
| 机器 | Apple M5 Max,64 GB |
| 配方 | oQ4 + enhanced imatrix(oQe)+ preserve MTP |
| 输出名 | Qwen3.8-27B-Uncensored-oQ4e-mtp |
| dtype | bfloat16(未量化张量 / scale) |
| 默认量化 | Affine Q4 / group_size 64 |
| 混合精度 | 166 个张量升到 Q5 / G64 |
| 校准数据 | 内置 oqe_code_multilingual |
| 校准规模 | 128 samples x 512 tokens |
| imatrix | 504 entries;language_model.lm_head 未命中 |
| 体积 | 15.81 GiB 张量载荷,4 个 safetensors 分片 |
| 保留能力 | Vision tower + 1 层 MTP(language_model.mtp.*) |
等价于 oMLX 管理页 /admin/api/oq/start:
{
"model_path": "~/.omlx/models/orcarouter/Qwen3.8-27B-Uncensored",
"oq_level": 4,
"enhanced": true,
"preserve_mtp": true,
"dtype": "bfloat16",
"group_size": 64,
"auto_proxy_sensitivity": true,
"imatrix_num_samples": 128,
"imatrix_seq_length": 512,
"text_only": false
}
64 GB 内存装不下完整 BF16。oQ 会自动建 4-bit proxy 做 imatrix / sensitivity,再流式写出本仓库。详细校准记录见 oq_imatrix_report.json。
本地用法(oMLX)
mkdir -p "$HOME/.omlx/models/samwang0041"
hf download samwang0041/Qwen3.8-27B-Uncensored-oQ4e-mtp \
--local-dir "$HOME/.omlx/models/samwang0041/Qwen3.8-27B-Uncensored-oQ4e-mtp"
用当前 oMLX 起 OpenAI 兼容服务,并在模型设置里打开 Lightning MTP(mtp_enabled)。仓库里有 MTP 权重不等于自动投机解码。
可参考 omlx.ai/gm4itomo 的结构:
- Lightning MTP:开
- TurboQuant KV:6-bit
- SpecPrefill:可选,草稿 mlx-community/Qwen3.5-0.8B-MLX-4bit,keep 0.2,threshold 1024
- ANE prefill:关
- thinking:开,budget 4096
本机吞吐
Apple M5 Max 64GB,oMLX 官方 bench,Code Python,生成 128 tokens。
| 上下文 | PP tok/s | TG tok/s | TTFT | 峰值内存 |
|---|---|---|---|---|
| 1k | 818.3 | 53.1 | 1.25 s | 18.7 GB |
| 4k | 842.2 | 49.2 | 4.86 s | 20.2 GB |
| 8k | 816.6 | 44.2 | 10.03 s | 20.9 GB |
| 16k | 2782.4 | 69.5 | 5.89 s | 19.9 GB |
16k 起 SpecPrefill 生效,PP 会明显跳升。这是 Uncensored 权重的本机结果,不是官方 Qwen3.8-27B-oQ4e-mtp 的成绩。
文件
请整仓下载:4 个权重分片、model.safetensors.index.json、config.json、tokenizer / chat template、preprocessor_config.json、oq_imatrix_report.json。缺索引或配置会无法在 oMLX 加载。
限制与风险
- 只面向 Apple Silicon + oMLX/MLX。Hugging Face 托管推理不会跑这个自定义布局。
- 源模型做过 refusal abliteration,会答应原版会拒绝的请求。研究 / 红队用途;部署前请自己加安全层。
- 量化会改变输出,请用自己的任务评估。
- config.json 里的 262144 上下文是模型元数据,不是本机已测通的长度。
许可
Apache-2.0,继承源模型。量化与打包由本仓库完成。