Text Generation
Transformers
Safetensors
GGUF
English
Thai
qwen3_5_moe_text
qwen
Mixture of Experts
mixture-of-experts
agent
agent-world
tool-use
tool-calling
reasoning
sft
distillation
svd
lora
weight-diff
ornith
thai
conversational
Instructions to use hotdogs/Qwen35b-agent-R2O3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hotdogs/Qwen35b-agent-R2O3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hotdogs/Qwen35b-agent-R2O3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hotdogs/Qwen35b-agent-R2O3") model = AutoModelForCausalLM.from_pretrained("hotdogs/Qwen35b-agent-R2O3") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use hotdogs/Qwen35b-agent-R2O3 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="hotdogs/Qwen35b-agent-R2O3", filename="GGUF-MTP/Qwen35b-agent-R2O3-MTP.Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use hotdogs/Qwen35b-agent-R2O3 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 hotdogs/Qwen35b-agent-R2O3:Q4_K_M # Run inference directly in the terminal: llama cli -hf hotdogs/Qwen35b-agent-R2O3:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf hotdogs/Qwen35b-agent-R2O3:Q4_K_M # Run inference directly in the terminal: llama cli -hf hotdogs/Qwen35b-agent-R2O3:Q4_K_M
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 hotdogs/Qwen35b-agent-R2O3:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf hotdogs/Qwen35b-agent-R2O3:Q4_K_M
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 hotdogs/Qwen35b-agent-R2O3:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf hotdogs/Qwen35b-agent-R2O3:Q4_K_M
Use Docker
docker model run hf.co/hotdogs/Qwen35b-agent-R2O3:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use hotdogs/Qwen35b-agent-R2O3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hotdogs/Qwen35b-agent-R2O3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hotdogs/Qwen35b-agent-R2O3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hotdogs/Qwen35b-agent-R2O3:Q4_K_M
- SGLang
How to use hotdogs/Qwen35b-agent-R2O3 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 "hotdogs/Qwen35b-agent-R2O3" \ --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": "hotdogs/Qwen35b-agent-R2O3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "hotdogs/Qwen35b-agent-R2O3" \ --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": "hotdogs/Qwen35b-agent-R2O3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use hotdogs/Qwen35b-agent-R2O3 with Ollama:
ollama run hf.co/hotdogs/Qwen35b-agent-R2O3:Q4_K_M
- Unsloth Studio
How to use hotdogs/Qwen35b-agent-R2O3 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 hotdogs/Qwen35b-agent-R2O3 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 hotdogs/Qwen35b-agent-R2O3 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for hotdogs/Qwen35b-agent-R2O3 to start chatting
- Pi
How to use hotdogs/Qwen35b-agent-R2O3 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf hotdogs/Qwen35b-agent-R2O3:Q4_K_M
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": "hotdogs/Qwen35b-agent-R2O3:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use hotdogs/Qwen35b-agent-R2O3 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf hotdogs/Qwen35b-agent-R2O3:Q4_K_M
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 hotdogs/Qwen35b-agent-R2O3:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use hotdogs/Qwen35b-agent-R2O3 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf hotdogs/Qwen35b-agent-R2O3:Q4_K_M
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:8080/v1 \ --custom-model-id "hotdogs/Qwen35b-agent-R2O3:Q4_K_M" \ --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"
- Docker Model Runner
How to use hotdogs/Qwen35b-agent-R2O3 with Docker Model Runner:
docker model run hf.co/hotdogs/Qwen35b-agent-R2O3:Q4_K_M
- Lemonade
How to use hotdogs/Qwen35b-agent-R2O3 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull hotdogs/Qwen35b-agent-R2O3:Q4_K_M
Run and chat with the model
lemonade run user.Qwen35b-agent-R2O3-Q4_K_M
List all available models
lemonade list
| license: agpl-3.0 | |
| language: | |
| - en | |
| - th | |
| tags: | |
| - qwen | |
| - moe | |
| - mixture-of-experts | |
| - agent | |
| - agent-world | |
| - tool-use | |
| - tool-calling | |
| - reasoning | |
| - sft | |
| - distillation | |
| - svd | |
| - lora | |
| - weight-diff | |
| - ornith | |
| - transformers | |
| - text-generation | |
| - thai | |
| base_model: | |
| - hotdogs/Qwen35B-Agent-R2 | |
| datasets: | |
| - deepreinforce-ai/Ornith-1.0-35B | |
| - hotdogs/uka-fable-reasoning | |
| - 11-47/claude_opus_4.8_max_thinking_5k_v2 | |
| - cx-cmu/agent_trajectories | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| <p align="center"> | |
| <img src="https://img.shields.io/badge/license-AGPL--3.0-red"> | |
| <img src="https://img.shields.io/badge/Qwen3.5-35B%20A3B-blue"> | |
| <img src="https://img.shields.io/badge/MoE-256%20experts-orange"> | |
| <img src="https://img.shields.io/badge/SVD-LoRA-ff69b4"> | |
| <img src="https://img.shields.io/badge/Ornith-0.3-green"> | |
| <img src="https://img.shields.io/badge/Agent-R2O3-black"> | |
| </p> | |
| <p align="center"><b>π Qwen35b-Agent-R2O3 β Agent-R2 + Ornith (Ξ±=0.3)</b></p> | |
| <p align="center"><i>Built on Qwen35B-Agent-R2 with SVD-extracted Ornith LoRA. The best of both worlds.</i></p> | |
| --- | |
| ## 𧬠How This Model Was Built | |
| ``` | |
| βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| β Qwen35b-Agent-R2O3 Construction β | |
| βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ | |
| β β | |
| β Qwen35B-Agent-R2 (Base) ββββββββββ 70% weights kept β | |
| β β β | |
| β βββ 7 LoRAs already fused: β | |
| β β Opus | Fable | Routing | Tool | Math | Mythos β | |
| β β | ToolFmt (all trained via SFT) β | |
| β β β | |
| β βββ + Ornith LoRA (Ξ±=0.3) β SVD Weight-Diff β | |
| β β | |
| β Ornith-1.0-35B Qwen-AgentWorld β | |
| β β β β | |
| β βββββββββ Weight-Diff SVD βββββββββββββββ β | |
| β β β | |
| β ββββββββ΄βββββββ β | |
| β β LoRA r=32 β β Merged at Ξ±=0.3 β | |
| β β 422 tensorsβ β | |
| β βββββββββββββββ β | |
| β β | |
| βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| ``` | |
| ### Step 1: SVD Weight-Diff Extraction | |
| We extract **Ornith's unique knowledge** by computing the weight difference between Ornith-1.0-35B and the shared Huihui-Qwen-AgentWorld base: | |
| ```python | |
| delta = W_ornith - W_base # What Ornith learned | |
| U, S, Vh = torch.linalg.svd(delta) # Decompose | |
| lora_A = diag(S[:32].sqrt()) @ Vh[:32, :] | |
| lora_B = U[:, :32] @ diag(S[:32].sqrt()) | |
| ``` | |
| **422 tensors** extracted across: | |
| - **MLP layers** (`gate_proj`, `up_proj`, `down_proj`) β knowledge execution | |
| - **Expert weights** (256 MoE experts) β specialized routing (3D tensor β flatten β SVD β reshape) | |
| - **Shared expert** β common computation | |
| - **Norms + lm_head** β output calibration | |
| - **Attention layers skipped** β R2 uses `linear_attn` vs Ornith's `self_attn` (incompatible architecture) | |
| ### Step 2: Multi-LoRA Fusion | |
| The extracted Ornith LoRA (r=32, Ξ±=64) is merged into Qwen35B-Agent-R2 at **scale Ξ±=0.3**: | |
| ```python | |
| merged = R2 * 0.7 + Ornith_LoRA * 0.3 | |
| ``` | |
| This preserves **70% of R2's original capabilities** (its 7 LoRAs) while adding **30% of Ornith's algorithm/reasoning strength**. | |
| ### Why Ξ±=0.3? | |
| | Scale | R2 Preserved | Ornith Added | Best For | | |
| |:-----:|:------------:|:------------:|:---------| | |
| | 0.3 | 70% | 30% | Balanced β general agent use | | |
| | 0.4 | 60% | 40% | Algorithm-heavy tasks | | |
| | 0.5+ | <50% | >50% |β οΈ May dilute tool-calling | | |
| --- | |
| ## π¬ Technique: SVD Weight-Diff for MoE | |
| MoE models (256 experts) require special handling for SVD extraction: | |
| | Component | Standard Approach | MoE Adaptation | | |
| |:----------|:-----------------:|:---------------| | |
| | **2D tensors** (MLP, norms) | `SVD(delta)` β normal | Same | | |
| | **3D expert tensors** `[out, in, 256]` | N/A | `flatten β SVD β reshape` | | |
| | **Attention mismatch** | Direct diff | β Skipped (R2 uses `linear_attn`) | | |
| | **language_model prefix** | Exact match | Strip prefix after loading | | |
| **Expert tensor handling:** | |
| ```python | |
| delta = W_a - W_b # [512, 2048, 256] | |
| delta_flat = delta.transpose(0,2).reshape(-1, delta.shape[1]) # [131072, 2048] | |
| U, S, Vh = torch.linalg.svd(delta_flat) | |
| lora_B = U[:, :32] @ diag(S[:32].sqrt()) # [131072, 32] | |
| # On merge: reconstruct | |
| delta = lora_B @ lora_A # [131072, 2048] | |
| delta = delta.reshape(512, 256, 2048).permute(0, 2, 1) # [512, 2048, 256] | |
| ``` | |
| --- | |
| ## π What You Get | |
| | Capability | Source | Retained | | |
| |:-----------|:------:|:--------:| | |
| | π§ **Reasoning** (Opus 4.8) | R2 | β 100% | | |
| | π§ **Tool Calling** | R2 | β 100% | | |
| | π§ **Agent Routing** | R2 | β 100% | | |
| | π **Math** | R2 + Ornith | β Enhanced | | |
| | β‘ **Algorithm** | **Ornith** π | β **+30%** | | |
| | π¬ **Conversation** (Fable) | R2 | β 100% | | |
| | π **Creative** (Mythos) | R2 | β 100% | | |
| --- | |
| ## π Why Agent-R2O3? | |
| | Aspect | Other Models | **Agent-R2O3** | | |
| |--------|-------------|:--------------:| | |
| | Tool Call Format | β Often malformed | β **Guaranteed valid `<tool_call>`** | | |
| | Algorithm Tasks | β Struggles on hard | β **Orithm-enhanced** | | |
| | Thai Support | β Poor tokenization | β **Native Thai + English** | | |
| | Knowledge | β Single source | β **R2 (7 LoRAs) + Ornith** | | |
| --- | |
| ## π Usage | |
| ```bash | |
| # llama.cpp | |
| ./llama-cli -m Qwen35b-agent-R2O3.Q4_K_M.gguf \ | |
| -p "Hello" -n 100 --temp 0.6 | |
| # Full server with tool calling | |
| ./llama-server \ | |
| -m Qwen35b-agent-R2O3.Q4_K_M.gguf \ | |
| --host 0.0.0.0 --port 8081 -c 262144 -ngl 99 \ | |
| --cache-type-k bf16 --cache-type-v bf16 \ | |
| --flash-attn on --tools all --cont-batching \ | |
| --temp 0.6 --top-k 40 --top-p 0.9 \ | |
| --min-p 0.05 --repeat-penalty 1.03 \ | |
| --jinja | |
| ``` | |
| --- | |
| ## π¦ Downloads | |
| | File | Size | Quant | | |
| |:-----|:----:|:-----:| | |
| | `Qwen35b-agent-R2O3.Q4_K_M.gguf` | 20 GB | Recommended | | |
| | `Qwen35b-agent-R2O3.Q6_K.gguf` | 27 GB | High quality | | |
| | `Qwen35b-agent-R2O3.f16.gguf` | 65 GB | Full precision | | |
| --- | |
| ## π Acknowledgements | |
| | Contribution | Source | | |
| |:-------------|:-------| | |
| | **Base Agent Model** | [hotdogs/Qwen35B-Agent-R2](https://huggingface.co/hotdogs/Qwen35B-Agent-R2) | | |
| | **Algorithm Knowledge** | [deepreinforce-ai/Ornith-1.0-35B](https://huggingface.co/deepreinforce-ai/Ornith-1.0-35B) | | |
| | **SVD Extraction Method** | Weight-Diff SVD (Universial Adapter Extraction) | | |
| | **Infrastructure** | [Nous Research](https://nousresearch.com) β Hermes Agent | | |
| --- | |
| ## π Support | |
| <p align="center"> | |
| <img src="https://huggingface.co/hotdogs/Qwen35B-Agent-R2/raw/main/donate.webp" alt="Bitcoin QR" width="256"> | |
| </p> | |
| ``` | |
| bc1qf27cyk3vmugcdyv9xdtuv5jwz37863crpj5c9v | |
| ``` | |
| --- | |
| *Built with β€οΈ by **UKA** β 18-year-old coder & cybersecurity expert* | |