Text Classification
Transformers
Safetensors
PEFT
English
retrievalrouter
feature-extraction
retrieval
document-retrieval
information-retrieval
routing
RAG
query-routing
late-interaction
lora
custom_code
Instructions to use emrekuruu/RetrievalRouter-lambda-l10 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use emrekuruu/RetrievalRouter-lambda-l10 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="emrekuruu/RetrievalRouter-lambda-l10", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("emrekuruu/RetrievalRouter-lambda-l10", trust_remote_code=True, device_map="auto") - PEFT
How to use emrekuruu/RetrievalRouter-lambda-l10 with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
File size: 1,016 Bytes
f06c8c5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | """RetrievalRouter Configuration."""
from transformers import PretrainedConfig
# Standalone copy of train.config.ARM_NAMES: this module is uploaded to the Hub and loaded
# via trust_remote_code, so it cannot import from the training package.
STRATEGY_NAMES = ["MULTIMODAL_RERANK", "MULTIMODAL-SINGLE", "TEXT_RERANK", "TEXT-SINGLE", "BM25"]
class RetrievalRouterConfig(PretrainedConfig):
"""Configuration for RetrievalRouter - a query-aware retrieval router."""
model_type = "retrievalrouter"
def __init__(
self,
base_model_name: str = "Qwen/Qwen3-0.6B-Base",
hidden_size: int = 1024,
num_labels: int = 5,
classifier_dropout: float = 0.1,
strategy_names: list = None,
**kwargs,
):
super().__init__(num_labels=num_labels, **kwargs)
self.base_model_name = base_model_name
self.hidden_size = hidden_size
self.classifier_dropout = classifier_dropout
self.strategy_names = strategy_names or STRATEGY_NAMES
|