Instructions to use yuchenxie/Arlow-Vision-Encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yuchenxie/Arlow-Vision-Encoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yuchenxie/Arlow-Vision-Encoder")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("yuchenxie/Arlow-Vision-Encoder", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yuchenxie/Arlow-Vision-Encoder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yuchenxie/Arlow-Vision-Encoder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuchenxie/Arlow-Vision-Encoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/yuchenxie/Arlow-Vision-Encoder
- SGLang
How to use yuchenxie/Arlow-Vision-Encoder 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 "yuchenxie/Arlow-Vision-Encoder" \ --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": "yuchenxie/Arlow-Vision-Encoder", "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 "yuchenxie/Arlow-Vision-Encoder" \ --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": "yuchenxie/Arlow-Vision-Encoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yuchenxie/Arlow-Vision-Encoder with Docker Model Runner:
docker model run hf.co/yuchenxie/Arlow-Vision-Encoder
Upload folder using huggingface_hub
Browse files- config.json +36 -0
- image_processor/preprocessor_config.json +32 -0
- model.safetensors +3 -0
- processor_config.json +15 -0
- video_processor/video_preprocessor_config.json +34 -0
config.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ArlowVLVisionModel"
|
| 4 |
+
],
|
| 5 |
+
"deepstack_visual_indexes": [
|
| 6 |
+
12,
|
| 7 |
+
24,
|
| 8 |
+
44
|
| 9 |
+
],
|
| 10 |
+
"deformable_attention_strength": 4.0,
|
| 11 |
+
"deformable_attention_window": 0.25,
|
| 12 |
+
"depth": 48,
|
| 13 |
+
"dtype": "float16",
|
| 14 |
+
"embed_dim": 1536,
|
| 15 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 16 |
+
"hidden_size": 3072,
|
| 17 |
+
"in_channels": 3,
|
| 18 |
+
"initializer_range": 0.02,
|
| 19 |
+
"max_position_embeddings": 32768,
|
| 20 |
+
"mlp_ratio": 4,
|
| 21 |
+
"model_type": "arlow",
|
| 22 |
+
"mrope_sections": [
|
| 23 |
+
21,
|
| 24 |
+
21,
|
| 25 |
+
22
|
| 26 |
+
],
|
| 27 |
+
"num_attention_heads": 24,
|
| 28 |
+
"num_heads": 24,
|
| 29 |
+
"patch_size": 14,
|
| 30 |
+
"spatial_merge_size": 2,
|
| 31 |
+
"temporal_patch_size": 2,
|
| 32 |
+
"token_pruning_ratio": 0.0,
|
| 33 |
+
"transformers_version": "5.3.0.dev0",
|
| 34 |
+
"use_deformable_attention": true,
|
| 35 |
+
"use_progressive_patches": true
|
| 36 |
+
}
|
image_processor/preprocessor_config.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_convert_rgb": true,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_pan_and_scan": false,
|
| 5 |
+
"do_rescale": true,
|
| 6 |
+
"do_resize": true,
|
| 7 |
+
"image_mean": [
|
| 8 |
+
0.5,
|
| 9 |
+
0.5,
|
| 10 |
+
0.5
|
| 11 |
+
],
|
| 12 |
+
"image_processor_type": "ArlowImageProcessor",
|
| 13 |
+
"image_std": [
|
| 14 |
+
0.5,
|
| 15 |
+
0.5,
|
| 16 |
+
0.5
|
| 17 |
+
],
|
| 18 |
+
"max_pixels": 1003520,
|
| 19 |
+
"merge_size": 2,
|
| 20 |
+
"min_pixels": 3136,
|
| 21 |
+
"pan_and_scan_max_num_crops": 4,
|
| 22 |
+
"pan_and_scan_min_crop_size": 256,
|
| 23 |
+
"pan_and_scan_min_ratio_to_activate": 1.6,
|
| 24 |
+
"patch_size": 14,
|
| 25 |
+
"resample": 3,
|
| 26 |
+
"rescale_factor": 0.00392156862745098,
|
| 27 |
+
"size": {
|
| 28 |
+
"longest_edge": 1003520,
|
| 29 |
+
"shortest_edge": 3136
|
| 30 |
+
},
|
| 31 |
+
"temporal_patch_size": 2
|
| 32 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:66839f7e3f1171bada1d1194620be49d3d83d217d0ec1d37c4c950b921a2603a
|
| 3 |
+
size 3181374712
|
processor_config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"processor_class": "ArlowProcessor",
|
| 3 |
+
"image_processor_class": "ArlowImageProcessor",
|
| 4 |
+
"image_processor_subfolder": "image_processor",
|
| 5 |
+
"supports_multi_image": true,
|
| 6 |
+
"supports_video": true,
|
| 7 |
+
"patch_size": 14,
|
| 8 |
+
"temporal_patch_size": 2,
|
| 9 |
+
"merge_size": 2,
|
| 10 |
+
"schema_version": 1,
|
| 11 |
+
"video_processor_class": "ArlowVideoProcessor",
|
| 12 |
+
"video_processor_subfolder": "video_processor",
|
| 13 |
+
"max_frames": 96,
|
| 14 |
+
"timestamp_alignment": false
|
| 15 |
+
}
|
video_processor/video_preprocessor_config.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_last_selected_frame_indices": [],
|
| 3 |
+
"do_convert_rgb": true,
|
| 4 |
+
"do_normalize": true,
|
| 5 |
+
"do_rescale": true,
|
| 6 |
+
"do_resize": true,
|
| 7 |
+
"do_sample_frames": true,
|
| 8 |
+
"image_mean": [
|
| 9 |
+
0.5,
|
| 10 |
+
0.5,
|
| 11 |
+
0.5
|
| 12 |
+
],
|
| 13 |
+
"image_std": [
|
| 14 |
+
0.5,
|
| 15 |
+
0.5,
|
| 16 |
+
0.5
|
| 17 |
+
],
|
| 18 |
+
"max_frames": 96,
|
| 19 |
+
"max_volume": 786432,
|
| 20 |
+
"merge_size": 2,
|
| 21 |
+
"min_frames": 4,
|
| 22 |
+
"motion_threshold": 0.1,
|
| 23 |
+
"patch_size": 14,
|
| 24 |
+
"resample": 3,
|
| 25 |
+
"rescale_factor": 0.00392156862745098,
|
| 26 |
+
"return_metadata": false,
|
| 27 |
+
"sample_strategy": "uniform",
|
| 28 |
+
"size": {
|
| 29 |
+
"longest_edge": 786432,
|
| 30 |
+
"shortest_edge": 131072
|
| 31 |
+
},
|
| 32 |
+
"temporal_patch_size": 2,
|
| 33 |
+
"video_processor_type": "ArlowVideoProcessor"
|
| 34 |
+
}
|