Instructions to use katanemo/Arch-Router-1.5B.gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use katanemo/Arch-Router-1.5B.gguf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="katanemo/Arch-Router-1.5B.gguf") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("katanemo/Arch-Router-1.5B.gguf", dtype="auto") - llama-cpp-python
How to use katanemo/Arch-Router-1.5B.gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="katanemo/Arch-Router-1.5B.gguf", filename="Arch-Router-1.5B-Q2_K.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 katanemo/Arch-Router-1.5B.gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf katanemo/Arch-Router-1.5B.gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf katanemo/Arch-Router-1.5B.gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf katanemo/Arch-Router-1.5B.gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf katanemo/Arch-Router-1.5B.gguf: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 katanemo/Arch-Router-1.5B.gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf katanemo/Arch-Router-1.5B.gguf: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 katanemo/Arch-Router-1.5B.gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf katanemo/Arch-Router-1.5B.gguf:Q4_K_M
Use Docker
docker model run hf.co/katanemo/Arch-Router-1.5B.gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use katanemo/Arch-Router-1.5B.gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "katanemo/Arch-Router-1.5B.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": "katanemo/Arch-Router-1.5B.gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/katanemo/Arch-Router-1.5B.gguf:Q4_K_M
- SGLang
How to use katanemo/Arch-Router-1.5B.gguf 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 "katanemo/Arch-Router-1.5B.gguf" \ --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": "katanemo/Arch-Router-1.5B.gguf", "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 "katanemo/Arch-Router-1.5B.gguf" \ --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": "katanemo/Arch-Router-1.5B.gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use katanemo/Arch-Router-1.5B.gguf with Ollama:
ollama run hf.co/katanemo/Arch-Router-1.5B.gguf:Q4_K_M
- Unsloth Studio new
How to use katanemo/Arch-Router-1.5B.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 katanemo/Arch-Router-1.5B.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 katanemo/Arch-Router-1.5B.gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for katanemo/Arch-Router-1.5B.gguf to start chatting
- Pi new
How to use katanemo/Arch-Router-1.5B.gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf katanemo/Arch-Router-1.5B.gguf: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": "katanemo/Arch-Router-1.5B.gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use katanemo/Arch-Router-1.5B.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 katanemo/Arch-Router-1.5B.gguf: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 katanemo/Arch-Router-1.5B.gguf:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use katanemo/Arch-Router-1.5B.gguf with Docker Model Runner:
docker model run hf.co/katanemo/Arch-Router-1.5B.gguf:Q4_K_M
- Lemonade
How to use katanemo/Arch-Router-1.5B.gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull katanemo/Arch-Router-1.5B.gguf:Q4_K_M
Run and chat with the model
lemonade run user.Arch-Router-1.5B.gguf-Q4_K_M
List all available models
lemonade list
Add links to paper page, Github repository and project page
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,14 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
license: other
|
| 3 |
-
license_name: katanemo-research
|
| 4 |
-
license_link: >-
|
| 5 |
-
https://huggingface.co/katanemo/Arch-Router-1.5B.gguf/blob/main/LICENSE
|
| 6 |
base_model:
|
| 7 |
- Qwen/Qwen2.5-1.5B-Instruct
|
| 8 |
language:
|
| 9 |
- en
|
| 10 |
-
pipeline_tag: text-generation
|
| 11 |
library_name: transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
# katanemo/Arch-Router-1.5B
|
|
@@ -19,7 +18,7 @@ With the rapid proliferation of large language models (LLMs) -- each optimized f
|
|
| 19 |
|
| 20 |
We introduce a preference-aligned routing framework that guides model selection by matching queries to user-defined domains (e.g., travel) or action types (e.g., image editing) -- offering a practical mechanism to encode preferences in routing decisions. Specifically, we introduce Arch-Router, a compact 1.5B model that learns to map queries to domain-action preferences for model routing decisions. Experiments on conversational datasets demonstrate that our approach achieves state-of-the-art (SOTA) results in matching queries with human preferences, outperforming top proprietary models.
|
| 21 |
|
| 22 |
-
This model is described in the paper: https://arxiv.org/abs/2506.16655, and powers [Arch](https://github.com/katanemo/arch) the open-source AI-native proxy for agents to enable preference-based routing in a seamless way.
|
| 23 |
|
| 24 |
### How It Works
|
| 25 |
|
|
@@ -62,11 +61,15 @@ TASK_INSTRUCTION = """
|
|
| 62 |
You are a helpful assistant designed to find the best suited route.
|
| 63 |
You are provided with route description within <routes></routes> XML tags:
|
| 64 |
<routes>
|
| 65 |
-
|
|
|
|
|
|
|
| 66 |
</routes>
|
| 67 |
|
| 68 |
<conversation>
|
| 69 |
-
|
|
|
|
|
|
|
| 70 |
</conversation>
|
| 71 |
"""
|
| 72 |
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
base_model:
|
| 3 |
- Qwen/Qwen2.5-1.5B-Instruct
|
| 4 |
language:
|
| 5 |
- en
|
|
|
|
| 6 |
library_name: transformers
|
| 7 |
+
license: other
|
| 8 |
+
license_name: katanemo-research
|
| 9 |
+
license_link: https://huggingface.co/katanemo/Arch-Router-1.5B.gguf/blob/main/LICENSE
|
| 10 |
+
pipeline_tag: text-generation
|
| 11 |
---
|
| 12 |
|
| 13 |
# katanemo/Arch-Router-1.5B
|
|
|
|
| 18 |
|
| 19 |
We introduce a preference-aligned routing framework that guides model selection by matching queries to user-defined domains (e.g., travel) or action types (e.g., image editing) -- offering a practical mechanism to encode preferences in routing decisions. Specifically, we introduce Arch-Router, a compact 1.5B model that learns to map queries to domain-action preferences for model routing decisions. Experiments on conversational datasets demonstrate that our approach achieves state-of-the-art (SOTA) results in matching queries with human preferences, outperforming top proprietary models.
|
| 20 |
|
| 21 |
+
This model is described in the paper: https://arxiv.org/abs/2506.16655, and powers [Arch](https://github.com/katanemo/arch) the open-source AI-native proxy for agents to enable preference-based routing in a seamless way. The project page can be found at https://archgw.com/.
|
| 22 |
|
| 23 |
### How It Works
|
| 24 |
|
|
|
|
| 61 |
You are a helpful assistant designed to find the best suited route.
|
| 62 |
You are provided with route description within <routes></routes> XML tags:
|
| 63 |
<routes>
|
| 64 |
+
|
| 65 |
+
{routes}
|
| 66 |
+
|
| 67 |
</routes>
|
| 68 |
|
| 69 |
<conversation>
|
| 70 |
+
|
| 71 |
+
{conversation}
|
| 72 |
+
|
| 73 |
</conversation>
|
| 74 |
"""
|
| 75 |
|