Text Generation
Transformers
Safetensors
PyTorch
English
qwen3
qwen
qwen3-1.7b
qwen3-8b
quintus
quintus-1.7b
causal-lm
language-model
chat
assistant
compact-llm
small-language-model
knowledge-distillation
online-kd
full-vocabulary-kd
supervised-fine-tuning
sft
reasoning
code-generation
english
vllm
conversational
text-generation-inference
Instructions to use iamrahulreddy/Quintus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use iamrahulreddy/Quintus with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="iamrahulreddy/Quintus") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("iamrahulreddy/Quintus") model = AutoModelForCausalLM.from_pretrained("iamrahulreddy/Quintus") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use iamrahulreddy/Quintus with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "iamrahulreddy/Quintus" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iamrahulreddy/Quintus", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/iamrahulreddy/Quintus
- SGLang
How to use iamrahulreddy/Quintus 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 "iamrahulreddy/Quintus" \ --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": "iamrahulreddy/Quintus", "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 "iamrahulreddy/Quintus" \ --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": "iamrahulreddy/Quintus", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use iamrahulreddy/Quintus with Docker Model Runner:
docker model run hf.co/iamrahulreddy/Quintus
| from __future__ import annotations | |
| import torch | |
| from torch.utils.data import DataLoader | |
| from src.losses import compute_loss_for_phase | |
| from src.training_data import move_batch_to_device | |
| def evaluate_validation_loss( | |
| phase: str, | |
| model, | |
| dataloader: DataLoader, | |
| device: torch.device, | |
| alpha: float, | |
| temperature: float, | |
| online_kd_token_chunk_size: int = 2048, | |
| teacher_model=None, | |
| max_batches: int = -1, | |
| ) -> dict[str, float | int]: | |
| was_training = model.training | |
| model.eval() | |
| total_loss = 0.0 | |
| total_ce = 0.0 | |
| total_kd = 0.0 | |
| batches = 0 | |
| with torch.inference_mode(): | |
| for batch in dataloader: | |
| if max_batches > 0 and batches >= max_batches: | |
| break | |
| batch = move_batch_to_device(batch, device) | |
| input_ids = batch["input_ids"] | |
| attention_mask = batch["attention_mask"] | |
| labels = batch["labels"] | |
| loss_mask = batch["loss_mask"] | |
| logits = model(input_ids=input_ids, attention_mask=attention_mask).logits | |
| if phase == "online_kd" and teacher_model is not None: | |
| teacher_logits = teacher_model(input_ids=input_ids, attention_mask=attention_mask).logits | |
| else: | |
| teacher_logits = None | |
| loss, ce, kd = compute_loss_for_phase( | |
| phase, | |
| logits, | |
| labels, | |
| loss_mask, | |
| batch, | |
| alpha, | |
| temperature, | |
| teacher_logits=teacher_logits, | |
| online_kd_token_chunk_size=online_kd_token_chunk_size, | |
| ) | |
| total_loss += float(loss.detach().item()) | |
| total_ce += float(ce.detach().item()) | |
| total_kd += float(kd.detach().item()) | |
| batches += 1 | |
| if was_training: | |
| model.train() | |
| denom = max(batches, 1) | |
| return { | |
| "loss": total_loss / denom, | |
| "ce": total_ce / denom, | |
| "kd": total_kd / denom, | |
| "batches": batches, | |
| } | |