Instructions to use naver-hyperclovax/HyperCLOVAX-SEED-Text-Instruct-1.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use naver-hyperclovax/HyperCLOVAX-SEED-Text-Instruct-1.5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="naver-hyperclovax/HyperCLOVAX-SEED-Text-Instruct-1.5B") 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-Text-Instruct-1.5B") model = AutoModelForCausalLM.from_pretrained("naver-hyperclovax/HyperCLOVAX-SEED-Text-Instruct-1.5B") 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-Text-Instruct-1.5B 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-Text-Instruct-1.5B" # 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-Text-Instruct-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/naver-hyperclovax/HyperCLOVAX-SEED-Text-Instruct-1.5B
- SGLang
How to use naver-hyperclovax/HyperCLOVAX-SEED-Text-Instruct-1.5B 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-Text-Instruct-1.5B" \ --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-Text-Instruct-1.5B", "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-Text-Instruct-1.5B" \ --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-Text-Instruct-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use naver-hyperclovax/HyperCLOVAX-SEED-Text-Instruct-1.5B with Docker Model Runner:
docker model run hf.co/naver-hyperclovax/HyperCLOVAX-SEED-Text-Instruct-1.5B
Model keeps repeating the prompt – how can I avoid this?
Hi, I'm using the naver-hyperclovax/HyperCLOVAX-SEED-Text-Instruct-1.5B model for inference via the transformers library.
I applied the chat template using tokenizer.apply_chat_template() with add_generation_prompt=True, and I can generate outputs successfully using model.generate(). However, I noticed that the model keeps repeating the full prompt—including the system and user messages—in its response, instead of generating only the assistant reply.
Here's a minimal example:
chat = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is quantum mechanics?"}
]
inputs = tokenizer.apply_chat_template(chat, add_generation_prompt=True, return_tensors="pt").to(device)
output_ids = model.generate(**inputs, max_new_tokens=512)
decoded = tokenizer.decode(output_ids[0])
print(decoded)
Hi! Great question!
This behavior is expected due to how model.generate() works by default.
When using model.generate(), the output will include the input_ids unless you explicitly slice them out. This is a common pattern when using Hugging Face models.
Here’s a more complete example that extracts only the newly generated tokens by slicing out the input portion:
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "naver-hyperclovax/HyperCLOVAX-SEED-Text-Instruct-1.5B"
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="cuda")
tokenizer = AutoTokenizer.from_pretrained(model_name)
chat = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is quantum mechanics?"}
]
inputs = tokenizer.apply_chat_template(chat, return_dict=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
input_ids = inputs["input_ids"]
input_length = input_ids.shape[1]
output_ids = model.generate(
**inputs,
max_new_tokens=512,
stop_strings=["<|stop|>", "<|endofturn|>"],
tokenizer=tokenizer
)
# Decode the full output (including prompt)
print("## Full output:")
print(tokenizer.decode(output_ids[0], skip_special_tokens=False))
# Decode only the newly generated part
print("\n## Assistant's reply only:")
print(tokenizer.decode(output_ids[0][input_length:], skip_special_tokens=True))
This way, you’ll get only the assistant’s reply without the repeated prompt.
Let me know if you have any more questions!