Text Generation
Transformers
TensorBoard
Safetensors
gemma3_text
trl
sft
gemma3
conversational
text-generation-inference
Instructions to use d-s-b/Router with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use d-s-b/Router with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="d-s-b/Router") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("d-s-b/Router") model = AutoModelForCausalLM.from_pretrained("d-s-b/Router", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use d-s-b/Router with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "d-s-b/Router" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "d-s-b/Router", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/d-s-b/Router
- SGLang
How to use d-s-b/Router with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "d-s-b/Router" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "d-s-b/Router", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "d-s-b/Router" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "d-s-b/Router", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use d-s-b/Router with Docker Model Runner:
docker model run hf.co/d-s-b/Router
Update README.md
Browse files
README.md
CHANGED
|
@@ -3,10 +3,12 @@ base_model: google/gemma-3-270m-it
|
|
| 3 |
library_name: transformers
|
| 4 |
model_name: Router
|
| 5 |
tags:
|
| 6 |
-
- generated_from_trainer
|
| 7 |
- trl
|
| 8 |
- sft
|
|
|
|
| 9 |
licence: license
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
# Model Card for Router
|
|
@@ -19,10 +21,11 @@ It has been trained using [TRL](https://github.com/huggingface/trl).
|
|
| 19 |
```python
|
| 20 |
from transformers import pipeline
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
| 26 |
```
|
| 27 |
|
| 28 |
## Training procedure
|
|
@@ -30,7 +33,7 @@ print(output["generated_text"])
|
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
-
This model was trained with SFT
|
| 34 |
|
| 35 |
### Framework versions
|
| 36 |
|
|
@@ -55,4 +58,13 @@ Cite TRL as:
|
|
| 55 |
publisher = {GitHub},
|
| 56 |
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
```
|
|
|
|
| 3 |
library_name: transformers
|
| 4 |
model_name: Router
|
| 5 |
tags:
|
|
|
|
| 6 |
- trl
|
| 7 |
- sft
|
| 8 |
+
- gemma3
|
| 9 |
licence: license
|
| 10 |
+
datasets:
|
| 11 |
+
- d-s-b/synthetic-reasoning-dataset
|
| 12 |
---
|
| 13 |
|
| 14 |
# Model Card for Router
|
|
|
|
| 21 |
```python
|
| 22 |
from transformers import pipeline
|
| 23 |
|
| 24 |
+
pipe = pipeline("text-generation", model="d-s-b/Router")
|
| 25 |
+
messages = [
|
| 26 |
+
{"role": "user", "content": "what is capital of india"}
|
| 27 |
+
]
|
| 28 |
+
pipe(messages)
|
| 29 |
```
|
| 30 |
|
| 31 |
## Training procedure
|
|
|
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
+
This model was trained with SFT
|
| 37 |
|
| 38 |
### Framework versions
|
| 39 |
|
|
|
|
| 58 |
publisher = {GitHub},
|
| 59 |
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 60 |
}
|
| 61 |
+
@article{gemma_2025,
|
| 62 |
+
title={Gemma 3},
|
| 63 |
+
url={https://arxiv.org/abs/2503.19786},
|
| 64 |
+
publisher={Google DeepMind},
|
| 65 |
+
author={Gemma Team},
|
| 66 |
+
year={2025}
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
|
| 70 |
```
|