Text Classification
Transformers
ONNX
Safetensors
English
llama
router
small-model
tiny-model
english
34m
query-routing
llm-router
model-routing
intent-classification
prompt-classification
sequence-classification
cpu
offline
local-ai
text-embeddings-inference
Instructions to use vrishv/router-34M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vrishv/router-34M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="vrishv/router-34M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("vrishv/router-34M") model = AutoModelForSequenceClassification.from_pretrained("vrishv/router-34M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from vrishv/router-34M: direct link, hf CLI and curl.
- Browser
- Download file 907 Bytes
-
https://huggingface.co/vrishv/router-34M/resolve/main/config.json
- Command line
-
hf download hf://vrishv/router-34M/config.json
-
curl -L -o config.json https://huggingface.co/vrishv/router-34M/resolve/main/config.json
907 Bytes
| { | |
| "architectures": [ | |
| "LlamaForSequenceClassification" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 0, | |
| "dtype": "float32", | |
| "eos_token_id": 0, | |
| "head_dim": 64, | |
| "hidden_act": "silu", | |
| "hidden_size": 512, | |
| "id2label": { | |
| "0": "chat", | |
| "1": "science", | |
| "2": "maths", | |
| "3": "code" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 1408, | |
| "label2id": { | |
| "chat": 0, | |
| "code": 3, | |
| "maths": 2, | |
| "science": 1 | |
| }, | |
| "max_position_embeddings": 256, | |
| "mlp_bias": false, | |
| "model_type": "llama", | |
| "num_attention_heads": 8, | |
| "num_hidden_layers": 8, | |
| "num_key_value_heads": 8, | |
| "pad_token_id": 0, | |
| "pretraining_tp": 1, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "rope_theta": 10000.0, | |
| "rope_type": "default" | |
| }, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.22.1", | |
| "use_cache": true, | |
| "vocab_size": 16000 | |
| } | |