Instructions to use ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- vLLM
How to use ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128
- SGLang
How to use ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128 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 "ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128" \ --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": "ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128", "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 "ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128" \ --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": "ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128 with Docker Model Runner:
docker model run hf.co/ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128
Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128
This is a GPTQ-quantized version of microsoft/Phi-tiny-MoE-instruct, created with GPTQModel 7.3.4.
It is intended as a small mixed-group-size PhiMoE checkpoint and loader integration fixture.
What is special about this checkpoint?
The global configuration is symmetric W4G128. Exact per-module dynamic overrides use W4G32 for attention
Q/K/V and every expert gate/up projection. This is mixed group-size quantization; all quantized weights use 4 bits.
| Projection family | Modules per layer | Configuration | Modules in 32 layers |
|---|---|---|---|
| Attention Q/K/V | 3 | W4G32 | 96 |
| Attention output | 1 | W4G128 | 32 |
| 16 experts x gate/up | 32 | W4G32 | 1,024 |
| 16 experts x down | 16 | W4G128 | 512 |
| Total | 52 | 1,664 |
Across the complete model:
- All 32 decoder layers and all 16 experts per layer are quantized.
- 1,120 projections use W4G32 dynamic overrides.
- 544 projections use the global W4G128 setting.
- The 32 routers and
lm_headremain dense by design. qweight,qzeros,scales, andg_idxare present for all 1,664 quantized projections.
Quantization details
| Setting | Value |
|---|---|
| Source dtype | BF16 |
| Method / format | GPTQ / gptq |
| Bits | 4 everywhere |
| Global group size | 128 |
| Dynamic group size | 32 |
| Symmetric | Yes |
Activation order (desc_act) |
No |
| Group-aware activation ordering | Yes |
| Sequential quantization | Yes |
| MSE search | 2 |
| Pack dtype / implementation | INT32 / GPU |
| Calibration samples | 257 |
| Calibration concatenation size | 4,096 tokens |
| Observed attention calibration tokens | 97,946 |
| Checkpoint layout | One unsharded model.safetensors file |
| Quantization runtime | GPTQModel 7.3.4, Transformers 5.14.1, Torch 2.9.1+cu130 |
Every expert received a nonzero number of calibration activations during quantization.
Loading
from gptqmodel import BACKEND, GPTQModel
model = GPTQModel.load(
"ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128",
backend=BACKEND.GPTQ_TORCH,
device="cuda",
)
Validation reloads all 1,664 quantized projections with the expected group sizes and completes a finite-logit forward pass. No downstream quality benchmark is claimed; evaluate the checkpoint for the intended use case.
- Downloads last month
- -
Model tree for ModelCloud/Phi-tiny-MoE-instruct-GPTQ-W4-MixedGroup-G32-G128
Base model
microsoft/Phi-tiny-MoE-instruct