Instructions to use tiny-random/qwen3.8-moe-fp8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiny-random/qwen3.8-moe-fp8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tiny-random/qwen3.8-moe-fp8") 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("tiny-random/qwen3.8-moe-fp8") model = AutoModelForCausalLM.from_pretrained("tiny-random/qwen3.8-moe-fp8", 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 tiny-random/qwen3.8-moe-fp8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tiny-random/qwen3.8-moe-fp8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiny-random/qwen3.8-moe-fp8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tiny-random/qwen3.8-moe-fp8
- SGLang
How to use tiny-random/qwen3.8-moe-fp8 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 "tiny-random/qwen3.8-moe-fp8" \ --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": "tiny-random/qwen3.8-moe-fp8", "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 "tiny-random/qwen3.8-moe-fp8" \ --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": "tiny-random/qwen3.8-moe-fp8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tiny-random/qwen3.8-moe-fp8 with Docker Model Runner:
docker model run hf.co/tiny-random/qwen3.8-moe-fp8
Download config.json from tiny-random/qwen3.8-moe-fp8: direct link, hf CLI and curl.
- Browser
- Download file 6.03 kB
-
https://huggingface.co/tiny-random/qwen3.8-moe-fp8/resolve/main/config.json
- Command line
-
hf download hf://tiny-random/qwen3.8-moe-fp8/config.json
-
curl -L -o config.json https://huggingface.co/tiny-random/qwen3.8-moe-fp8/resolve/main/config.json
6.03 kB
| { | |
| "architectures": [ | |
| "Qwen3_5MoeForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "attn_output_gate": true, | |
| "bos_token_id": 248044, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 248044, | |
| "full_attention_interval": 4, | |
| "head_dim": 64, | |
| "hidden_act": "silu", | |
| "hidden_size": 32, | |
| "initializer_range": 0.02, | |
| "layer_types": [ | |
| "linear_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "full_attention" | |
| ], | |
| "linear_conv_kernel_dim": 4, | |
| "linear_key_head_dim": 128, | |
| "linear_num_key_heads": 2, | |
| "linear_num_value_heads": 16, | |
| "linear_value_head_dim": 128, | |
| "mamba_ssm_dtype": "float32", | |
| "max_position_embeddings": 262144, | |
| "model_type": "qwen3_5_moe_text", | |
| "moe_intermediate_size": 128, | |
| "mtp_num_hidden_layers": 1, | |
| "mtp_use_dedicated_embeddings": false, | |
| "num_attention_heads": 32, | |
| "num_experts": 32, | |
| "num_experts_per_tok": 10, | |
| "num_hidden_layers": 8, | |
| "num_key_value_heads": 2, | |
| "output_gate_type": "swish", | |
| "output_router_logits": false, | |
| "pad_token_id": null, | |
| "partial_rotary_factor": 0.25, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "partial_rotary_factor": 0.25, | |
| "rope_theta": 10000000, | |
| "rope_type": "default" | |
| }, | |
| "router_aux_loss_coef": 0.001, | |
| "shared_expert_intermediate_size": 128, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "4.57.3", | |
| "use_cache": true, | |
| "vocab_size": 248320, | |
| "quantization_config": { | |
| "quant_method": "fp8", | |
| "activation_scheme": "dynamic", | |
| "weight_per_tensor": false, | |
| "act_per_tensor": false, | |
| "weight_block_size": [ | |
| 32, | |
| 32 | |
| ], | |
| "modules_to_not_convert": [ | |
| "lm_head", | |
| "model.embed_tokens", | |
| "model.layers.0.linear_attn.conv1d", | |
| "model.layers.0.linear_attn.in_proj_a", | |
| "model.layers.0.linear_attn.in_proj_b", | |
| "model.layers.0.linear_attn.in_proj_qkv", | |
| "model.layers.0.linear_attn.in_proj_z", | |
| "model.layers.0.linear_attn.out_proj", | |
| "model.layers.0.mlp.gate", | |
| "model.layers.0.mlp.shared_expert.down_proj", | |
| "model.layers.0.mlp.shared_expert.gate_proj", | |
| "model.layers.0.mlp.shared_expert.up_proj", | |
| "model.layers.0.mlp.shared_expert_gate", | |
| "model.layers.1.linear_attn.conv1d", | |
| "model.layers.1.linear_attn.in_proj_a", | |
| "model.layers.1.linear_attn.in_proj_b", | |
| "model.layers.1.linear_attn.in_proj_qkv", | |
| "model.layers.1.linear_attn.in_proj_z", | |
| "model.layers.1.linear_attn.out_proj", | |
| "model.layers.1.mlp.gate", | |
| "model.layers.1.mlp.shared_expert.down_proj", | |
| "model.layers.1.mlp.shared_expert.gate_proj", | |
| "model.layers.1.mlp.shared_expert.up_proj", | |
| "model.layers.1.mlp.shared_expert_gate", | |
| "model.layers.2.linear_attn.conv1d", | |
| "model.layers.2.linear_attn.in_proj_a", | |
| "model.layers.2.linear_attn.in_proj_b", | |
| "model.layers.2.linear_attn.in_proj_qkv", | |
| "model.layers.2.linear_attn.in_proj_z", | |
| "model.layers.2.linear_attn.out_proj", | |
| "model.layers.2.mlp.gate", | |
| "model.layers.2.mlp.shared_expert.down_proj", | |
| "model.layers.2.mlp.shared_expert.gate_proj", | |
| "model.layers.2.mlp.shared_expert.up_proj", | |
| "model.layers.2.mlp.shared_expert_gate", | |
| "model.layers.3.mlp.gate", | |
| "model.layers.3.mlp.shared_expert.down_proj", | |
| "model.layers.3.mlp.shared_expert.gate_proj", | |
| "model.layers.3.mlp.shared_expert.up_proj", | |
| "model.layers.3.mlp.shared_expert_gate", | |
| "model.layers.3.self_attn.k_proj", | |
| "model.layers.3.self_attn.o_proj", | |
| "model.layers.3.self_attn.q_proj", | |
| "model.layers.3.self_attn.v_proj", | |
| "model.layers.4.linear_attn.conv1d", | |
| "model.layers.4.linear_attn.in_proj_a", | |
| "model.layers.4.linear_attn.in_proj_b", | |
| "model.layers.4.linear_attn.in_proj_qkv", | |
| "model.layers.4.linear_attn.in_proj_z", | |
| "model.layers.4.linear_attn.out_proj", | |
| "model.layers.4.mlp.gate", | |
| "model.layers.4.mlp.shared_expert.down_proj", | |
| "model.layers.4.mlp.shared_expert.gate_proj", | |
| "model.layers.4.mlp.shared_expert.up_proj", | |
| "model.layers.4.mlp.shared_expert_gate", | |
| "model.layers.5.linear_attn.conv1d", | |
| "model.layers.5.linear_attn.in_proj_a", | |
| "model.layers.5.linear_attn.in_proj_b", | |
| "model.layers.5.linear_attn.in_proj_qkv", | |
| "model.layers.5.linear_attn.in_proj_z", | |
| "model.layers.5.linear_attn.out_proj", | |
| "model.layers.5.mlp.gate", | |
| "model.layers.5.mlp.shared_expert.down_proj", | |
| "model.layers.5.mlp.shared_expert.gate_proj", | |
| "model.layers.5.mlp.shared_expert.up_proj", | |
| "model.layers.5.mlp.shared_expert_gate", | |
| "model.layers.6.linear_attn.conv1d", | |
| "model.layers.6.linear_attn.in_proj_a", | |
| "model.layers.6.linear_attn.in_proj_b", | |
| "model.layers.6.linear_attn.in_proj_qkv", | |
| "model.layers.6.linear_attn.in_proj_z", | |
| "model.layers.6.linear_attn.out_proj", | |
| "model.layers.6.mlp.gate", | |
| "model.layers.6.mlp.shared_expert.down_proj", | |
| "model.layers.6.mlp.shared_expert.gate_proj", | |
| "model.layers.6.mlp.shared_expert.up_proj", | |
| "model.layers.6.mlp.shared_expert_gate", | |
| "model.layers.7.mlp.gate", | |
| "model.layers.7.mlp.shared_expert.down_proj", | |
| "model.layers.7.mlp.shared_expert.gate_proj", | |
| "model.layers.7.mlp.shared_expert.up_proj", | |
| "model.layers.7.mlp.shared_expert_gate", | |
| "model.layers.7.self_attn.k_proj", | |
| "model.layers.7.self_attn.o_proj", | |
| "model.layers.7.self_attn.q_proj", | |
| "model.layers.7.self_attn.v_proj", | |
| "mtp.fc", | |
| "mtp.layers.0.mlp.gate", | |
| "mtp.layers.0.mlp.shared_expert.down_proj", | |
| "mtp.layers.0.mlp.shared_expert.gate_proj", | |
| "mtp.layers.0.mlp.shared_expert.up_proj", | |
| "mtp.layers.0.mlp.shared_expert_gate", | |
| "mtp.layers.0.self_attn.k_proj", | |
| "mtp.layers.0.self_attn.o_proj", | |
| "mtp.layers.0.self_attn.q_proj", | |
| "mtp.layers.0.self_attn.v_proj" | |
| ] | |
| } | |
| } |