Instructions to use naver-hyperclovax/HyperCLOVAX-SEED-Think-14B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use naver-hyperclovax/HyperCLOVAX-SEED-Think-14B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="naver-hyperclovax/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("naver-hyperclovax/HyperCLOVAX-SEED-Think-14B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("naver-hyperclovax/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
- vLLM
How to use naver-hyperclovax/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 "naver-hyperclovax/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": "naver-hyperclovax/HyperCLOVAX-SEED-Think-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/naver-hyperclovax/HyperCLOVAX-SEED-Think-14B
- SGLang
How to use naver-hyperclovax/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 "naver-hyperclovax/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": "naver-hyperclovax/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 "naver-hyperclovax/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": "naver-hyperclovax/HyperCLOVAX-SEED-Think-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use naver-hyperclovax/HyperCLOVAX-SEED-Think-14B with Docker Model Runner:
docker model run hf.co/naver-hyperclovax/HyperCLOVAX-SEED-Think-14B
inference 시 tool calling format 관련 문의
안녕하세요.
당사에서 개발해주신 모델 잘 쓰고 있습니다.
다름이 아니라 HyperCLOVA X SEED 14B Think 모델을 이용하여 tool calling을 할 때, 모델 소개 페이지에 나와 있는 포맷을 지키지 않을 때가 많아 이 부분에 대해 문의 드리고자 글을 올리게 되었습니다.
huggingface에 나와 있는 모델의 tool calling 형식은 아래와 같습니다.
{following the previous context}
Let's check the weather using the get_weather tool.<|im_end|>
<|im_start|>assistant -> tool/function_call
{"name": "get_weather","input": {"location":"Seoul"}}<|im_end|><|stop|>
그러나 적지 않은 응답에서 아래와 같이 잘못된 형식으로 함수를 호출하였습니다.
(BFCL과 FunctionChat-Bench를 사용하여 모델의 tool calling 능력을 평가했을 때 얻은 응답입니다.)
-> tool/informWeather\n{\"location\": \"노원구\"}
-> tool/informWeather\n{\"name\": \"informWeather\", \"arguments\": {\"location\": \"부산\"}}
이렇게 호출을 할 경우 hcx parser로도 파싱이 되지 않아 오답 처리가 되는데요. 시스템 프롬프트를 바꿔보아도 결과가 달라지지 않아 문의 드립니다.
혹시 함수의 function calling format을 강제할 수 있는 다른 방법이 있을까요?
참고가 될까 싶어 제가 사용한 인퍼런스 코드 snippet도 첨부합니다.
감사합니다.
---인퍼런스 코드 snippet----
- vLLM 실행 부분
cmd = [
"vllm", "serve",
self.model_path,
"--host", self.host,
"--port", str(self.port),
"--dtype", "bfloat16",
"--gpu-memory-utilization", "0.90",
"--trust-remote-code",
"--reasoning-parser", "hcx",
"--enable-auto-tool-choice",
"--tool-call-parser", "hcx",
]
self.proc = subprocess.Popen(
cmd,
stdout=subprocess.DEVNULL,
stderr=subprocess.STDOUT,
start_new_session=True
)
- OpenAI compatible API로 single inference하는 부분
response = self.openai_chat_completion(
model=self.model_path,
temperature=api_request['temperature'],
messages=api_request['messages'],
tools=api_request['tools'],
tool_choice="auto",
max_completion_tokens=self.max_tokens,
stop=["<|im_end|><|endofturn|>", "<|im_end|><|stop|>"],
extra_body={
"skip_special_tokens": False,
}
)