Instructions to use FriendliAI/HyperCLOVAX-SEED-Think-14B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FriendliAI/HyperCLOVAX-SEED-Think-14B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FriendliAI/HyperCLOVAX-SEED-Think-14B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("FriendliAI/HyperCLOVAX-SEED-Think-14B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("FriendliAI/HyperCLOVAX-SEED-Think-14B", trust_remote_code=True) 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FriendliAI/HyperCLOVAX-SEED-Think-14B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FriendliAI/HyperCLOVAX-SEED-Think-14B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FriendliAI/HyperCLOVAX-SEED-Think-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FriendliAI/HyperCLOVAX-SEED-Think-14B
- SGLang
How to use FriendliAI/HyperCLOVAX-SEED-Think-14B 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 "FriendliAI/HyperCLOVAX-SEED-Think-14B" \ --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": "FriendliAI/HyperCLOVAX-SEED-Think-14B", "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 "FriendliAI/HyperCLOVAX-SEED-Think-14B" \ --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": "FriendliAI/HyperCLOVAX-SEED-Think-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FriendliAI/HyperCLOVAX-SEED-Think-14B with Docker Model Runner:
docker model run hf.co/FriendliAI/HyperCLOVAX-SEED-Think-14B
Upload folder using huggingface_hub
Browse files- chat_template.jinja +11 -9
- spec_model.safetensors +3 -0
- version.txt +1 -0
chat_template.jinja
CHANGED
|
@@ -37,13 +37,15 @@
|
|
| 37 |
|
| 38 |
{%- if message.content is string %}
|
| 39 |
{%- set content = message.content %}
|
|
|
|
|
|
|
| 40 |
{%- else %}
|
| 41 |
{%- set content = '' %}
|
| 42 |
{%- endif %}
|
| 43 |
|
| 44 |
{%- set reasoning_content = '' %}
|
| 45 |
{%- if message.reasoning_content is defined and message.reasoning_content is not none %}
|
| 46 |
-
{%- set reasoning_content = message.reasoning_content %}
|
| 47 |
{%- endif %}
|
| 48 |
{%- if message.role == "assistant" %}
|
| 49 |
{%- if loop.index0 > ns.last_query_index %}
|
|
@@ -90,11 +92,11 @@
|
|
| 90 |
{%- endif %}
|
| 91 |
{%- endfor %}
|
| 92 |
{%- if add_generation_prompt %}
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
{%- endif %}
|
|
|
|
| 37 |
|
| 38 |
{%- if message.content is string %}
|
| 39 |
{%- set content = message.content %}
|
| 40 |
+
{%- elif message.content is iterable %}
|
| 41 |
+
{%- set content = message.content | map(attribute='text') | join %}
|
| 42 |
{%- else %}
|
| 43 |
{%- set content = '' %}
|
| 44 |
{%- endif %}
|
| 45 |
|
| 46 |
{%- set reasoning_content = '' %}
|
| 47 |
{%- if message.reasoning_content is defined and message.reasoning_content is not none %}
|
| 48 |
+
{%- set reasoning_content = message.reasoning_content %}
|
| 49 |
{%- endif %}
|
| 50 |
{%- if message.role == "assistant" %}
|
| 51 |
{%- if loop.index0 > ns.last_query_index %}
|
|
|
|
| 92 |
{%- endif %}
|
| 93 |
{%- endfor %}
|
| 94 |
{%- if add_generation_prompt %}
|
| 95 |
+
{%- if (force_reasoning is defined and force_reasoning) or (enable_thinking is defined and enable_thinking) %}
|
| 96 |
+
{{- '<|im_start|>assistant/think\n' }}
|
| 97 |
+
{%- elif (skip_reasoning is defined and skip_reasoning) or (enable_thinking is defined and enable_thinking is false) %}
|
| 98 |
+
{{- '<|im_start|>assistant\n' }}
|
| 99 |
+
{%- else %}
|
| 100 |
+
{{- '<|im_start|>assistant' }}
|
| 101 |
+
{%- endif %}
|
| 102 |
+
{%- endif %}
|
spec_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:73744872fb4fc26da957b7e90b33cfe0b614104f500c9cfc176006d5cc196144
|
| 3 |
+
size 1358954615
|
version.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
1.0.0
|