Text Generation
Transformers
Safetensors
hy_v4
hunyuan
hy4
Mixture of Experts
conversational
Eval Results
Instructions to use tencent/Hy4-preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tencent/Hy4-preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tencent/Hy4-preview") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("tencent/Hy4-preview", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tencent/Hy4-preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tencent/Hy4-preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/Hy4-preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tencent/Hy4-preview
- SGLang
How to use tencent/Hy4-preview 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 "tencent/Hy4-preview" \ --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": "tencent/Hy4-preview", "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 "tencent/Hy4-preview" \ --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": "tencent/Hy4-preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tencent/Hy4-preview with Docker Model Runner:
docker model run hf.co/tencent/Hy4-preview
Add community evaluation results for DEEP-SWE, GPQA, SKILLSBENCH, SWE-BENCH_MULTILINGUAL, SWE-BENCH_PRO
#3
by nielsr HF Staff - opened
.eval_results/deep-swe.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- dataset:
|
| 2 |
+
id: datacurve/deep-swe
|
| 3 |
+
task_id: deep_swe
|
| 4 |
+
value: 64.3
|
| 5 |
+
source:
|
| 6 |
+
url: https://huggingface.co/tencent/Hy4-preview
|
| 7 |
+
name: Model Card
|
.eval_results/gpqa.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- dataset:
|
| 2 |
+
id: Idavidrein/gpqa
|
| 3 |
+
task_id: diamond
|
| 4 |
+
value: 92.3
|
| 5 |
+
source:
|
| 6 |
+
url: https://huggingface.co/tencent/Hy4-preview
|
| 7 |
+
name: Model Card
|
.eval_results/skillsbench.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- dataset:
|
| 2 |
+
id: benchflow/skillsbench
|
| 3 |
+
task_id: skillsbench_v1_1
|
| 4 |
+
value: 62.9
|
| 5 |
+
source:
|
| 6 |
+
url: https://huggingface.co/tencent/Hy4-preview
|
| 7 |
+
name: Model Card
|
.eval_results/swe-bench_multilingual.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- dataset:
|
| 2 |
+
id: SWE-bench/SWE-bench_Multilingual
|
| 3 |
+
task_id: swe_bench_multilingual_%_resolved
|
| 4 |
+
value: 82.9
|
| 5 |
+
source:
|
| 6 |
+
url: https://huggingface.co/tencent/Hy4-preview
|
| 7 |
+
name: Model Card
|
.eval_results/swe-bench_pro.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- dataset:
|
| 2 |
+
id: ScaleAI/SWE-bench_Pro
|
| 3 |
+
task_id: SWE_Bench_Pro
|
| 4 |
+
value: 65.7
|
| 5 |
+
source:
|
| 6 |
+
url: https://huggingface.co/tencent/Hy4-preview
|
| 7 |
+
name: Model Card
|