Instructions to use kyutai/CASA-Helium1-VL-2B-Shared with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kyutai/CASA-Helium1-VL-2B-Shared with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="kyutai/CASA-Helium1-VL-2B-Shared", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("kyutai/CASA-Helium1-VL-2B-Shared", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kyutai/CASA-Helium1-VL-2B-Shared with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kyutai/CASA-Helium1-VL-2B-Shared" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kyutai/CASA-Helium1-VL-2B-Shared", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kyutai/CASA-Helium1-VL-2B-Shared
- SGLang
How to use kyutai/CASA-Helium1-VL-2B-Shared 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 "kyutai/CASA-Helium1-VL-2B-Shared" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kyutai/CASA-Helium1-VL-2B-Shared", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "kyutai/CASA-Helium1-VL-2B-Shared" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kyutai/CASA-Helium1-VL-2B-Shared", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kyutai/CASA-Helium1-VL-2B-Shared with Docker Model Runner:
docker model run hf.co/kyutai/CASA-Helium1-VL-2B-Shared
Download config.json from kyutai/CASA-Helium1-VL-2B-Shared: direct link, hf CLI and curl.
- Browser
- Download file 1.69 kB
-
https://huggingface.co/kyutai/CASA-Helium1-VL-2B-Shared/resolve/main/config.json
- Command line
-
hf download hf://kyutai/CASA-Helium1-VL-2B-Shared/config.json
-
curl -L -o config.json https://huggingface.co/kyutai/CASA-Helium1-VL-2B-Shared/resolve/main/config.json
1.69 kB
| { | |
| "architectures": [ | |
| "V2Helium1" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_helium1_ca.Helium1CAConfig", | |
| "AutoModel": "modeling_helium1_ca.V2Helium1" | |
| }, | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 1, | |
| "cross_attention": true, | |
| "eos_token_id": null, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 2048, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 8192, | |
| "max_position_embeddings": 4096, | |
| "mlp_bias": false, | |
| "model_type": "helium1_ca", | |
| "num_attention_heads": 16, | |
| "num_hidden_layers": 28, | |
| "num_key_value_heads": 8, | |
| "pad_token_id": 3, | |
| "post_image_tokens": [ | |
| 5 | |
| ], | |
| "pre_image_tokens": [ | |
| 4 | |
| ], | |
| "pretraining_tp": 1, | |
| "rms_norm_eps": 1e-08, | |
| "rope_scaling": null, | |
| "rope_theta": 20000.0, | |
| "tie_word_embeddings": false, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.51.3", | |
| "use_cache": true, | |
| "vision_config": { | |
| "depth": 32, | |
| "fullatt_block_indexes": [ | |
| 7, | |
| 15, | |
| 23, | |
| 31 | |
| ], | |
| "hidden_act": "silu", | |
| "hidden_size": 1280, | |
| "image_mean": [ | |
| 0.48145466, | |
| 0.4578275, | |
| 0.40821073 | |
| ], | |
| "image_std": [ | |
| 0.26862954, | |
| 0.26130258, | |
| 0.27577711 | |
| ], | |
| "in_channels": 3, | |
| "in_chans": 3, | |
| "intermediate_size": 3420, | |
| "model_type": "qwen2_5_vl", | |
| "num_heads": 16, | |
| "out_dim": 2048, | |
| "out_hidden_size": 2048, | |
| "patch_size": 14, | |
| "spatial_merge_size": 2, | |
| "spatial_patch_size": 14, | |
| "temporal_patch_size": 1, | |
| "tokens_per_second": 2, | |
| "window_size": 112 | |
| }, | |
| "vocab_size": 64000, | |
| "xa_custom_norm": true, | |
| "xa_layers": [], | |
| "image_proj_norm": false, | |
| "xa_share_qkvo": true | |
| } |