Censored-SLM: targeted weight editing for Qwen3.5-0.8B
2 min readupdated
This model is an interesting experiment from the Sparks of Weight Space Programming blog, where another advanced LLM (large language model) analyzed the weights of Qwen3.5-0.8B (0.8B parameters) and manually edited 131,072 weights to fix endless looping on math problems. It used no gradient descent or traditional fine-tuning, performing only direct programmatic weight tuning (weight-space programming). The base version of the model got stuck in endless loops on math tasks, while the edited version solves them successfully. The model is useful for researchers and developers interested in novel methods for modifying AI models without training.
Key features
- Direct weight editing: modifying specific weights in MLP (multilayer perceptron) layers without training and fine-tuning.
- Accuracy gains: accuracy on the MATH-500 benchmark jumped from 5.0% for the base version to 51.0% for the edited version.
- Hash verification: every modified tensor is verified using the sha256 algorithm to guarantee correct assembly.
What you can do
- Running via vLLM: use the model for response generation and testing on math problems using the vLLM library.
- Studying the method: analyze logs and build scripts to research weight-space programming.
Example
from vllm import LLM, SamplingParams
from transformers import AutoTokenizer
ckpt = "akhaliq/Qwen3.5-0.8B-weight-space-programming"
tok = AutoTokenizer.from_pretrained(ckpt)
llm = LLM(model=ckpt, dtype="bfloat16", max_model_len=34816)
prompt = tok.apply_chat_template(
[{"role": "user", "content": "What is $2^{10} + 24$? Please reason step by step."}],
tokenize=False, add_generation_prompt=True, enable_thinking=True)
sp = SamplingParams(n=1, temperature=0.6, top_p=0.95, top_k=20, presence_penalty=1.5,
max_tokens=32768, seed=0)
print(llm.generate([prompt], sp)[0].outputs[0].text)
Read more
DetailsBase model: Qwen/Qwen3.5-0.8B
Metrics: MATH-500 accuracy 51.0% (vs. 5.0% for base)
Hardware: verification and generation on NVIDIA H200
Libraries: vLLM 0.33.0, transformers 5.20.2, math-verify 0.9.0










Comments