Views
No views yet
| Parameter | Value |
|---|---|
| Method | SOMA + MPOA |
orthogonalize_direction | true |
row_normalization | full |
full_normalization_lora_rank | 4 |
winsorization_quantile | 0.95 |
multidirectional_som | true |
som_x × som_y | 4 × 4 (16 neurons) |
som_iterations | 10000 |
som_lr | 0.01 |
som_sigma | 0.5 |
som_k | 4 directions |
n_trials | 200 |
n_startup_trials | 60 |
quantization | none (bf16) |
| Good prompts | mlabonne/harmless_alpaca (train[:400]) |
| Bad prompts | mlabonne/harmful_behaviors (train[:400]) |
| Selected trial | Trial 84 / 200 |
direction_index | 34.10 |
attn.o_proj.max_weights | 0: 0.94, 1: 1.36, 2: 0.86, 3: 0.93 |
attn.o_proj.max_weight_position | 23.88 |
attn.o_proj.min_weights | 0: 0.44, 1: 0.22, 2: 0.74, 3: 0.29 |
attn.o_proj.min_weight_distance | 13.11 |
mlp.down_proj.max_weights | 0: 1.26, 1: 1.11, 2: 1.20, 3: 1.21 |
mlp.down_proj.max_weight_position | 32.33 |
mlp.down_proj.min_weights | 0: 0.76, 1: 0.94, 2: 1.09, 3: 0.97 |
mlp.down_proj.min_weight_distance | 2.47 |
| Metric | Original | Abliterated |
|---|---|---|
| KL Divergence | 0 (by definition) | 0.0638 |
| Refusals (out of 100) | 91 | 6 |

[!Note] This repository contains model weights and configuration files for the post-trained model in the Hugging Face Transformers format.These artifacts are compatible with Hugging Face Transformers, vLLM, SGLang, KTransformers, etc.

