Instructions to use naver-hyperclovax/HyperCLOVAX-SEED-Vision-Instruct-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use naver-hyperclovax/HyperCLOVAX-SEED-Vision-Instruct-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="naver-hyperclovax/HyperCLOVAX-SEED-Vision-Instruct-3B", 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-Vision-Instruct-3B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use naver-hyperclovax/HyperCLOVAX-SEED-Vision-Instruct-3B 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-Vision-Instruct-3B" # 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-Vision-Instruct-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/naver-hyperclovax/HyperCLOVAX-SEED-Vision-Instruct-3B
- SGLang
How to use naver-hyperclovax/HyperCLOVAX-SEED-Vision-Instruct-3B 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-Vision-Instruct-3B" \ --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-Vision-Instruct-3B", "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-Vision-Instruct-3B" \ --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-Vision-Instruct-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use naver-hyperclovax/HyperCLOVAX-SEED-Vision-Instruct-3B with Docker Model Runner:
docker model run hf.co/naver-hyperclovax/HyperCLOVAX-SEED-Vision-Instruct-3B
dong.hyun commited on
Commit ·
c166ede
1
Parent(s): db17193
adposition_ids argument for verl
Browse files- modeling_hyperclovax.py +2 -0
modeling_hyperclovax.py
CHANGED
|
@@ -520,6 +520,7 @@ class HCXVisionForCausalLM(PreTrainedModel, GenerationMixin):
|
|
| 520 |
pixel_values_videos: Optional[List[List[torch.FloatTensor]]] = None,
|
| 521 |
past_key_values: Optional[Tuple[Tuple[torch.Tensor]]] = None,
|
| 522 |
attention_mask: Optional[torch.FloatTensor] = None,
|
|
|
|
| 523 |
inputs_embeds: Optional[torch.FloatTensor] = None,
|
| 524 |
labels: Optional[torch.LongTensor] = None,
|
| 525 |
use_cache: Optional[bool] = None,
|
|
@@ -596,6 +597,7 @@ class HCXVisionForCausalLM(PreTrainedModel, GenerationMixin):
|
|
| 596 |
input_ids=input_ids,
|
| 597 |
inputs_embeds=inputs_embeds,
|
| 598 |
attention_mask=attention_mask,
|
|
|
|
| 599 |
past_key_values=past_key_values,
|
| 600 |
use_cache=use_cache,
|
| 601 |
output_attentions=output_attentions,
|
|
|
|
| 520 |
pixel_values_videos: Optional[List[List[torch.FloatTensor]]] = None,
|
| 521 |
past_key_values: Optional[Tuple[Tuple[torch.Tensor]]] = None,
|
| 522 |
attention_mask: Optional[torch.FloatTensor] = None,
|
| 523 |
+
position_ids: Optional[torch.LongTensor] = None,
|
| 524 |
inputs_embeds: Optional[torch.FloatTensor] = None,
|
| 525 |
labels: Optional[torch.LongTensor] = None,
|
| 526 |
use_cache: Optional[bool] = None,
|
|
|
|
| 597 |
input_ids=input_ids,
|
| 598 |
inputs_embeds=inputs_embeds,
|
| 599 |
attention_mask=attention_mask,
|
| 600 |
+
position_ids=position_ids,
|
| 601 |
past_key_values=past_key_values,
|
| 602 |
use_cache=use_cache,
|
| 603 |
output_attentions=output_attentions,
|