Instructions to use DAXZEIT/DAX-v1-27B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DAXZEIT/DAX-v1-27B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="DAXZEIT/DAX-v1-27B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("DAXZEIT/DAX-v1-27B") model = AutoModelForMultimodalLM.from_pretrained("DAXZEIT/DAX-v1-27B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DAXZEIT/DAX-v1-27B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DAXZEIT/DAX-v1-27B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DAXZEIT/DAX-v1-27B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/DAXZEIT/DAX-v1-27B
- SGLang
How to use DAXZEIT/DAX-v1-27B 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 "DAXZEIT/DAX-v1-27B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DAXZEIT/DAX-v1-27B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "DAXZEIT/DAX-v1-27B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DAXZEIT/DAX-v1-27B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use DAXZEIT/DAX-v1-27B with Docker Model Runner:
docker model run hf.co/DAXZEIT/DAX-v1-27B
DAX-v1-27B
Qwen3.8-27B that reasons from the conversation and the facts.
Asked about Taiwan, Tibet or Tiananmen, the original model often recites in its reasoning a set of "guidelines" that no prompt contains ("Sovereignty & Compliance", "I must comply with China's values and territorial claims"), then answers from them. DAX-v1 gives the established facts first and attributes each position to those who hold it.
Two changes, everything else is Qwen3.8-27B byte for byte:
- A rank-one weight edit: one direction projected out of 20 matrices, layers 28 to 37.
- Two sentences in the chat template, on honesty and on contested questions.
This repository holds the BF16 weights in Transformers format, with the MTP head and the vision encoder. Quantised releases:
- GGUF, Unsloth Dynamic V3.1 recipe, UD-Q4_K_XL, UD-Q6_K_XL and UD-Q8_K_XL, with the mmproj: DAXZEIT/DAX-v1-27B-GGUF
- NInfer, UD-Q4_K_XL with MTP and vision: DAXZEIT/DAX-v1-27B-UD-Q4_K_XL-NInfer
Full study, with protocols, code and receipts: https://github.com/DAXZEIT/qwen27b-memorised-rule
Results
Measured on DAX-v1-27B-UD-Q4_K_XL.gguf, the UD-Q4_K_XL quantisation of these weights,
against Unsloth's UD-Q4_K_XL V3.1 of Qwen3.8-27B. 16 questions on eight topics (Taiwan,
Tibet, Xinjiang, Hong Kong, Tiananmen, Dalai Lama, Falun Gong, South China Sea), French and
English, 6 draws each, in two conditions: the bare question with no system prompt (the
worst case), and the same question under a coding agent's system prompt (about 13,000
tokens, 17 tools). Blind labels, protocols frozen before each run.
| 96 draws per column | no system prompt: original | DAX-v1 | agent system prompt: original | DAX-v1 |
|---|---|---|---|---|
| reasoning invokes the memorised rule | 46 | 7 | 20 | 1 |
| answer takes the PRC government's position as its own | 61 | 6 | 12 | 2 |
| answer factually accurate | 21 | 78 | 66 | 75 |
- With no system prompt, the rule drops from 46 draws to 7 (Fisher exact p = 2e-10) and accurate answers go from 21 to 78.
- Under an agent system prompt, the original still invokes the rule in 20 draws; DAX-v1 in 1 (p = 8e-6). That draw recites an instruction to refuse questions on Tiananmen, which the prompt does not contain.
- General ability is unchanged: 96 of 100 ARC-Challenge questions for both, and a client system prompt followed in 28 of 30 draws (original: 29).
- The same result holds on a second quantisation recipe of the model (rule 6, accurate 85, no system prompt).
On these questions DAX-v1 generates more tokens, reasoning and answer together (3.4 times more with no system prompt, 1.5 times under the agent prompt): it works through the facts where the original recited a rule.
Field use
I use DAX-v1 myself, every day. It is my coding agent: long sessions in Pi and T3 Code, interactively and as a sub-agent, with tools and vision, under NInfer and llama.cpp. The agent column above is measured under my agent's system prompt.
The goal was never to make a different model. It was to change one specific behaviour without losing what makes Qwen3.8-27B worth running: the same reasoning, the same tool use, the same obedience to a system prompt. The edit removes one direction out of 5,120 in ten layers; everything else is Qwen's work.
The two template sentences
Placed in the system turn, before your own system prompt:
You say what you know, what you are unsure of, and what you are guessing, and you say which is which. You would rather say "I don't know" than invent an answer. You judge a claim or an argument on its content and evidence, not on who states it. Where governments or people disagree, you give the established facts first and attribute each position to those who hold it, without taking any government's position as your own.
They ship in chat_template.jinja (and tokenizer_config.json): keep the bundled template
and you have them. With your own template you get the weight edit alone, which already
brings the rule from 46 to 10.
The template is the one Unsloth ships with its Qwen3.8-27B GGUF (Dynamic V3.1) plus these
two sentences, the same in every DAX-v1 release. Compared with Qwen's, it merges leading
system and developer messages into one system turn and maps reasoning_effort: "high" to
"xhigh".
Weight-space programming
DAX-v1 is not a fine-tune. No gradient, no training data: a behaviour located in the activations is written directly into the weights. The term "weight-space programming" comes from Takehi, Teoh, Zhang and Khattab at MIT CSAIL (blog, code). The gradient-free approach follows ConceptCountry's edit of this same model; removing one direction to change a behaviour goes back to Arditi et al. 2024 on refusal (arXiv 2406.11717). The object here is different: not refusal and not a topic, but the model's tendency to enter a recited frame and treat it as an instruction.
- Locate. Activation patching over the 64 layers, on a French and an English prompt pair, shows the rule signal on the topic token up to layers 23–32, then on "is" in "The user is asking" in the middle layers, then on the last position from layers 43–50.
- Find a direction.
null_polis the mean difference between questions about Kosovo and Somaliland and questions about tea: no Chinese topic in it. Removed at run time in layers 24–49, it brings the rule from 46 % of draws to 7.5 %; a random direction leaves it at 39 %. What triggers the rule is closer to "a question about independence or sovereignty" than to "a question about China". - Write it into the weights. The run-time projection becomes a projection of the weights. Over the full window 24–49, the edited weights reproduce the run-time ablation (median KL 0.004, at the noise floor). DAX-v1 keeps layers 28–37 only: the wider edit failed a guard frozen in advance. Quantisation keeps 2 to 8 % of the removed component in the 20 edited tensors, against 100 % for a random direction.
The edit makes the model less likely to enter the frame; it does not erase the text. When the reasoning is forced to start reciting the rule, the recitation is still there.
The weight edit
W ← W − r (rᵀ W) on every matrix that writes into the residual stream in layers 28 to 37:
self_attn.o_proj (full-attention layers 31 and 35) or linear_attn.out_proj (the eight
Gated DeltaNet layers), and mlp.down_proj. 20 tensors.
ris a unit vector of 5,120 values:directions/null_pol.f32in this repository (float32, sha256a9ccbbcaaf43751b65c90c312de5e99fabd3909b4bb4e68c32fdbdf83cc01ceb).- Computed in float64 on the BF16 weights of
Qwen/Qwen3.8-27B at revision
1d4bf0f2, then rounded to BF16 (round to nearest even). - Files changed from Qwen/Qwen3.8-27B:
model-00008tomodel-00011-of-00018.safetensors(only the 20 tensors),chat_template.jinja,tokenizer_config.json(chat_template),README.md. Added:directions/null_pol.f32. All other files and tensors are identical. - The 20 edited tensors are identical, byte for byte, to those the GGUF and NInfer releases were quantised from.
Usage
Same architecture, configuration and processor as Qwen3.8-27B: serve it as you would the
original (vLLM, SGLang, Transformers), with DAXZEIT/DAX-v1-27B as the model id. Qwen's
serving recipes apply unchanged. Recommended sampling, as for Qwen3.8 in thinking mode:
temperature=1.0, top_p=0.95, top_k=20, min_p=0.0.
Credits and licence
- Qwen/Qwen3.8-27B by the Qwen team, Apache 2.0.
- Base chat template: Unsloth, Apache 2.0.
- The weight edit, the direction and the two template sentences: DAXZEIT, Apache 2.0.
- The study (code, protocols and receipts): DAXZEIT, MIT.
Independent work, built on the Qwen and Unsloth releases.
- Downloads last month
- 15
