Instructions to use NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2") 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("NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2") model = AutoModelForMultimodalLM.from_pretrained("NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2", 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
- llama.cpp
How to use NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0 # Run inference directly in the terminal: llama cli -hf NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0 # Run inference directly in the terminal: llama cli -hf NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0
Use Docker
docker model run hf.co/NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2", "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/NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0
- SGLang
How to use NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2 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 "NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2" \ --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": "NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2", "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 "NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2" \ --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": "NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2", "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" } } ] } ] }' - Ollama
How to use NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2 with Ollama:
ollama run hf.co/NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0
- Unsloth Desktop
- Pi
How to use NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2 with Docker Model Runner:
docker model run hf.co/NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0
- Lemonade
How to use NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0
Run and chat with the model
lemonade run user.Qwen3.5-0.8B-Python-SoftMoE-v2-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "NikitaLazarev/Qwen3.5-0.8B-Python-SoftMoE-v2:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Qwen3.5-0.8B (e2e pilot) โ Soft MoE expert ยซPython language & PEPs (RAG v2)ยป
EN
A soft MoE domain expert derived from a dense model without any training (weight-space steering): the domain direction dฬ is extracted via an activation scan (mean hidden-state difference between domain and contrast prompts) and baked into the weights with a rank-one steer patch on the output matrices (down_proj/o_proj/out_proj) of the selected layers:
- base model:
Qwen/Qwen3.5-0.8B - theme (domain): Python language & PEPs (RAG v2) โ Domain prompts sampled from the platform RAG corpus: official Python docs EPUB + PEPs (30 chunks). V2 rebuild experiment.
- patch mode:
steer, alpha = 0.1 - layers: [15, 16, 17, 18, 20, 21, 22, 23]
- scan gate: AUC = 1.0 (PASS)
An embedding-space router (cosine margin) picks this build instead of the base model for requests matching the theme.
Method
Inspired by Weight-Space Programming (Takeyama et al., MIT CSAIL, 2026): weight edits without gradients. Ivanna Lab extension: the inverse operation โ instead of ablating a behavior, a domain direction is steer-amplified and baked into the weights (works where inference hooks are unavailable).
Created with Ivanna Lab โ self-hosted LLM model lab.
Notes
V2 rebuild: activation scan on 30 domain prompts sampled from the platform RAG corpus (official Python docs EPUB + PEPs), steer alpha=0.1, position=last. Benchmark: code2text_python (CodeXGLUE) BLEU-4 = 1.0534 on 150 samples โ best of the tested grid (vanilla base 1.0519, alpha=0.2 build 1.0289). Tested in Ivanna Lab: https://github.com/wiskeone/ivanna-lab
Benchmark results
Tested in Ivanna Lab (self-hosted LLM model lab, GitHub)
with its built-in benchmarks module (lm-eval-harness). Task: code2text_python (CodeXGLUE),
smoothed BLEU-4, 150 samples, greedy decode:
| Build | BLEU-4 |
|---|---|
| This model (RAG-sampled prompts, alpha=0.1, position=last) | 1.0534 |
| alpha=0.1, weight_lab prompts, position=last | 1.0525 |
| vanilla base (Qwen3.5-0.8B) | 1.0519 |
| alpha=0.1, RAG prompts, position=mean | 1.0436 |
| alpha=0.2, weight_lab prompts, position=last | 1.0289 |
| alpha=0.2, weight_lab prompts, position=mean | 1.0167 |
HumanEval (164, full) is identical for base and expert (0.2256) โ the steer patch is safe for general coding. Deltas on standard benches are small: the docs-direction targets style adherence, measured properly by domain-native benchmarks.
GGUF
qwen3.5-0.8b-python-softmoe-v2-q8_0.gguf โ Q8_0 quantization converted with llama.cpp (convert_hf_to_gguf.py). Runs in llama.cpp / LM Studio / Ollama directly โ the steer patch is baked into the weights.
RU
ะัะณะบะธะน MoE-ัะบัะฟะตัั, ะฟะพะปััะตะฝะฝัะน ะธะท ะฟะปะพัะฝะพะน ะผะพะดะตะปะธ ะฑะตะท ะดะพะพะฑััะตะฝะธั (weight-space steering): ะฝะฐะฟัะฐะฒะปะตะฝะธะต ะดะพะผะตะฝะฐ dฬ ะฒัะดะตะปะตะฝะพ ะฐะบัะธะฒะฐัะธะพะฝะฝัะผ ัะบะฐะฝะพะผ (ัะฐะทะฝะพััั ััะตะดะฝะธั hidden states ะดะพะผะตะฝะฝัั vs ะบะพะฝััะฐััะฝัั ะฟัะพะผะฟัะพะฒ) ะธ ะฒัะธัะพ steer-ะฟะฐััะตะผ ะฒ ะฒัั ะพะดะฝัะต ะผะฐััะธัั (down_proj/o_proj/out_proj) ะฒัะฑัะฐะฝะฝัั ัะปะพัะฒ:
- ะฑะฐะทะพะฒะฐั ะผะพะดะตะปั:
Qwen/Qwen3.5-0.8B - ัะตะผะฐ (ะดะพะผะตะฝ): Python language & PEPs (RAG v2) โ Domain prompts sampled from the platform RAG corpus: official Python docs EPUB + PEPs (30 chunks). V2 rebuild experiment.
- ัะตะถะธะผ:
steer, ฮฑ = 0.1 - ัะปะพะธ: [15, 16, 17, 18, 20, 21, 22, 23]
- ะณะตะนั ัะบะฐะฝะฐ: AUC = 1.0 (PASS)
ะ ะพััะตั (ัะผะฑะตะดะดะธะฝะณะธ + margin) ะฒัะฑะธัะฐะตั ััั ัะฑะพัะบั ะฒะผะตััะพ ะฑะฐะทะพะฒะพะน ะดะปั ะทะฐะฟัะพัะพะฒ ัะตะผั.
ะะตัะพะด
ะะดะพั ะฝะพะฒะปะตะฝะพ Weight-Space Programming (Takeyama et al., MIT CSAIL, 2026): ะฟัะฐะฒะบะธ ะฒะตัะพะฒ ะฑะตะท ะณัะฐะดะธะตะฝัะพะฒ. ะ ะฐััะธัะตะฝะธะต ะปะฐะฑั Ivanna: ะพะฑัะฐัะฝะฐั ะพะฟะตัะฐัะธั โ ะฝะต ะฐะฑะปััะธั ะฟะพะฒะตะดะตะฝะธั, ะฐ steer-ััะธะปะตะฝะธะต ะดะพะผะตะฝะฝะพะณะพ ะฝะฐะฟัะฐะฒะปะตะฝะธั, ะฒัะธัะพะต ะฒ ะฒะตัะฐ (ัะฐะฑะพัะฐะตั ัะฐะผ, ะณะดะต ะธะฝัะตัะตะฝั-ั ัะบะธ ะฝะตะดะพัััะฟะฝั).
- Downloads last month
- 125
