Instructions to use naver-hyperclovax/HyperCLOVAX-SEED-Think-32B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use naver-hyperclovax/HyperCLOVAX-SEED-Think-32B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="naver-hyperclovax/HyperCLOVAX-SEED-Think-32B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("naver-hyperclovax/HyperCLOVAX-SEED-Think-32B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use naver-hyperclovax/HyperCLOVAX-SEED-Think-32B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "naver-hyperclovax/HyperCLOVAX-SEED-Think-32B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "naver-hyperclovax/HyperCLOVAX-SEED-Think-32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/naver-hyperclovax/HyperCLOVAX-SEED-Think-32B
- SGLang
How to use naver-hyperclovax/HyperCLOVAX-SEED-Think-32B 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 "naver-hyperclovax/HyperCLOVAX-SEED-Think-32B" \ --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": "naver-hyperclovax/HyperCLOVAX-SEED-Think-32B", "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 "naver-hyperclovax/HyperCLOVAX-SEED-Think-32B" \ --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": "naver-hyperclovax/HyperCLOVAX-SEED-Think-32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use naver-hyperclovax/HyperCLOVAX-SEED-Think-32B with Docker Model Runner:
docker model run hf.co/naver-hyperclovax/HyperCLOVAX-SEED-Think-32B
Update chat_template.jinja
#12
by jp1924 - opened
- chat_template.jinja +14 -23
chat_template.jinja
CHANGED
|
@@ -26,12 +26,14 @@
|
|
| 26 |
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
|
| 27 |
{%- endif %}
|
| 28 |
{%- endif %}
|
|
|
|
| 29 |
{%- set ns = namespace(last_user_index=-1) %}
|
| 30 |
{%- for m in messages %}
|
| 31 |
{%- if m.role == 'user' %}
|
| 32 |
{%- set ns.last_user_index = loop.index0 %}
|
| 33 |
{%- endif %}
|
| 34 |
{%- endfor %}
|
|
|
|
| 35 |
{%- for message in messages %}
|
| 36 |
{%- set content = message.get('content', '') or '' %}
|
| 37 |
{%- if (message.role == 'system' and not loop.first) %}
|
|
@@ -45,28 +47,17 @@
|
|
| 45 |
{%- if not loop.first %}
|
| 46 |
{{- '\n' }}
|
| 47 |
{%- endif %}
|
| 48 |
-
{%- if content['type']
|
| 49 |
-
{%- set
|
| 50 |
-
{%- set
|
| 51 |
-
{
|
| 52 |
-
{
|
| 53 |
-
{
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
{
|
| 58 |
-
{
|
| 59 |
-
{%- set video_id = 'video_%02d' % ns_vid.count %}
|
| 60 |
-
{%- set ns_vid.count = ns_vid.count + 1 %}
|
| 61 |
-
{{- '<|mime_start|>{"id": "' + video_id + '", "type": "video/mp4", "filename": "video.mp4"}<|mime_end|>\n' }}
|
| 62 |
-
{{- '<|video_aux_start|>다음 중 video_duration은 비디오 길이 정보입니다. 참고하여 답변하세요. {"video_duration": "<|video_meta_duration|>"}<|video_aux_end|>\n'}}
|
| 63 |
-
{{- '<|video_start|><|VIDEO_PAD|><|video_end|>\n'}}
|
| 64 |
-
{%- else %}
|
| 65 |
-
{%- set image_id = 'image_%02d' % ns_img.count %}
|
| 66 |
-
{%- set ns_img.count = ns_img.count + 1 %}
|
| 67 |
-
{{- '<|mime_start|>{"id": "' + image_id + '", "type": "image/jpeg", "filename": "image.jpg"}<|mime_end|>\n' }}
|
| 68 |
-
{{- '<|image_start|><|IMAGE_PAD|><|image_end|>' }}
|
| 69 |
-
{%- endif %}
|
| 70 |
{%- elif content['type'] == 'text' %}
|
| 71 |
{{- content['text'] }}
|
| 72 |
{%- endif %}
|
|
@@ -132,4 +123,4 @@
|
|
| 132 |
{%- else %}
|
| 133 |
{{- '<|im_start|>assistant\n<think>\n\n</think>\n\n' }}
|
| 134 |
{%- endif %}
|
| 135 |
-
{%- endif %}
|
|
|
|
| 26 |
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
|
| 27 |
{%- endif %}
|
| 28 |
{%- endif %}
|
| 29 |
+
|
| 30 |
{%- set ns = namespace(last_user_index=-1) %}
|
| 31 |
{%- for m in messages %}
|
| 32 |
{%- if m.role == 'user' %}
|
| 33 |
{%- set ns.last_user_index = loop.index0 %}
|
| 34 |
{%- endif %}
|
| 35 |
{%- endfor %}
|
| 36 |
+
|
| 37 |
{%- for message in messages %}
|
| 38 |
{%- set content = message.get('content', '') or '' %}
|
| 39 |
{%- if (message.role == 'system' and not loop.first) %}
|
|
|
|
| 47 |
{%- if not loop.first %}
|
| 48 |
{{- '\n' }}
|
| 49 |
{%- endif %}
|
| 50 |
+
{%- if content['type'] in ['video_url', 'video'] %}
|
| 51 |
+
{%- set video_id = 'video_%02d' % ns_vid.count %}
|
| 52 |
+
{%- set ns_vid.count = ns_vid.count + 1 %}
|
| 53 |
+
{{- '<|mime_start|>{"id": "' + video_id + '", "type": "video/mp4", "filename": "video.mp4"}<|mime_end|>\n' }}
|
| 54 |
+
{{- '<|video_aux_start|>다음 중 video_duration은 비디오 길이 정보입니다. 참고하여 답변하세요. {"video_duration": "<|video_meta_duration|>"}<|video_aux_end|>\n'}}
|
| 55 |
+
{{- '<|video_start|><|VIDEO_PAD|><|video_end|>' }}
|
| 56 |
+
{%- elif content['type'] in ['image_url', 'image'] %}
|
| 57 |
+
{%- set image_id = 'image_%02d' % ns_img.count %}
|
| 58 |
+
{%- set ns_img.count = ns_img.count + 1 %}
|
| 59 |
+
{{- '<|mime_start|>{"id": "' + image_id + '", "type": "image/jpeg", "filename": "image.jpg"}<|mime_end|>\n' }}
|
| 60 |
+
{{- '<|image_start|><|IMAGE_PAD|><|image_end|>' }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
{%- elif content['type'] == 'text' %}
|
| 62 |
{{- content['text'] }}
|
| 63 |
{%- endif %}
|
|
|
|
| 123 |
{%- else %}
|
| 124 |
{{- '<|im_start|>assistant\n<think>\n\n</think>\n\n' }}
|
| 125 |
{%- endif %}
|
| 126 |
+
{%- endif %}
|