Instructions to use IQuestLab/IQuest-Q1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IQuestLab/IQuest-Q1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IQuestLab/IQuest-Q1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("IQuestLab/IQuest-Q1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IQuestLab/IQuest-Q1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IQuestLab/IQuest-Q1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IQuestLab/IQuest-Q1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/IQuestLab/IQuest-Q1
- SGLang
How to use IQuestLab/IQuest-Q1 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 "IQuestLab/IQuest-Q1" \ --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": "IQuestLab/IQuest-Q1", "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 "IQuestLab/IQuest-Q1" \ --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": "IQuestLab/IQuest-Q1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use IQuestLab/IQuest-Q1 with Docker Model Runner:
docker model run hf.co/IQuestLab/IQuest-Q1
File size: 10,706 Bytes
b58b64b 0a33ae2 b7b0ae7 b58b64b b7b0ae7 b58b64b 8bfc391 5c21b06 8bfc391 b7b0ae7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | ---
license: other
license_name: iquest-q1
license_link: https://huggingface.co/IQuestLab/IQuest-Q1/blob/main/LICENSE
language:
- en
- zh
library_name: transformers
---
<h1 align="center">IQuest-Q1</h1>
<p align="center">Developed by <strong>IQuest</strong></p>
<p align="center">
<a href="https://github.com/IQuestLab/IQuest-Q1"><img src="https://img.shields.io/badge/GitHub-IQuest--Q1-181717?style=flat-square&logo=github&logoColor=white" alt="GitHub: IQuest-Q1"></a>
<a href="https://huggingface.co/IQuestLab/IQuest-Q1"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-IQuest--Q1-ffc107?color=ffc107&logoColor=white" alt="Hugging Face: IQuest-Q1"></a>
</p>
<p align="center">
<a href="#model-introduction">Introduction</a> 路
<a href="#performance">Performance</a> 路
<a href="#quick-start">Quick Start</a> 路
<a href="#deployment">Deployment</a> 路
<a href="#limitations">Limitations</a> 路
<a href="#contact-us">Contact Us</a>
</p>
---
## Introduction
**IQuest-Q1** is a Mixture-of-Experts (MoE) model developed by **IQuest** for agentic coding, reasoning, and multi-step tool use. It comprises approximately **320B total parameters**, with an estimated **15B parameters activated per token**.
<p align="center">
<img src="assets/IQuest-Q1-Training-Pipeline.png" width="100%">
<em>Training pipeline of IQuest-Q1.</em>
</p>
<p align="center">
<img src="assets/IQuest-Q1-Post-Training-Pipeline.png" width="100%">
<em>IQuest-Q1 Post-Training Pipeline.</em>
</p>
### Model Specifications
| Property | IQuest-Q1 |
| :--- | :--- |
| Total Parameters | 320B |
| Activated Parameters | 15B |
| Transformer layers | 88 |
| Hidden dimension | 3,072 |
| Attention Heads (Q/KV) | 48/8 |
| Head Dimension | 128 |
| Hybrid Attention Pattern | 3 SWA + 1 FA |
| Sliding Window Size | 4,096 |
| Partial RoPE Dimensions | 32 |
| Experts (Total/Activated) | 256/8 |
| MTP Layers | 2 Independent (Training) / 1 Recursive x8 (Inference) |
| MTP Sliding Window Size | 512 (Inference) |
| Context length | 524,288 |
## Performance
<p align="center">
<img src="assets/IQuest-Q1_Performance.png" width="100%">
<em>IQuest-Q1 performance across benchmarks. DeepSeek-V4-Flash/Pro refer to the official 0731/0813 releases, respectively. Humanity's Last Exam is reported without tools. IQuest-CLIBench is our in-house benchmark for CLI user experience.</em>
</p>
### Benchmark Notes
For reproducibility, we recommend using a temperature of 1.0, top-p of 0.95, and top-k of 20, with Claude Code `2.1.140` or Codex `0.142` as the respective harness.
For each model, we report the publicly reported score; otherwise, we evaluate the model using the corresponding benchmark setup:
(1) Harness: For agentic coding tasks, we use mini-SWE-agent for DeepSWE v1.1, and Claude Code for other tasks. For Agents' Last Exam, we evaluate our model using Claude Code `2.1.258`. Because our models currently do not have multimodal capability, we replace multimodal content inputs in the agent conversation with placeholders during tokenization. (2) Runtime: We set six-hour limits for CyberGym, eight hours for Terminal-Bench 2.1.
## Quick Start
Start a server as described in [Deployment](#deployment), install the client with `pip install openai`, and then call the OpenAI-compatible API:
```python
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="sk-iquest")
response = client.chat.completions.create(
model="IQuest-Q1",
messages=[
{"role": "user", "content": "Hello! Can you briefly introduce yourself?"},
],
temperature=1.0,
top_p=0.95,
)
print(response.choices[0].message.content)
```
## Deployment
For production deployment, we recommend using [SGLang](https://github.com/sgl-project/sglang/pull/41590) or [vLLM](https://github.com/IQuestLab/vllm-iquest-q1).
### SGLang
Use our prebuilt image [iquestlabworkspace/sglang-iquest-q1:cu130](https://hub.docker.com/repository/docker/iquestlabworkspace/sglang-iquest-q1/tags/cu130/):
```bash
docker pull iquestlabworkspace/sglang-iquest-q1:cu130
# without MTP
MODEL_ROOT="$(hf download IQuestLab/IQuest-Q1 --quiet)" && \
python -u -m sglang.launch_server \
--model-path "$MODEL_ROOT" \
--served-model-name IQuest-Q1 \
--tp-size 8 \
--dtype bfloat16 \
--attention-backend fa3 \
--mem-fraction-static 0.85 \
--disable-prefill-cuda-graph \
--enable-metrics \
--tool-call-parser iquest_q1 \
--reasoning-parser iquest_q1 \
--enable-torch-compile \
--load-format fastsafetensors \
--speculative-use-rejection-sampling
# with recursive MTP
MODEL_ROOT="$(hf download IQuestLab/IQuest-Q1 --quiet)" && \
python -u -m sglang.launch_server \
--model-path "$MODEL_ROOT" \
--served-model-name IQuest-Q1 \
--tp-size 8 \
--dtype bfloat16 \
--attention-backend fa3 \
--mem-fraction-static 0.85 \
--disable-prefill-cuda-graph \
--enable-metrics \
--tool-call-parser iquest_q1 \
--reasoning-parser iquest_q1 \
--speculative-algorithm EAGLE \
--speculative-num-steps 5 \
--speculative-eagle-topk 1 \
--speculative-num-draft-tokens 6 \
--speculative-draft-model-path "$MODEL_ROOT/mtp" \
--enable-torch-compile \
--load-format fastsafetensors \
--speculative-use-rejection-sampling \
--speculative-draft-attention-backend fa3
```
### vLLM
Use our image [iquestlabworkspace/vllm-iquest-q1:cu130](https://hub.docker.com/repository/docker/iquestlabworkspace/vllm-iquest-q1/tags/cu130):
```bash
docker pull iquestlabworkspace/vllm-iquest-q1:cu130
# without MTP
MODEL_ROOT="$(hf download IQuestLab/IQuest-Q1 --quiet)" && \
vllm serve "$MODEL_ROOT" \
--served-model-name IQuest-Q1 \
--tensor-parallel-size 8 \
--reasoning-parser iquest_q1 \
--enable-auto-tool-choice \
--tool-call-parser iquest_q1
# with recursive MTP
MODEL_ROOT="$(hf download IQuestLab/IQuest-Q1 --quiet)" && \
vllm serve "$MODEL_ROOT" \
--served-model-name IQuest-Q1 \
--tensor-parallel-size 8 \
--reasoning-parser iquest_q1 \
--enable-auto-tool-choice \
--tool-call-parser iquest_q1 \
--enable-prefix-caching \
--speculative-config '{
"method": "eagle",
"model": "'"$MODEL_ROOT"'/mtp",
"num_speculative_tokens": 5,
"draft_sample_method": "probabilistic",
"rejection_sample_method": "standard",
"enforce_eager": false
}'
```
### Tool Use and Agent Integration
Use a gateway that supports tool calling via **Anthropic Messages** for `Claude Code` and **OpenAI Responses** for `Codex`.
#### Claude Code
We recommend version `2.1.140` and the IQuest-Q1[1m] client-side setting does not change 512K context limit.
```bash
export ANTHROPIC_MODEL="IQuest-Q1[1m]"
export ANTHROPIC_DEFAULT_SONNET_MODEL="IQuest-Q1[1m]"
export ANTHROPIC_DEFAULT_OPUS_MODEL="IQuest-Q1[1m]"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="IQuest-Q1[1m]"
export CLAUDE_CODE_SUBAGENT_MODEL="IQuest-Q1[1m]"
export CLAUDE_CODE_MAX_OUTPUT_TOKENS="131072"
export CLAUDE_AUTOCOMPACT_PCT_OVERRIDE="80"
export CLAUDE_CODE_AUTO_COMPACT_WINDOW="524288"
export API_TIMEOUT_MS="3000000"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS="1"
export ANTHROPIC_BASE_URL="http://example-iquest-q1-link"
export ANTHROPIC_AUTH_TOKEN="sk-iquest-q1"
claude --model IQuest-Q1
```
#### Codex CLI
We recommend version `0.142.0`.
```
export OPENAI_API_KEY="sk-iquest-q1"
export MODEL_ID="IQuest-Q1"
# Add /v1 if required by your gateway's Responses endpoint.
export BASE_URL="http://example-iquest-q1-link"
(
set -eu
CONFIG_DIR="${HOME}/.codex"
mkdir -p -- "$CONFIG_DIR"
CONFIG_DIR="$(cd -- "$CONFIG_DIR" && pwd -P)"
# Back up existing files before replacing them.
BACKUP_SUFFIX="$(date +%Y%m%d-%H%M%S)-$$"
for FILE in config.toml model_catalog.json; do
if [ -f "$CONFIG_DIR/$FILE" ]; then
cp -p -- "$CONFIG_DIR/$FILE" "$CONFIG_DIR/$FILE.bak.$BACKUP_SUFFIX"
fi
done
# This configuration disables approval prompts and sandboxing.
cat > "$CONFIG_DIR/config.toml" <<EOF
model = "$MODEL_ID"
model_provider = "iquest"
approval_policy = "never"
sandbox_mode = "danger-full-access"
web_search = "disabled"
model_reasoning_summary = "detailed"
model_supports_reasoning_summaries = true
model_context_window = 524288
model_auto_compact_token_limit = 419430
model_auto_compact_token_limit_scope = "total"
tool_output_token_limit = 32768
model_catalog_json = "$CONFIG_DIR/model_catalog.json"
[model_providers.iquest]
name = "iquest"
base_url = "${BASE_URL%/}"
wire_api = "responses"
env_key = "OPENAI_API_KEY"
supports_websockets = false
request_max_retries = 20
stream_max_retries = 20
stream_idle_timeout_ms = 600000
[model_providers.iquest.http_headers]
max-output-tokens = "131072"
EOF
# The gateway must support the reasoning options and max-output-tokens header.
cat > "$CONFIG_DIR/model_catalog.json" <<EOF
{
"models": [
{
"slug": "$MODEL_ID",
"display_name": "$MODEL_ID",
"description": "IQuest-Q1 served through an API gateway.",
"context_window": 524288,
"input_modalities": ["text"],
"base_instructions": "",
"supported_reasoning_levels": [],
"supports_reasoning_summaries": true,
"supports_parallel_tool_calls": false,
"shell_type": "default",
"tool_mode": "default",
"truncation_policy": {
"mode": "tokens",
"limit": 10000
},
"visibility": "list",
"supported_in_api": true,
"priority": 1,
"support_verbosity": false,
"experimental_supported_tools": []
}
]
}
EOF
codex --model "$MODEL_ID"
)
```
## Limitations
- **Text-only input.** This checkpoint has no native image, audio, or video input capability.
- **Output reliability.** Generated explanations and code can be incorrect. Review code changes and verify them with task-appropriate tests.
- **Tool integration.** Tool calls use the IQuest-specific format in the chat template. Structured tool execution and reasoning extraction require compatible serving parsers and an agent harness.
- **Challenges in Real-World CLI Tasks.** Real-world CLI tasks often require iterative debugging and verification. IQuest-Q1 may overlook constraints, repeat failed attempts, or leave issues unresolved, necessitating human oversight.
- **Ongoing development.** IQuest-Q1 remains at an early stage, with substantial limitations in its capabilities and reliability. Much work remains, and we still have a long way to go.
## Contact Us
For technical questions, feedback, or collaboration inquiries, please email us at [research@iquestlab.com](mailto:research@iquestlab.com).
---
<p align="center"><strong>IQuest</strong></p> |