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("image-text-to-text", model="naver-hyperclovax/HyperCLOVAX-SEED-Think-32B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("naver-hyperclovax/HyperCLOVAX-SEED-Think-32B") model = AutoModelForMultimodalLM.from_pretrained("naver-hyperclovax/HyperCLOVAX-SEED-Think-32B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - 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
HyperCLOVAX-SEED-32B 모델의 `model_type`을 `hyperclovax_vision_v2`으로 변경 요청드립니다 (transformers PR 연계)
#11
by jp1924 - opened
- config.json +1 -1
- configuration_vlm.py +1 -1
config.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
| 22 |
"is_safetensor_save": true,
|
| 23 |
"max_num_grids": -1,
|
| 24 |
"mm_projector_type": "linear",
|
| 25 |
-
"model_type": "
|
| 26 |
"num_queries_vis_abstractor": -1,
|
| 27 |
"pad_token_id": 0,
|
| 28 |
"possible_resolutions": [],
|
|
|
|
| 22 |
"is_safetensor_save": true,
|
| 23 |
"max_num_grids": -1,
|
| 24 |
"mm_projector_type": "linear",
|
| 25 |
+
"model_type": "hyperclovax_vision_v2",
|
| 26 |
"num_queries_vis_abstractor": -1,
|
| 27 |
"pad_token_id": 0,
|
| 28 |
"possible_resolutions": [],
|
configuration_vlm.py
CHANGED
|
@@ -3,7 +3,7 @@ from transformers import AutoConfig, PretrainedConfig
|
|
| 3 |
|
| 4 |
|
| 5 |
class HCXVisionConfig(PretrainedConfig):
|
| 6 |
-
model_type = "
|
| 7 |
keys_to_ignore_at_inference = ["past_key_values"]
|
| 8 |
|
| 9 |
def __init__(
|
|
|
|
| 3 |
|
| 4 |
|
| 5 |
class HCXVisionConfig(PretrainedConfig):
|
| 6 |
+
model_type = "hyperclovax_vision_v2"
|
| 7 |
keys_to_ignore_at_inference = ["past_key_values"]
|
| 8 |
|
| 9 |
def __init__(
|