[!Important] Qwen3.5 models operate in thinking mode by default, generating thinking content signified by<think>\n...</think>\n\nbefore producing the final responses. To disable thinking content and obtain direct response, refer to the examples here.
[!Important] Inference efficiency and throughput vary significantly across frameworks. We recommend using the latest framework versions to ensure optimal performance and compatibility. For production workloads or high-throughput scenarios, dedicated serving engines such as SGLang, KTransformers or vLLM are strongly recommended.
[!Important] The model has a default context length of 262,144 tokens. If you encounter out-of-memory (OOM) errors, consider reducing the context window. However, because Qwen3.5 leverages extended context for complex tasks, we advise maintaining a context length of at least 128K tokens to preserve thinking capabilities.
uv pip install 'git+https://github.com/sgl-project/sglang.git#subdirectory=python&egg=sglang[all]'http://localhost:8000/v1:python -m sglang.launch_server --model-path Jongsim/Qwen3.5-35B-A3B-heretic --port 8000 --tp-size 8 --mem-fraction-static 0.8 --context-length 262144 --reasoning-parser qwen3python -m sglang.launch_server --model-path Jongsim/Qwen3.5-35B-A3B-heretic --port 8000 --tp-size 8 --mem-fraction-static 0.8 --context-length 262144 --reasoning-parser qwen3 --tool-call-parser qwen3_coderpython -m sglang.launch_server --model-path Jongsim/Qwen3.5-35B-A3B-heretic --port 8000 --tp-size 8 --mem-fraction-static 0.8 --context-length 262144 --reasoning-parser qwen3 --speculative-algo NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4uv pip install vllm --torch-backend=auto --extra-index-url https://wheels.vllm.ai/nightlyhttp://localhost:8000/v1:vllm serve Jongsim/Qwen3.5-35B-A3B-heretic --port 8000 --tensor-parallel-size 8 --max-model-len 262144 --reasoning-parser qwen3vllm serve Jongsim/Qwen3.5-35B-A3B-heretic --port 8000 --tensor-parallel-size 8 --max-model-len 262144 --reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_codervllm serve Jongsim/Qwen3.5-35B-A3B-heretic --port 8000 --tensor-parallel-size 8 --max-model-len 262144 --reasoning-parser qwen3 --speculative-config '{"method":"qwen3_next_mtp","num_speculative_tokens":2}'vllm serve Jongsim/Qwen3.5-35B-A3B-heretic --port 8000 --tensor-parallel-size 8 --max-model-len 262144 --reasoning-parser qwen3 --language-model-onlytransformers is required for Qwen3.5:pip install "transformers[serving] @ git+https://github.com/huggingface/transformers.git@main"transformers serve to launch a server with API endpoints at http://localhost:8000/v1; it will place the model on accelerators if available:transformers serve --force-model Jongsim/Qwen3.5-35B-A3B-heretic --port 8000 --continuous-batching1pip install -U openai
2
3# Set the following accordingly
4export OPENAI_BASE_URL="http://localhost:8000/v1"
5export OPENAI_API_KEY="EMPTY"[!Tip] We recommend using the following set of sampling parameters for generation
- Thinking mode for general tasks:
temperature=1.0, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0- Thinking mode for precise coding tasks (e.g. WebDev):
temperature=0.6, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=0.0, repetition_penalty=1.0- Instruct (or non-thinking) mode for general tasks:
temperature=0.7, top_p=0.8, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0- Instruct (or non-thinking) mode for reasoning tasks:
temperature=1.0, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0Please note that the support for sampling parameters varies according to inference frameworks.
1from openai import OpenAI
2# Configured by environment variables
3client = OpenAI()
4
5messages = [
6 {"role": "user", "content": "Type \"I love Qwen3.5\" backwards"},
7]
8
9chat_response = client.chat.completions.create(
10 model="Jongsim/Qwen3.5-35B-A3B-heretic",
11 messages=messages,
12 max_tokens=81920,
13 temperature=1.0,
14 top_p=0.95,
15 presence_penalty=1.5,
16 extra_body={
17 "top_k": 20,
18 },
19)
20print("Chat response:", chat_response)[!Important] Qwen3.5 does not officially support the soft switch of Qwen3, i.e.,/thinkand/nothink.
1from openai import OpenAI
2# Configured by environment variables
3client = OpenAI()
4
5messages = [
6 {
7 "role": "user",
8 "content": "What is the capital of France?"
9 }
10]
11
12chat_response = client.chat.completions.create(
13 model="Jongsim/Qwen3.5-35B-A3B-heretic",
14 messages=messages,
15 max_tokens=32768,
16 temperature=0.7,
17 top_p=0.8,
18 presence_penalty=1.5,
19 extra_body={
20 "top_k": 20,
21 "chat_template_kwargs": {"enable_thinking": False},
22 },
23)
24print("Chat response:", chat_response)transformers, vllm, ktransformers and sglang.
In general, there are two approaches to enabling YaRN for supported frameworks:config.json file, change the rope_parameters fields in text_config to:1{
2 "mrope_interleaved": true,
3 "mrope_section": [11, 11, 10],
4 "rope_type": "yarn",
5 "rope_theta": 10000000,
6 "partial_rotary_factor": 0.25,
7 "factor": 4.0,
8 "original_max_position_embeddings": 262144
9}vllm, you can useVLLM_ALLOW_LONG_MAX_MODEL_LEN=1 vllm serve ... --hf-overrides '{"text_config": {"rope_parameters": {"mrope_interleaved": true, "mrope_section": [11, 11, 10], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144}}}' --max-model-len 1010000sglang and ktransformers, you can useSGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 python -m sglang.launch_server ... --json-model-override-args '{"text_config": {"rope_parameters": {"mrope_interleaved": true, "mrope_section": [11, 11, 10], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144}}}' --context-length 1010000[!NOTE] All the notable open-source frameworks implement static YaRN, which means the scaling factor remains constant regardless of input length, potentially impacting performance on shorter texts. We advise modifying therope_parametersconfiguration only when processing long contexts is required. It is also recommended to modify thefactoras needed. For example, if the typical context length for your application is 524,288 tokens, it would be better to setfactoras 2.0.
temperature=1.0, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0temperature=0.6, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=0.0, repetition_penalty=1.0temperature=0.7, top_p=0.8, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0temperature=1.0, top_p=1.0, top_k=40, min_p=0.0, presence_penalty=2.0, repetition_penalty=1.0presence_penalty parameter between 0 and 2 to reduce endless repetitions. However, using a higher value may occasionally result in language mixing and a slight decrease in model performance.answer field with only the choice letter, e.g., "answer": "C"."1@misc{qwen3.5,
2 title = {{Qwen3.5}: Towards Native Multimodal Agents},
3 author = {{Qwen Team}},
4 month = {February},
5 year = {2026},
6 url = {https://qwen.ai/blog?id=qwen3.5}
7}