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-l00 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use emrekuruu/RetrievalRouter-lambda-l00 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="emrekuruu/RetrievalRouter-lambda-l00", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("emrekuruu/RetrievalRouter-lambda-l00", trust_remote_code=True, device_map="auto") - PEFT
How to use emrekuruu/RetrievalRouter-lambda-l00 with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
| """IRouterLM 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 IRouterLMConfig(PretrainedConfig): | |
| """Configuration for IRouterLM - a RAG strategy router model.""" | |
| model_type = "irouterlm" | |
| 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 | |