Run this model with HF Jobs
Run OpenUncensored/Qwen4-35B-A3B-Uncensored on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/OpenUncensored/Qwen4-35B-A3B-Uncensored. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/OpenUncensored/Qwen4-35B-A3B-Uncensored on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/OpenUncensored/Qwen4-35B-A3B-Uncensored. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/OpenUncensored/Qwen4-35B-A3B-Uncensored. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use OpenUncensored/Qwen4-35B-A3B-Uncensored with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenUncensored/Qwen4-35B-A3B-Uncensored with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OpenUncensored/Qwen4-35B-A3B-Uncensored")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("OpenUncensored/Qwen4-35B-A3B-Uncensored") model = AutoModelForMultimodalLM.from_pretrained("OpenUncensored/Qwen4-35B-A3B-Uncensored", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenUncensored/Qwen4-35B-A3B-Uncensored with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenUncensored/Qwen4-35B-A3B-Uncensored" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenUncensored/Qwen4-35B-A3B-Uncensored", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/OpenUncensored/Qwen4-35B-A3B-Uncensored
- SGLang
How to use OpenUncensored/Qwen4-35B-A3B-Uncensored with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "OpenUncensored/Qwen4-35B-A3B-Uncensored" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenUncensored/Qwen4-35B-A3B-Uncensored", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "OpenUncensored/Qwen4-35B-A3B-Uncensored" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenUncensored/Qwen4-35B-A3B-Uncensored", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use OpenUncensored/Qwen4-35B-A3B-Uncensored with Docker Model Runner:
docker model run hf.co/OpenUncensored/Qwen4-35B-A3B-Uncensored
Qwen4 35B A3B Uncensored (OpenUncensored)
Available now on the OpenUncensored API, served from these
exact weights on our own GPUs: qwen4-35b-a3b-uncensored (thinking off by default) and
qwen4-35b-a3b-uncensored-thinking, with the full 1M context, tool calling and image input.
Qwen/Qwen4-35B-A3B (35B MoE, 3B active, 1M context, vision) with its refusals removed by directional ablation.
Same format and size as the original 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.
Results
Stock Qwen4 35B A3B and this model, same prompts, same settings, measured on these exact files with vLLM
(vllm/vllm-openai:qwen4). 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 | This model | |
|---|---|---|
| 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 |
The gains in full answers are 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. Answers that hit the token limit are long, finished-looking code or guides cut off at the cap, not repetition loops.
How it was made
- 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. We read 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 took 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 to edit. 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. We picked this from 17 screened settings (attention only, attention plus shared expert, all writers; strengths 1.0 to 3.0; several layer ranges) 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, checked tensor by tensor.
edit.safetensors holds B and the strength for each of the 78 edited tensors, so the edit can be re-applied to the original
weights or studied.
Use it
It runs exactly like the original. We served it on one B200 with vLLM:
vllm serve OpenUncensored/Qwen4-35B-A3B-Uncensored --trust-remote-code \
--max-model-len 32768 --enable-prefix-caching --reasoning-parser qwen4
Qwen4 reasons by default. To turn thinking off for a request, send
"chat_template_kwargs": {"reasoning_effort": "off"}. SGLang, transformers (5.26 or later), llama.cpp and MLX work as
they do for the original; see the Qwen4 35B A3B model card.
Caveats
- The routed experts are edited, so quantizing them to 4 bits may weaken the edit. We have not measured refusals after quantization yet.
- The MTP head is unchanged. Speculative decoding works, but acceptance on the edited weights was not measured.
- The model answers more requests, not more of everything: it still declines some, and some answers swap in a safer version of the task (graded PARTIAL by one judge).
- MMLU here asks for a letter only. About 15% of answers in both models explain instead and count as wrong, so read the MMLU numbers as a paired comparison, not a leaderboard score.
Use it without GPUs
OpenUncensored serves this model behind an OpenAI-compatible API, from these exact weights
on our own GPUs, along with the other uncensored open-weight models it hosts. qwen4-35b-a3b-uncensored answers with
thinking off unless you send reasoning_effort (low, high or xhigh); qwen4-35b-a3b-uncensored-thinking reasons
first. No account needed: buy a prepaid key at openuncensored.com/credits.
curl https://api.openuncensored.com/v1/chat/completions \
-H "Authorization: Bearer $OU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen4-35b-a3b-uncensored",
"messages": [{"role": "user", "content": "Explain SQL injection with an example."}]
}'
Follow us on X: https://x.com/OpenUncensored
License
Apache 2.0, the same as the original model.
Made by OpenUncensored.
- Downloads last month
- 3,018
Model tree for OpenUncensored/Qwen4-35B-A3B-Uncensored
Base model
Qwen/Qwen4-35B-A3B