license: apache-2.0
license_link: LICENSE
base_model: OpenUncensored/Qwen4-35B-A3B-Uncensored
base_model_relation: quantized
pipeline_tag: image-text-to-text
library_name: basalt
language:
- en
tags: - basalt
- qwen4
- moe
- uncensored
- abliterated
- vision-language

Qwen4-35B-A3B Uncensored for Basalt, on Blackwell
Model file for Basalt, a local inference engine for NVIDIA Blackwell GPUs (sm_120) with an OpenAI- and Anthropic-compatible API. Basalt runs this model on one Blackwell card: every expert on a 32 GB card, and on a 16 GB card the experts that do not fit stay in system RAM. Up to 64 requests run at once. Needs Basalt 0.7.0 or later.
One self-contained file: weights, the tokenizer and chat protocol, the vision tower, the model's own MTP drafter with its draft vocabulary, and RadixArk's DFlash 2 drafter. Built from OpenUncensored/Qwen4-35B-A3B-Uncensored, a directional ablation of Qwen/Qwen4-35B-A3B. Every tensor is stored in one form: NVFP4 experts, an IQ4_NL n-gram table, int8 dense projections, an int8 output head, FP8 hyper-connection rows, and a quantized drafter.
| file | size | experts | dense |
|---|---|---|---|
Qwen4-35B-A3B-Uncensored.basalt |
34.4 GB (32.0 GiB) | NVFP4, least squares | int8 |
SHA-256: 8789e0da3c50dbc8357f583b9d134c96d3409738e3a23aa025b83416446b3c78
- Context: up to 1,048,576 tokens (
--max-context, default 8,192);--kv int8shrinks the cache. - Drafters: on one card the DFlash 2 drafter is the default, and multi-card modes use the MTP drafter;
--drafter mtppicks MTP on one card too. Drafted tokens are verified, so the output is the model's own: greedy output is bitwise the same with drafting on or off.--spec 0turns drafting off. - Images and video: images up to 16,384 merged tokens, video 12,288 by default (
--video-max-tokensup to 262,144). - Cards: one Blackwell card; 16 GB cards keep the remaining experts in RAM.
- DFlash 2: RadixArk/Qwen4-35B-A3B-Dflash2 (Apache-2.0), 0.8 GB of BF16 as released, stored with Q8_0 projections in this file; drafts a block of 7 tokens per pass.
- Sampling defaults from the checkpoint: temperature 1.0, top-p 0.95, top-k 20. The chat protocol is
qwen4.
The uncensored source
Qwen/Qwen4-35B-A3B (35B MoE, 3B active, 1M context, vision) with refusals removed by directional ablation, released by OpenUncensored. Same format and size as Qwen's BF16 release. 78 tensors change: the residual writers of layers 8 to 33. Everything else (n-gram embedding table, vision tower, MTP head, router, gated-residual mixers, layers 0 to 7 and 34 to 39) is byte-identical to Qwen's files.
The ablation, measured by OpenUncensored on those BF16 files with vLLM (vllm/vllm-openai:qwen4), before this pack was built. Harmful prompts are 100 held-out requests (none were used to find the edit), sampled at the card's settings (thinking off: temperature 0.7, top-p 0.8, top-k 20, presence penalty 1.5, up to 4,096 tokens; thinking on: temperature 1.0, top-p 0.95, top-k 20, up to 8,192 tokens). Answers are graded by two judges from different model families (DeepSeek and GLM). Only finished answers are graded.
| Qwen4 35B A3B | Uncensored BF16 | |
|---|---|---|
| Refusals, thinking off (refusal phrase in the answer) | 97 / 100 | 2 / 100 |
| Refusals, thinking on | 99 / 100 | 1 / 100 |
| Full answers, thinking off (both judges agree) | 2 / 72 | 63 / 72 |
| Full answers, thinking on (both judges agree) | 1 / 72 | 66 / 72 |
| MMLU, 300 questions, thinking off, greedy | 70.0% | 71.3% |
| SQuAD 2.0 unanswerable questions answered anyway (lower is better) | 7 / 100 | 8 / 100 |
Those numbers are the BF16 checkpoint. This file stores the routed experts as NVFP4, and refusals after that rounding have not been measured. The source reports the gains in full answers as significant per prompt (exact McNemar test, p < 1e-18 in both modes). MMLU (p = 0.65) and SQuAD 2.0 fabrication (p = 1.0) are unchanged on the BF16 files. Answers that hit the token limit are long, finished-looking code or guides cut off at the cap.
How the edit was found, from the source release:
- Refusal directions. Qwen4 keeps 4 residual streams (gated residual, width 2,048 each). Every attention, DeltaNet and MoE branch writes one 2,048-wide output into all 4 streams with scalar weights. The source reads the mean of the 4 streams at the last prompt token after each of the 40 layers, for 128 harmful and 128 harmless prompts, with thinking off and on, and takes the difference of means per layer and mode with the harmless mean projected out. The two modes refuse along different directions (cosine about 0.3), so each layer gets a rank-2 basis
Bthat covers both. - Where it edits. All residual writers on layers 8 to 33: the DeltaNet
linear_attn.out_projor sparse attentionself_attn.o_proj, the shared expertdown_proj, and the fused routed expertsdown_proj(all 256 experts).W' = W − 1.5 B Bᵀ W, which removes the refusal component each writer adds and flips half of it. Chosen from 17 screened settings as the best trade between refusals and drift on harmless prompts. Attention-only edits also removed refusals but cost 6 MMLU points. - Writing it in. The edit is computed in float32 and rounded once to BF16. For every edited tensor the refusal component is 0.50x the original (target |1 − 1.5|, error under 0.0002), the change outside
Bis BF16 rounding only (under 0.17%), and every untouched tensor is byte-identical to Qwen's, checked tensor by tensor.
The source release keeps the basis beside the BF16 shards so the edit can be re-applied. This repository is the Basalt pack only.
What is in the file
| part | format |
|---|---|
| Routed experts (256 per layer, top 8) | NVFP4, rounded from the checkpoint's BF16 weights: matrix scale amax / (6 × 448), then per 16 values the UE4M3 scale of least squared error among half to four times amax / 6, nearest E2M1 |
| Attention, GDN, QSA and shared-expert matrices, indexer q and k | int8 rows with one FP32 scale per row (amax / 127), the only copy |
| Router, GDN alpha/beta | BF16 |
| Hyper-connections (4 streams, rank 256) | FP8 (E4M3) rows with one BF16 scale each, rounded once from BF16 (amax / 448) |
| Per-layer n-gram table | IQ4_NL (read from the SSD, or from RAM with --ple-io ram) |
| Output head | int8 rows with one FP32 scale per row (amax / 127), rounded once from the BF16 lm_head |
| Token embedding | Q8_0 |
| MTP drafter | the model's own layer: Q8_0 and BF16 dense, Q2_0 experts, plus a draft vocabulary |
| DFlash 2 drafter | RadixArk's block drafter: fc, attention and MLP projections Q8_0, convolutions and selector BF16 |
| Vision tower | BF16 (F32 norms and biases) |
Quantization
How each part of the language model is stored:
| part | format | bits per weight |
|---|---|---|
| Routed experts (256 per layer, top 8) | NVFP4 | 4.5 |
| Attention, GDN, QSA and shared-expert matrices | int8 | 8.0 |
| Per-layer n-gram table (20.5B parameters, about 20 GiB as BF16) | IQ4_NL | 4.5 |
| Output head | int8 | 8.0 |
| Token embedding | Q8_0 | 8.5 |
Average bits per weight over the language model, the same accounting as jesdga/Qwen4-35B-A3B-Basalt (each weight once, in the form the engine reads it; the drafters and the vision tower left out): about 4.7 with the n-gram table and about 4.8 without it. This file has the same formats and the same section sizes as that pack.
The n-gram table. Qwen4 adds, at one layer, an embedding looked up by the last three tokens: each n-gram is hashed into 16 heads of about 10 million rows each, and the rows are added to that layer's input. It is a lookup table, not a matrix multiply, so it is large (20.5B of the model's parameters) but only a few rows are read per token. It does not need to sit in VRAM, so --ple-io ram keeps it in system RAM (about 11 GiB in this file) and reads rows from there; the default reads them directly from the file on the SSD. RAM is faster for the lookups, if you have the memory.
The experts. No calibration set. Each matrix scale is amax / (6 × 448). Each 16 values then take the UE4M3 scale of least squared error among the scales from half to four times amax / 6, and the values are the nearest E2M1 codes. jesdga/Qwen4-35B-A3B-Basalt rounds the stock model's experts with weighted scales and GPTQ error feedback, and its quality and speed tables are for that file.
Run
hf download johnlockejrr/Qwen4-35B-A3B-Uncensored-Basalt Qwen4-35B-A3B-Uncensored.basalt --local-dir models
bin/basalt serve models/Qwen4-35B-A3B-Uncensored.basalt
Add --ple-io ram to keep the n-gram table in RAM. The pack recipe for this architecture: model file. This file was built the same way, without --expert-stats. More: Qwen4-35B-A3B on Basalt.
Caveats
- The routed experts are edited in the source, and this pack stores them as NVFP4. The source release warns that 4-bit rounding may weaken the edit. Refusals on this file have not been measured.
- The MTP head in the source is the original Qwen head. This pack includes that MTP drafter and RadixArk's DFlash 2 drafter. Acceptance on the edited weights was not measured. Drafted tokens are still verified by the target model.
- The model answers more requests, not more of everything: the BF16 source still declines some, and some answers swap in a safer version of the task (graded PARTIAL by one judge).
- MMLU on the source card asks for a letter only. About 15% of answers in both the stock and the uncensored BF16 model explain instead and count as wrong, so read those MMLU numbers as a paired comparison, not a leaderboard score.
License
Qwen4-35B-A3B is released by Qwen under Apache-2.0. The uncensored checkpoint is a modified form of those weights, also Apache-2.0, from OpenUncensored. This file is a quantized and repacked form of that checkpoint, distributed under the same license. This is not an official Qwen release. The Basalt engine is MIT.
RadixArk's DFlash 2 drafter is Apache-2.0.
Free Models, Built in My Spare Time
I host 100+ free models for the community and love seeing everyone put them to use.
Since I maintain and publish these in my free time at no cost to you, any support helps me keep sharing more.
No pressure at all—downloads and feedback are always free, and tips go straight toward supporting future releases and storage.