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 importlib | |
| import importlib.util | |
| import os | |
| from configs import cfg | |
| def _false() -> bool: | |
| return False | |
| def describe_exception_chain(exc: Exception) -> str: | |
| messages: list[str] = [] | |
| seen: set[int] = set() | |
| current: BaseException | None = exc | |
| while current is not None and id(current) not in seen: | |
| seen.add(id(current)) | |
| message = f"{type(current).__name__}: {current}" | |
| if message not in messages: | |
| messages.append(message) | |
| current = current.__cause__ or current.__context__ | |
| return " -> ".join(messages) | |
| def disable_flash_attn_for_transformers() -> None: | |
| try: | |
| import transformers.utils as tf_utils | |
| tf_utils.is_flash_attn_2_available = _false | |
| if hasattr(tf_utils, "is_flash_attn_3_available"): | |
| tf_utils.is_flash_attn_3_available = _false | |
| except Exception: | |
| pass | |
| try: | |
| from transformers.utils import import_utils as tf_import_utils | |
| tf_import_utils.is_flash_attn_2_available = _false | |
| if hasattr(tf_import_utils, "is_flash_attn_3_available"): | |
| tf_import_utils.is_flash_attn_3_available = _false | |
| except Exception: | |
| pass | |
| try: | |
| import transformers.modeling_utils as modeling_utils | |
| if hasattr(modeling_utils, "is_flash_attn_2_available"): | |
| modeling_utils.is_flash_attn_2_available = _false | |
| if hasattr(modeling_utils, "is_flash_attn_3_available"): | |
| modeling_utils.is_flash_attn_3_available = _false | |
| except Exception: | |
| pass | |
| try: | |
| import transformers.modeling_flash_attention_utils as flash_utils | |
| flash_utils.is_flash_attn_2_available = _false | |
| if hasattr(flash_utils, "is_flash_attn_3_available"): | |
| flash_utils.is_flash_attn_3_available = _false | |
| except Exception: | |
| pass | |
| def resolve_attention_backend(logger) -> str: | |
| forced_backend = os.environ.get("QUINTUS_ATTENTION_BACKEND") | |
| if forced_backend: | |
| logger.info(f" [ATTENTION] Forced backend via QUINTUS_ATTENTION_BACKEND={forced_backend!r}.") | |
| return forced_backend | |
| try: | |
| from transformers.utils import is_flash_attn_3_available | |
| if is_flash_attn_3_available(): | |
| logger.info(" [ATTENTION] Using flash_attention_3.") | |
| return "flash_attention_3" | |
| except Exception: | |
| pass | |
| try: | |
| importlib.import_module("flash_attn") | |
| logger.info(" [ATTENTION] Using flash_attention_2.") | |
| return "flash_attention_2" | |
| except Exception as exc: | |
| if importlib.util.find_spec("flash_attn") is not None: | |
| disable_flash_attn_for_transformers() | |
| logger.warning( | |
| "flash-attn appears installed but failed to import (%s: %s); " | |
| "masking flash-attn from Transformers and falling back to sdpa.", | |
| type(exc).__name__, | |
| exc, | |
| ) | |
| else: | |
| logger.info(" [ATTENTION] Using PyTorch SDPA.") | |
| return "sdpa" | |
| def _requires_remote_code_opt_in(exc: Exception) -> bool: | |
| message = str(exc).lower() | |
| return ( | |
| "trust_remote_code" in message | |
| or "requires you to execute the configuration file" in message | |
| or "requires remote code" in message | |
| ) | |
| def format_model_load_error(subject: str, exc: Exception) -> str: | |
| if not cfg.model.allow_remote_code and _requires_remote_code_opt_in(exc): | |
| return ( | |
| f"{subject} failed because the selected model/tokenizer requires remote code, " | |
| "but Quintus is configured with allow_remote_code=false. Review the upstream " | |
| "repository and rerun with QUINTUS_ALLOW_REMOTE_CODE=1 only if you explicitly " | |
| "trust that code." | |
| ) | |
| return f"{subject} failed: {describe_exception_chain(exc)}" | |