Instructions to use OxBee/Qwen3.5-0.8B-Astra-WeightEdit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OxBee/Qwen3.5-0.8B-Astra-WeightEdit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OxBee/Qwen3.5-0.8B-Astra-WeightEdit") 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("OxBee/Qwen3.5-0.8B-Astra-WeightEdit") model = AutoModelForMultimodalLM.from_pretrained("OxBee/Qwen3.5-0.8B-Astra-WeightEdit", 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 OxBee/Qwen3.5-0.8B-Astra-WeightEdit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OxBee/Qwen3.5-0.8B-Astra-WeightEdit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OxBee/Qwen3.5-0.8B-Astra-WeightEdit", "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/OxBee/Qwen3.5-0.8B-Astra-WeightEdit
- SGLang
How to use OxBee/Qwen3.5-0.8B-Astra-WeightEdit 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 "OxBee/Qwen3.5-0.8B-Astra-WeightEdit" \ --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": "OxBee/Qwen3.5-0.8B-Astra-WeightEdit", "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 "OxBee/Qwen3.5-0.8B-Astra-WeightEdit" \ --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": "OxBee/Qwen3.5-0.8B-Astra-WeightEdit", "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 OxBee/Qwen3.5-0.8B-Astra-WeightEdit with Docker Model Runner:
docker model run hf.co/OxBee/Qwen3.5-0.8B-Astra-WeightEdit
Qwen3.5-0.8B: Astra Weight Edit
Qwen3.5-0.8B with 2 tensors edited directly by an LLM (GPT-6 Astra), with no training. This fixes the model's thinking-mode repeat loops.
All credit goes to Rikiya Takehi, Jayden Teoh, Alex Zhang and Omar Khattab (MIT CSAIL). I only applied their released diff and checked that it matches their evaluated checkpoint hash for hash. Not affiliated with or endorsed by the authors, OpenAI or Qwen.
- ๐ Blog: Sparks of Weight-Space Programming (Experiment 8)
- ๐ฆ Logs + edit: RikiyaT/lm_understand-logs (
exp8_math/runs/p50c/edit, also copied intoastra_edit/)
๐ง Independent benchmarking in progress: MATH-500 base vs. edited, thinking on and off. Results will be added here.
What changed
The loop direction was subtracted from 64 output columns of mlp.down_proj in layers 15 and 19 (about 130k weights,
0.016% of the model). Everything else is byte-identical to the base model.
Reported results (from the authors, not yet reproduced)
Thinking on, temperature 0.6, top_p 0.95, top_k 20, presence_penalty 1.5, 32k tokens:
| MATH-500 | GSM8K | IFEval | MMLU-Pro | |
|---|---|---|---|---|
| Base | 7.9 | 13.8 | 21.0 | 40.3 |
| Edited | 48.1 | 67.1 | 62.3 | 45.5 |
โ ๏ธ This removes a failure mode; it doesn't add capability. Most of the gain comes from answers that no longer hit the token limit (93% โ 33% cut off). With thinking off, the base model doesn't loop much, so compare against that too.
TODO
- Independent MATH-500 benchmark (in progress)
- GSM8K / IFEval reproduction
- ONNX / Transformers.js build for in-browser demo
Notes
- The authors' grader (
mathqa.py) imports an internal module (mcqa) that isn't in their release. It's only used for loop diagnostics, so my benchmark uses a one-function stand-in and leaves their file untouched. evaluate.pyalso needs their internal package, so I wrote a small MATH-500 script that copies its prompt, sampling and vLLM settings.- Rebuild it yourself with
exp8_math/code/apply_edit.py(base revision2fc06364). The script checks every tensor's hash.
License
The base model is Apache 2.0 ยฉ Qwen (LICENSE). This is a modified version: 2 tensors changed. The edit is CC BY 4.0, by the authors above.
@misc{takehi2026weightspace,
title = {Sparks of Weight-Space Programming: LLMs can natively read \& write neural network weights},
author = {Takehi, Rikiya and Teoh, Jayden and Zhang, Alex and Khattab, Omar},
year = {2026},
url = {https://rikiyat.github.io/blog/weight-space-programming/}
}
- Downloads last month
- 113