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)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("iamrahulreddy/Quintus") model = AutoModelForCausalLM.from_pretrained("iamrahulreddy/Quintus", 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 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
Download docs/huggingface_model_card.md from iamrahulreddy/Quintus: direct link, hf CLI and curl.
- Browser
- Download file 7.07 kB
-
https://huggingface.co/iamrahulreddy/Quintus/resolve/main/docs/huggingface_model_card.md
- Command line
-
hf download hf://iamrahulreddy/Quintus/docs/huggingface_model_card.md
-
curl -L -o huggingface_model_card.md https://huggingface.co/iamrahulreddy/Quintus/resolve/main/docs/huggingface_model_card.md
Quintus-1.7B
Quintus-1.7B is a compact instruction-following assistant derived from Qwen/Qwen3-1.7B-Base. It was trained with online full-vocabulary knowledge distillation from a larger Qwen3-8B teacher, followed by targeted SFT for assistant behavior and generation stability.
Model Details
- Base architecture: Qwen3-1.7B
- Base checkpoint:
Qwen/Qwen3-1.7B-Base - Distillation teacher: Qwen3-8B class teacher
- Training method: Online full-vocabulary KD + targeted SFT
- Context length used in training: 4096 tokens
- Primary language focus: English
- Release repository:
iamrahulreddy/Quintus - Attention path: FlashAttention-2 when available
- Training kernels: Liger kernels for compatible Qwen-family operators
- Optimizer: fused AdamW
Intended Use
Quintus is intended for:
- General assistant use.
- Reasoning and math prompts.
- Lightweight coding assistance.
- Local experimentation with compact LLMs.
- Research into online KD and small-model alignment.
It is not intended as a safety-critical decision system. Like other compact language models, it can hallucinate and should be verified on high-stakes tasks.
Training Summary
The training pipeline has two main stages:
- Online KD: The student learns from the teacher's dense full-vocabulary probability distribution. This avoids the sparse top-k ceiling encountered in earlier offline KD experiments.
- SFT: The distilled checkpoint is tuned on curated instruction/persona data to improve assistant-style behavior and reduce repetition or formatting drift.
The KD loss combines assistant-token cross entropy and teacher-student KL divergence:
For the release run, $\alpha = 0.3$ and $T = 2.0$.
torch.compile was kept disabled for the final KD path because this workload showed high Inductor memory overhead, dynamic-shape graph breaks, recompile overhead, and checkpoint portability risk from _orig_mod. state-dict prefixes when compiled modules are not unwrapped before saving.
Evaluation
| Benchmark | Qwen3-1.7B-Base | Qwen3-1.7B-Instruct | Quintus-1.7B |
|---|---|---|---|
| HumanEval pass@1 | 67.1% | 70.7% | 67.7% |
| MBPP pass@1 | 67.2% | 58.2% | 64.8% |
| GSM8K, 10-shot flexible | 69.98% | 69.75% | 74.30% |
| ARC-Challenge acc_norm | 55.72% | 52.99% | 58.36% |
| WinoGrande, 5-shot | 65.67% | 61.01% | 66.38% |
| PIQA acc_norm | 75.63% | 72.09% | 75.57% |
Strengths
- Strong math and reasoning transfer for the 1.7B parameter scale.
- Good commonsense and ARC-style benchmark performance.
- Compact enough for lower-resource deployment compared with larger teachers.
- Public weight audit indicates healthy structural divergence from the base checkpoint without collapse.
Limitations
- The model can still produce confident factual errors.
- Code generation can contradict stated complexity constraints.
- It is smaller than the teacher and inherits capacity limits of the 1.7B scale.
- Evaluation results depend on prompt format; raw and chat-template modes are not interchangeable.
- Additional preference tuning would likely improve calibration and refusal behavior.
Example Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
PUBLIC_REPO_ID = "iamrahulreddy/Quintus"
print(f"Loading Quintus from {PUBLIC_REPO_ID}...")
tokenizer = AutoTokenizer.from_pretrained(PUBLIC_REPO_ID, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
PUBLIC_REPO_ID,
device_map="auto",
dtype=torch.float16,
trust_remote_code=True,
)
stop_tokens = ["<|endoftext|>", "<|im_end|>"]
eos_token_ids = [tokenizer.eos_token_id] if tokenizer.eos_token_id is not None else []
for token in stop_tokens:
token_id = tokenizer.convert_tokens_to_ids(token)
if token_id is not None and token_id not in eos_token_ids:
eos_token_ids.append(token_id)
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
conversation_history = [
{
"role": "system",
"content": (
"You are Quintus, a highly capable AI assistant created by "
"Muskula Rahul. You are helpful, precise, and logically sound."
),
}
]
print()
print("Quintus Chat (type 'quit' to exit)")
print()
while True:
try:
user_input = input("You: ").strip()
if user_input.lower() in ["quit", "exit"]:
print("\nGoodbye!")
break
if not user_input:
continue
conversation_history.append({"role": "user", "content": user_input})
prompt = tokenizer.apply_chat_template(
conversation_history,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
print("Quintus: ", end="", flush=True)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.7,
top_p=0.9,
do_sample=True,
streamer=streamer,
pad_token_id=tokenizer.eos_token_id,
eos_token_id=eos_token_ids,
)
generated_ids = outputs[0][inputs.input_ids.shape[-1]:]
assistant_response = tokenizer.decode(
generated_ids,
skip_special_tokens=True,
).strip()
conversation_history.append({"role": "assistant", "content": assistant_response})
print()
except KeyboardInterrupt:
print("\n\nGoodbye!")
break
Credits
- Qwen Team and the Qwen Hugging Face organization for the Qwen3 model family.
Qwen/Qwen3-8B, used as the distillation teacher.Qwen/Qwen3-1.7B-Base, used as the base student checkpoint.Qwen/Qwen3-1.7B, used for the tokenizer and chat-template contract.- Alibaba PAI for
DistilQwen_100k, the primary instruction source after filtering. - Hugging Face Transformers, vLLM, EvalPlus, lm-evaluation-harness, FlashAttention, and Liger Kernel for training and evaluation infrastructure.
License And Author
This software is distributed under the MIT License. Refer to the repository LICENSE file for full text.
Author: Muskula Rahul - @iamrahulreddy
Citation
If you use this model or code, cite the repository and the upstream Qwen3 models.