Text Classification
Scikit-learn
Joblib
English
llm-routing
model-selection
budget-optimization
nearest-neighbor
Instructions to use JiaqiXue/R2-Router-RouterArena with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use JiaqiXue/R2-Router-RouterArena with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("JiaqiXue/R2-Router-RouterArena", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
docs: change example query to Solve this integral
Browse files
README.md
CHANGED
|
@@ -65,7 +65,7 @@ sys.path.insert(0, path)
|
|
| 65 |
from router import R2Router
|
| 66 |
|
| 67 |
router = R2Router.from_pretrained(path, embed_url="http://localhost:8000")
|
| 68 |
-
result = router.route_text("
|
| 69 |
print(f"Model: {result['model_full_name']}, Budget: {result['token_limit']}")
|
| 70 |
print(f"Estimated Quality: {result['predicted_quality']:.3f}, Estimated Cost: ${result['predicted_cost']:.6f}")
|
| 71 |
```
|
|
|
|
| 65 |
from router import R2Router
|
| 66 |
|
| 67 |
router = R2Router.from_pretrained(path, embed_url="http://localhost:8000")
|
| 68 |
+
result = router.route_text("Solve this integral")
|
| 69 |
print(f"Model: {result['model_full_name']}, Budget: {result['token_limit']}")
|
| 70 |
print(f"Estimated Quality: {result['predicted_quality']:.3f}, Estimated Cost: ${result['predicted_cost']:.6f}")
|
| 71 |
```
|