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
Upload folder using huggingface_hub
Browse files- mtp/config.json +82 -0
- mtp/model.safetensors +3 -0
mtp/config.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"IQuestQ1MTP"
|
| 4 |
+
],
|
| 5 |
+
"dtype": "bfloat16",
|
| 6 |
+
"fp32_residual_connection": true,
|
| 7 |
+
"hidden_size": 3072,
|
| 8 |
+
"model_type": "iquest_q1_mtp",
|
| 9 |
+
"num_draft_slots": 7,
|
| 10 |
+
"num_target_layers": 88,
|
| 11 |
+
"sliding_window": 512,
|
| 12 |
+
"swa_rope_theta": 10000.0,
|
| 13 |
+
"target_config": {
|
| 14 |
+
"architectures": [
|
| 15 |
+
"IQuestQ1ForCausalLM"
|
| 16 |
+
],
|
| 17 |
+
"attention_bias": false,
|
| 18 |
+
"attention_dropout": 0.0,
|
| 19 |
+
"attn_out_scale": 1.0,
|
| 20 |
+
"dense_intermediate_size": 12288,
|
| 21 |
+
"dtype": "bfloat16",
|
| 22 |
+
"embed_scale": 1.0,
|
| 23 |
+
"enable_sink_attention": true,
|
| 24 |
+
"eos_token_id": 0,
|
| 25 |
+
"ffn_out_scale": 0.53881590608,
|
| 26 |
+
"first_layer_attn_out_scale": 1.0,
|
| 27 |
+
"first_layer_ffn_out_scale": 1.0,
|
| 28 |
+
"first_layers_types": [
|
| 29 |
+
"full_attention"
|
| 30 |
+
],
|
| 31 |
+
"fuse_sink_attention": true,
|
| 32 |
+
"head_dim": 128,
|
| 33 |
+
"hidden_act": "silu",
|
| 34 |
+
"hidden_size": 3072,
|
| 35 |
+
"hybrid_layers_types_block": [
|
| 36 |
+
"full_attention",
|
| 37 |
+
"sliding_attention",
|
| 38 |
+
"sliding_attention",
|
| 39 |
+
"sliding_attention"
|
| 40 |
+
],
|
| 41 |
+
"intermediate_size": 1536,
|
| 42 |
+
"last_layers_types": [
|
| 43 |
+
"full_attention",
|
| 44 |
+
"full_attention",
|
| 45 |
+
"full_attention"
|
| 46 |
+
],
|
| 47 |
+
"logit_scale": 1.0,
|
| 48 |
+
"max_position_embeddings": 524288,
|
| 49 |
+
"mlp_only_layers": [
|
| 50 |
+
0
|
| 51 |
+
],
|
| 52 |
+
"model_type": "iquest_q1",
|
| 53 |
+
"moe_router_dtype": "fp32",
|
| 54 |
+
"enable_lm_head_fp32": true,
|
| 55 |
+
"no_rope_layers": [],
|
| 56 |
+
"num_attention_heads": 48,
|
| 57 |
+
"num_experts": 256,
|
| 58 |
+
"num_experts_per_tok": 8,
|
| 59 |
+
"num_hidden_layers": 88,
|
| 60 |
+
"num_hybrid_layers_block": 21,
|
| 61 |
+
"num_key_value_heads": 8,
|
| 62 |
+
"num_mtp_layers": 0,
|
| 63 |
+
"rms_norm_eps": 1e-06,
|
| 64 |
+
"rope_theta": 1000000,
|
| 65 |
+
"rotary_dim": 32,
|
| 66 |
+
"shared_kv_num_layers": 0,
|
| 67 |
+
"shared_kv_source_begin": 0,
|
| 68 |
+
"shared_kv_target_begin": 0,
|
| 69 |
+
"sliding_window": 4096,
|
| 70 |
+
"softmax_scale": null,
|
| 71 |
+
"swa_rope_theta": 10000.0,
|
| 72 |
+
"tie_word_embeddings": false,
|
| 73 |
+
"transformers_version": "4.57.1",
|
| 74 |
+
"use_cache": true,
|
| 75 |
+
"use_hybrid_layers": true,
|
| 76 |
+
"use_over_encoding": false,
|
| 77 |
+
"use_sliding_window": true,
|
| 78 |
+
"vocab_size": 160000
|
| 79 |
+
},
|
| 80 |
+
"vocab_size": 160000,
|
| 81 |
+
"max_position_embeddings": 524288
|
| 82 |
+
}
|
mtp/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32d4e15f30fa5a6e9d2a70fc3e7ff5187f2bc9eab9a7e6942ef18f3c894fe2ed
|
| 3 |
+
size 9341293352
|