Add link to github (#1)
Browse files- Add link to github (0105313c0a72dca7ffe83b4175db0e58bbd1fe2f)
Co-authored-by: Niels Rogge <[email protected]>
README.md
CHANGED
|
@@ -1,19 +1,18 @@
|
|
| 1 |
---
|
| 2 |
-
license: other
|
| 3 |
-
license_name: katanemo-research
|
| 4 |
-
license_link: >-
|
| 5 |
-
https://huggingface.co/katanemo/Arch-Router-1.5B/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 |
tags:
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
paper: https://arxiv.org/abs/2506.16655
|
| 18 |
---
|
| 19 |
|
|
@@ -47,7 +46,6 @@ The code of Arch-Router-1.5B has been in the Hugging Face `transformers` library
|
|
| 47 |
pip install transformers>=4.37.0
|
| 48 |
```
|
| 49 |
|
| 50 |
-
|
| 51 |
# How to use
|
| 52 |
We use the following example to illustrate how to use our model to perform routing tasks. Please note that, our model works best with our provided prompt format.
|
| 53 |
### Quickstart
|
|
@@ -67,11 +65,15 @@ TASK_INSTRUCTION = """
|
|
| 67 |
You are a helpful assistant designed to find the best suited route.
|
| 68 |
You are provided with route description within <routes></routes> XML tags:
|
| 69 |
<routes>
|
| 70 |
-
|
|
|
|
|
|
|
| 71 |
</routes>
|
| 72 |
|
| 73 |
<conversation>
|
| 74 |
-
|
|
|
|
|
|
|
| 75 |
</conversation>
|
| 76 |
"""
|
| 77 |
|
|
@@ -85,7 +87,6 @@ Based on your analysis, provide your response in the following JSON formats if y
|
|
| 85 |
{"route": "route_name"}
|
| 86 |
"""
|
| 87 |
|
| 88 |
-
|
| 89 |
# Define route config
|
| 90 |
route_config = [
|
| 91 |
{
|
|
@@ -110,7 +111,6 @@ route_config = [
|
|
| 110 |
},
|
| 111 |
]
|
| 112 |
|
| 113 |
-
|
| 114 |
# Helper function to create the system prompt for our model
|
| 115 |
def format_prompt(
|
| 116 |
route_config: List[Dict[str, Any]], conversation: List[Dict[str, Any]]
|
|
@@ -122,7 +122,6 @@ def format_prompt(
|
|
| 122 |
+ FORMAT_PROMPT
|
| 123 |
)
|
| 124 |
|
| 125 |
-
|
| 126 |
# Define conversations
|
| 127 |
|
| 128 |
conversation = [
|
|
@@ -168,4 +167,6 @@ Then you should be able to see the following output string in JSON format:
|
|
| 168 |
To better understand how to create the route descriptions, please take a look at our [Katanemo API](https://docs.archgw.com/guides/llm_router.html).
|
| 169 |
|
| 170 |
# License
|
| 171 |
-
Katanemo Arch-Router model is distributed under the [Katanemo license](https://huggingface.co/katanemo/Arch-Router-1.5B/blob/main/LICENSE).
|
|
|
|
|
|
|
|
|
| 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/blob/main/LICENSE
|
| 10 |
+
pipeline_tag: text-generation
|
| 11 |
tags:
|
| 12 |
+
- routing
|
| 13 |
+
- preference
|
| 14 |
+
- arxiv:2506.16655
|
| 15 |
+
- llm
|
| 16 |
paper: https://arxiv.org/abs/2506.16655
|
| 17 |
---
|
| 18 |
|
|
|
|
| 46 |
pip install transformers>=4.37.0
|
| 47 |
```
|
| 48 |
|
|
|
|
| 49 |
# How to use
|
| 50 |
We use the following example to illustrate how to use our model to perform routing tasks. Please note that, our model works best with our provided prompt format.
|
| 51 |
### Quickstart
|
|
|
|
| 65 |
You are a helpful assistant designed to find the best suited route.
|
| 66 |
You are provided with route description within <routes></routes> XML tags:
|
| 67 |
<routes>
|
| 68 |
+
|
| 69 |
+
{routes}
|
| 70 |
+
|
| 71 |
</routes>
|
| 72 |
|
| 73 |
<conversation>
|
| 74 |
+
|
| 75 |
+
{conversation}
|
| 76 |
+
|
| 77 |
</conversation>
|
| 78 |
"""
|
| 79 |
|
|
|
|
| 87 |
{"route": "route_name"}
|
| 88 |
"""
|
| 89 |
|
|
|
|
| 90 |
# Define route config
|
| 91 |
route_config = [
|
| 92 |
{
|
|
|
|
| 111 |
},
|
| 112 |
]
|
| 113 |
|
|
|
|
| 114 |
# Helper function to create the system prompt for our model
|
| 115 |
def format_prompt(
|
| 116 |
route_config: List[Dict[str, Any]], conversation: List[Dict[str, Any]]
|
|
|
|
| 122 |
+ FORMAT_PROMPT
|
| 123 |
)
|
| 124 |
|
|
|
|
| 125 |
# Define conversations
|
| 126 |
|
| 127 |
conversation = [
|
|
|
|
| 167 |
To better understand how to create the route descriptions, please take a look at our [Katanemo API](https://docs.archgw.com/guides/llm_router.html).
|
| 168 |
|
| 169 |
# License
|
| 170 |
+
Katanemo Arch-Router model is distributed under the [Katanemo license](https://huggingface.co/katanemo/Arch-Router-1.5B/blob/main/LICENSE).
|
| 171 |
+
|
| 172 |
+
GitHub: https://github.com/katanemo/arch
|