Text Generation
Transformers
Safetensors
qwen3
feature-extraction
dflash
speculative-decoding
speculative-decoding-draft
block-diffusion
draft-model
diffusion-language-model
efficiency
qwen
qwen3.6
sglang
custom_code
text-generation-inference
Instructions to use z-lab/Qwen3.6-35B-A3B-DFlash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use z-lab/Qwen3.6-35B-A3B-DFlash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="z-lab/Qwen3.6-35B-A3B-DFlash", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("z-lab/Qwen3.6-35B-A3B-DFlash", trust_remote_code=True) model = AutoModel.from_pretrained("z-lab/Qwen3.6-35B-A3B-DFlash", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use z-lab/Qwen3.6-35B-A3B-DFlash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "z-lab/Qwen3.6-35B-A3B-DFlash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "z-lab/Qwen3.6-35B-A3B-DFlash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/z-lab/Qwen3.6-35B-A3B-DFlash
- SGLang
How to use z-lab/Qwen3.6-35B-A3B-DFlash 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 "z-lab/Qwen3.6-35B-A3B-DFlash" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "z-lab/Qwen3.6-35B-A3B-DFlash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "z-lab/Qwen3.6-35B-A3B-DFlash" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "z-lab/Qwen3.6-35B-A3B-DFlash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use z-lab/Qwen3.6-35B-A3B-DFlash with Docker Model Runner:
docker model run hf.co/z-lab/Qwen3.6-35B-A3B-DFlash
Update weights and config from Modal retrain
Browse files- config.json +26 -29
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -7,56 +7,53 @@
|
|
| 7 |
"auto_map": {
|
| 8 |
"AutoModel": "dflash.DFlashDraftModel"
|
| 9 |
},
|
| 10 |
-
"
|
| 11 |
"dflash_config": {
|
| 12 |
-
"
|
|
|
|
| 13 |
"target_layer_ids": [
|
| 14 |
1,
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
| 18 |
37
|
| 19 |
]
|
| 20 |
},
|
| 21 |
"dtype": "bfloat16",
|
| 22 |
-
"eos_token_id":
|
| 23 |
"head_dim": 128,
|
| 24 |
"hidden_act": "silu",
|
| 25 |
"hidden_size": 2048,
|
| 26 |
"initializer_range": 0.02,
|
| 27 |
"intermediate_size": 6144,
|
| 28 |
"layer_types": [
|
| 29 |
-
"
|
| 30 |
-
"
|
| 31 |
-
"
|
| 32 |
-
"
|
| 33 |
-
"
|
| 34 |
-
"full_attention",
|
| 35 |
-
"full_attention",
|
| 36 |
"full_attention"
|
| 37 |
],
|
| 38 |
"max_position_embeddings": 262144,
|
| 39 |
-
"max_window_layers":
|
| 40 |
"model_type": "qwen3",
|
| 41 |
"num_attention_heads": 32,
|
| 42 |
-
"num_hidden_layers":
|
| 43 |
-
"num_key_value_heads":
|
| 44 |
"num_target_layers": 40,
|
| 45 |
-
"pad_token_id":
|
| 46 |
"rms_norm_eps": 1e-06,
|
| 47 |
-
"
|
| 48 |
-
"
|
| 49 |
-
"
|
| 50 |
-
"factor": 64.0,
|
| 51 |
-
"original_max_position_embeddings": 4096,
|
| 52 |
-
"rope_type": "yarn",
|
| 53 |
-
"type": "yarn"
|
| 54 |
},
|
| 55 |
-
"
|
| 56 |
-
"sliding_window": null,
|
| 57 |
"tie_word_embeddings": false,
|
| 58 |
-
"transformers_version": "
|
| 59 |
-
"use_cache":
|
| 60 |
-
"use_sliding_window":
|
| 61 |
"vocab_size": 248320
|
| 62 |
}
|
|
|
|
| 7 |
"auto_map": {
|
| 8 |
"AutoModel": "dflash.DFlashDraftModel"
|
| 9 |
},
|
| 10 |
+
"bos_token_id": null,
|
| 11 |
"dflash_config": {
|
| 12 |
+
"block_size": 16,
|
| 13 |
+
"mask_token_id": 248077,
|
| 14 |
"target_layer_ids": [
|
| 15 |
1,
|
| 16 |
+
6,
|
| 17 |
+
11,
|
| 18 |
+
16,
|
| 19 |
+
22,
|
| 20 |
+
27,
|
| 21 |
+
32,
|
| 22 |
37
|
| 23 |
]
|
| 24 |
},
|
| 25 |
"dtype": "bfloat16",
|
| 26 |
+
"eos_token_id": 248044,
|
| 27 |
"head_dim": 128,
|
| 28 |
"hidden_act": "silu",
|
| 29 |
"hidden_size": 2048,
|
| 30 |
"initializer_range": 0.02,
|
| 31 |
"intermediate_size": 6144,
|
| 32 |
"layer_types": [
|
| 33 |
+
"sliding_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"sliding_attention",
|
| 37 |
+
"sliding_attention",
|
|
|
|
|
|
|
| 38 |
"full_attention"
|
| 39 |
],
|
| 40 |
"max_position_embeddings": 262144,
|
| 41 |
+
"max_window_layers": 6,
|
| 42 |
"model_type": "qwen3",
|
| 43 |
"num_attention_heads": 32,
|
| 44 |
+
"num_hidden_layers": 6,
|
| 45 |
+
"num_key_value_heads": 8,
|
| 46 |
"num_target_layers": 40,
|
| 47 |
+
"pad_token_id": null,
|
| 48 |
"rms_norm_eps": 1e-06,
|
| 49 |
+
"rope_parameters": {
|
| 50 |
+
"rope_theta": 10000000,
|
| 51 |
+
"rope_type": "default"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
},
|
| 53 |
+
"sliding_window": 4096,
|
|
|
|
| 54 |
"tie_word_embeddings": false,
|
| 55 |
+
"transformers_version": "5.7.0",
|
| 56 |
+
"use_cache": true,
|
| 57 |
+
"use_sliding_window": true,
|
| 58 |
"vocab_size": 248320
|
| 59 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1fb90ef50a32bfb8dd2abfe601dd3608d6d5b59dc342820a98830f76f8cd72b7
|
| 3 |
+
size 771819674
|