Instructions to use illegalcall/Qwen3.5-9B-RYS-0-4-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use illegalcall/Qwen3.5-9B-RYS-0-4-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="illegalcall/Qwen3.5-9B-RYS-0-4-GGUF", filename="Qwen3.5-9B-RYS-0-4.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use illegalcall/Qwen3.5-9B-RYS-0-4-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf illegalcall/Qwen3.5-9B-RYS-0-4-GGUF # Run inference directly in the terminal: llama-cli -hf illegalcall/Qwen3.5-9B-RYS-0-4-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf illegalcall/Qwen3.5-9B-RYS-0-4-GGUF # Run inference directly in the terminal: llama-cli -hf illegalcall/Qwen3.5-9B-RYS-0-4-GGUF
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf illegalcall/Qwen3.5-9B-RYS-0-4-GGUF # Run inference directly in the terminal: ./llama-cli -hf illegalcall/Qwen3.5-9B-RYS-0-4-GGUF
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf illegalcall/Qwen3.5-9B-RYS-0-4-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf illegalcall/Qwen3.5-9B-RYS-0-4-GGUF
Use Docker
docker model run hf.co/illegalcall/Qwen3.5-9B-RYS-0-4-GGUF
- LM Studio
- Jan
- vLLM
How to use illegalcall/Qwen3.5-9B-RYS-0-4-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "illegalcall/Qwen3.5-9B-RYS-0-4-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "illegalcall/Qwen3.5-9B-RYS-0-4-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/illegalcall/Qwen3.5-9B-RYS-0-4-GGUF
- Ollama
How to use illegalcall/Qwen3.5-9B-RYS-0-4-GGUF with Ollama:
ollama run hf.co/illegalcall/Qwen3.5-9B-RYS-0-4-GGUF
- Unsloth Studio new
How to use illegalcall/Qwen3.5-9B-RYS-0-4-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for illegalcall/Qwen3.5-9B-RYS-0-4-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for illegalcall/Qwen3.5-9B-RYS-0-4-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for illegalcall/Qwen3.5-9B-RYS-0-4-GGUF to start chatting
- Pi new
How to use illegalcall/Qwen3.5-9B-RYS-0-4-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf illegalcall/Qwen3.5-9B-RYS-0-4-GGUF
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "illegalcall/Qwen3.5-9B-RYS-0-4-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use illegalcall/Qwen3.5-9B-RYS-0-4-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf illegalcall/Qwen3.5-9B-RYS-0-4-GGUF
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:8080/v1 hermes config set model.default illegalcall/Qwen3.5-9B-RYS-0-4-GGUF
Run Hermes
hermes
- Docker Model Runner
How to use illegalcall/Qwen3.5-9B-RYS-0-4-GGUF with Docker Model Runner:
docker model run hf.co/illegalcall/Qwen3.5-9B-RYS-0-4-GGUF
- Lemonade
How to use illegalcall/Qwen3.5-9B-RYS-0-4-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull illegalcall/Qwen3.5-9B-RYS-0-4-GGUF
Run and chat with the model
lemonade run user.Qwen3.5-9B-RYS-0-4-GGUF-{{QUANT_TAG}}List all available models
lemonade list
Qwen3.5-9B-RYS-0-4 (GGUF)
An experimental model created by duplicating layers 0-3 in Qwen3.5-9B using the RYS (Repeat Your Self) method.
What This Is
The base Qwen3.5-9B model (32 layers) with layers 0-3 physically duplicated, creating a 36-layer model. The forward pass executes: layers 0,1,2,3 → 0,1,2,3 (again) → 4,5,...,31.
No training, no fine-tuning, no weight changes — just architectural routing.
Method
Built using llm-circuit-finder:
python layer_path.py Qwen3.5-9B-Q4_K_M.gguf \
Qwen3.5-9B-RYS-0-4.gguf \
-p "0..3,0,1,2,3,4..31" -v
Architecture Discovery
Qwen 3.5 uses a hybrid [DeltaNet, DeltaNet, DeltaNet, Attention] repeating pattern (4-layer cycles). Layer duplication must use block sizes that are multiples of 4 to preserve this pattern — block size 3 crashes with "missing tensor" errors.
This is the first known application of the RYS method to a hybrid DeltaNet/Attention architecture.
Fair Evaluation Results (max_tokens=4096, no think-tag stripping)
| Model | Code Gen | Hallucination Resistance | Reasoning | Overall |
|---|---|---|---|---|
| Baseline (32 layers) | 80% | 40% | 100% | 73.3% |
| RYS (0,4) (36 layers) | 60% | 80% | 100% | 80.0% |
Tested with 15 questions (5 code generation, 5 hallucination detection, 5 reasoning). Both models evaluated under identical conditions.
Key finding: The improvement is primarily in hallucination resistance (+40 percentage points). Code generation shows a tradeoff (-20 percentage points). Reasoning is unchanged.
Important caveats:
- Sample size is small (5 questions per category) — results need validation with larger benchmarks
- The improvement may be related to response generation behavior rather than capability differences
- The original RYS method was validated on standard transformer architectures (72B+ models); Qwen 3.5's hybrid DeltaNet architecture is untested territory
- Side-by-side testing on harder hallucination prompts showed identical responses from both models
Circuit Map of Qwen 3.5-9B
Full sweep results (7 configurations tested):
| Config | Code | Hallucination | Reasoning | Overall | vs Baseline |
|---|---|---|---|---|---|
| Baseline | 80% | 40% | 100% | 73.3% | — |
| (0,4) | 60% | 80% | 100% | 80.0% | +6.67% |
| (4,8) | 80% | 60% | 80% | 73.3% | +0.00% |
| (8,12) | 0% | 40% | 80% | 40.0% | -33.33% |
| (12,16) | 0% | 60% | 80% | 46.7% | -26.67% |
| (16,20) | 0% | 40% | 100% | 46.7% | -26.67% |
| (20,24) | 60% | 60% | 100% | 73.3% | +0.00% |
Usage
# With llama.cpp
llama-server -m Qwen3.5-9B-RYS-0-4.gguf -c 8192 -ngl 99
# With Ollama (create a Modelfile)
echo 'FROM ./Qwen3.5-9B-RYS-0-4.gguf' > Modelfile
ollama create qwen35-rys -f Modelfile
ollama run qwen35-rys
Specifications
- Base model: Qwen/Qwen3.5-9B
- Quantization: Q4_K_M
- Original layers: 32
- Modified layers: 36 (layers 0-3 duplicated)
- File size: ~6.2 GB
- Extra VRAM: ~0.5 GB over base model
- Inference overhead: ~12% slower
References
License
Apache 2.0 (same as base model)
- Downloads last month
- 28
We're not able to determine the quantization variants.