Instructions to use AngelSlim/Hy3-GPTQ-Int4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- vLLM
How to use AngelSlim/Hy3-GPTQ-Int4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AngelSlim/Hy3-GPTQ-Int4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AngelSlim/Hy3-GPTQ-Int4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AngelSlim/Hy3-GPTQ-Int4
- SGLang
How to use AngelSlim/Hy3-GPTQ-Int4 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 "AngelSlim/Hy3-GPTQ-Int4" \ --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": "AngelSlim/Hy3-GPTQ-Int4", "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 "AngelSlim/Hy3-GPTQ-Int4" \ --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": "AngelSlim/Hy3-GPTQ-Int4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AngelSlim/Hy3-GPTQ-Int4 with Docker Model Runner:
docker model run hf.co/AngelSlim/Hy3-GPTQ-Int4
Upload config.json with huggingface_hub
Browse files- config.json +56 -0
config.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"HYV3ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"bos_token_id": 120000,
|
| 6 |
+
"enable_attention_fp32_softmax": false,
|
| 7 |
+
"enable_lm_head_fp32": true,
|
| 8 |
+
"enable_moe_fp32_combine": false,
|
| 9 |
+
"eod_token_id": 120026,
|
| 10 |
+
"eos_token_id": 120025,
|
| 11 |
+
"expert_hidden_dim": 1536,
|
| 12 |
+
"moe_intermediate_size": 1536,
|
| 13 |
+
"first_k_dense_replace": 1,
|
| 14 |
+
"head_dim": 128,
|
| 15 |
+
"hidden_act": "silu",
|
| 16 |
+
"hidden_size": 4096,
|
| 17 |
+
"initializer_range": 0.006,
|
| 18 |
+
"intermediate_size": 13312,
|
| 19 |
+
"max_position_embeddings": 262144,
|
| 20 |
+
"model_type": "hy_v3",
|
| 21 |
+
"moe_router_enable_expert_bias": true,
|
| 22 |
+
"moe_router_use_sigmoid": true,
|
| 23 |
+
"num_attention_heads": 64,
|
| 24 |
+
"num_experts": 192,
|
| 25 |
+
"num_experts_per_tok": 8,
|
| 26 |
+
"num_hidden_layers": 80,
|
| 27 |
+
"num_key_value_heads": 8,
|
| 28 |
+
"num_shared_experts": 1,
|
| 29 |
+
"output_router_logits": true,
|
| 30 |
+
"pad_token_id": 120002,
|
| 31 |
+
"qk_norm": true,
|
| 32 |
+
"rms_norm_eps": 1e-05,
|
| 33 |
+
"rope_parameters": {
|
| 34 |
+
"rope_theta": 11158840.0,
|
| 35 |
+
"rope_type": "default"
|
| 36 |
+
},
|
| 37 |
+
"route_norm": true,
|
| 38 |
+
"router_scaling_factor": 2.826,
|
| 39 |
+
"sep_token_id": 120007,
|
| 40 |
+
"tie_word_embeddings": false,
|
| 41 |
+
"transformers_version": "5.6.0",
|
| 42 |
+
"use_cache": true,
|
| 43 |
+
"use_grouped_mm": false,
|
| 44 |
+
"vocab_size": 120832,
|
| 45 |
+
"num_nextn_predict_layers": 0,
|
| 46 |
+
"quantization_config": {
|
| 47 |
+
"bits": 4,
|
| 48 |
+
"checkpoint_format": "gptq",
|
| 49 |
+
"desc_act": false,
|
| 50 |
+
"group_size": 128,
|
| 51 |
+
"quant_method": "gptq",
|
| 52 |
+
"static_groups": true,
|
| 53 |
+
"sym": true,
|
| 54 |
+
"true_sequential": true
|
| 55 |
+
}
|
| 56 |
+
}
|