Image-Text-to-Text
Transformers
Safetensors
English
qwen2_5_vl
multimodal
unsloth
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug") model = AutoModelForMultimodalLM.from_pretrained("hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug
- SGLang
How to use hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug 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 "hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug" \ --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": "hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug", "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 "hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug" \ --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": "hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Desktop
- Docker Model Runner
How to use hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug with Docker Model Runner:
docker model run hf.co/hoanglv7501/Qwen2.5-VL-3B-Instruct-bnb-4bit-FixEOSbug
Update config.json
Browse files- config.json +86 -86
config.json
CHANGED
|
@@ -1,86 +1,86 @@
|
|
| 1 |
-
{
|
| 2 |
-
"architectures": [
|
| 3 |
-
"Qwen2_5_VLForConditionalGeneration"
|
| 4 |
-
],
|
| 5 |
-
"attention_dropout": 0.0,
|
| 6 |
-
"eos_token_id":
|
| 7 |
-
"hidden_act": "silu",
|
| 8 |
-
"hidden_size": 2048,
|
| 9 |
-
"image_token_id": 151655,
|
| 10 |
-
"initializer_range": 0.02,
|
| 11 |
-
"intermediate_size": 11008,
|
| 12 |
-
"max_position_embeddings": 128000,
|
| 13 |
-
"max_window_layers": 70,
|
| 14 |
-
"model_type": "qwen2_5_vl",
|
| 15 |
-
"num_attention_heads": 16,
|
| 16 |
-
"num_hidden_layers": 36,
|
| 17 |
-
"num_key_value_heads": 2,
|
| 18 |
-
"pad_token_id": 151654,
|
| 19 |
-
"quantization_config": {
|
| 20 |
-
"_load_in_4bit": true,
|
| 21 |
-
"_load_in_8bit": false,
|
| 22 |
-
"bnb_4bit_compute_dtype": "bfloat16",
|
| 23 |
-
"bnb_4bit_quant_storage": "uint8",
|
| 24 |
-
"bnb_4bit_quant_type": "nf4",
|
| 25 |
-
"bnb_4bit_use_double_quant": true,
|
| 26 |
-
"llm_int8_enable_fp32_cpu_offload": false,
|
| 27 |
-
"llm_int8_has_fp16_weight": false,
|
| 28 |
-
"llm_int8_skip_modules": [
|
| 29 |
-
"lm_head",
|
| 30 |
-
"multi_modal_projector",
|
| 31 |
-
"merger",
|
| 32 |
-
"modality_projection"
|
| 33 |
-
],
|
| 34 |
-
"llm_int8_threshold": 6.0,
|
| 35 |
-
"load_in_4bit": true,
|
| 36 |
-
"load_in_8bit": false,
|
| 37 |
-
"quant_method": "bitsandbytes"
|
| 38 |
-
},
|
| 39 |
-
"rms_norm_eps": 1e-06,
|
| 40 |
-
"rope_scaling": {
|
| 41 |
-
"mrope_section": [
|
| 42 |
-
16,
|
| 43 |
-
24,
|
| 44 |
-
24
|
| 45 |
-
],
|
| 46 |
-
"rope_type": "default",
|
| 47 |
-
"type": "default"
|
| 48 |
-
},
|
| 49 |
-
"rope_theta": 1000000.0,
|
| 50 |
-
"sliding_window": 32768,
|
| 51 |
-
"tie_word_embeddings": true,
|
| 52 |
-
"torch_dtype": "bfloat16",
|
| 53 |
-
"transformers_version": "4.51.3",
|
| 54 |
-
"unsloth_fixed": true,
|
| 55 |
-
"use_cache": true,
|
| 56 |
-
"use_sliding_window": false,
|
| 57 |
-
"video_token_id": 151656,
|
| 58 |
-
"vision_config": {
|
| 59 |
-
"depth": 32,
|
| 60 |
-
"fullatt_block_indexes": [
|
| 61 |
-
7,
|
| 62 |
-
15,
|
| 63 |
-
23,
|
| 64 |
-
31
|
| 65 |
-
],
|
| 66 |
-
"hidden_act": "silu",
|
| 67 |
-
"hidden_size": 1280,
|
| 68 |
-
"in_channels": 3,
|
| 69 |
-
"in_chans": 3,
|
| 70 |
-
"intermediate_size": 3420,
|
| 71 |
-
"model_type": "qwen2_5_vl",
|
| 72 |
-
"num_heads": 16,
|
| 73 |
-
"out_hidden_size": 2048,
|
| 74 |
-
"patch_size": 14,
|
| 75 |
-
"spatial_merge_size": 2,
|
| 76 |
-
"spatial_patch_size": 14,
|
| 77 |
-
"temporal_patch_size": 2,
|
| 78 |
-
"tokens_per_second": 2,
|
| 79 |
-
"torch_dtype": "bfloat16",
|
| 80 |
-
"window_size": 112
|
| 81 |
-
},
|
| 82 |
-
"vision_end_token_id": 151653,
|
| 83 |
-
"vision_start_token_id": 151652,
|
| 84 |
-
"vision_token_id": 151654,
|
| 85 |
-
"vocab_size": 151936
|
| 86 |
-
}
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen2_5_VLForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"eos_token_id": 151643,
|
| 7 |
+
"hidden_act": "silu",
|
| 8 |
+
"hidden_size": 2048,
|
| 9 |
+
"image_token_id": 151655,
|
| 10 |
+
"initializer_range": 0.02,
|
| 11 |
+
"intermediate_size": 11008,
|
| 12 |
+
"max_position_embeddings": 128000,
|
| 13 |
+
"max_window_layers": 70,
|
| 14 |
+
"model_type": "qwen2_5_vl",
|
| 15 |
+
"num_attention_heads": 16,
|
| 16 |
+
"num_hidden_layers": 36,
|
| 17 |
+
"num_key_value_heads": 2,
|
| 18 |
+
"pad_token_id": 151654,
|
| 19 |
+
"quantization_config": {
|
| 20 |
+
"_load_in_4bit": true,
|
| 21 |
+
"_load_in_8bit": false,
|
| 22 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
| 23 |
+
"bnb_4bit_quant_storage": "uint8",
|
| 24 |
+
"bnb_4bit_quant_type": "nf4",
|
| 25 |
+
"bnb_4bit_use_double_quant": true,
|
| 26 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 27 |
+
"llm_int8_has_fp16_weight": false,
|
| 28 |
+
"llm_int8_skip_modules": [
|
| 29 |
+
"lm_head",
|
| 30 |
+
"multi_modal_projector",
|
| 31 |
+
"merger",
|
| 32 |
+
"modality_projection"
|
| 33 |
+
],
|
| 34 |
+
"llm_int8_threshold": 6.0,
|
| 35 |
+
"load_in_4bit": true,
|
| 36 |
+
"load_in_8bit": false,
|
| 37 |
+
"quant_method": "bitsandbytes"
|
| 38 |
+
},
|
| 39 |
+
"rms_norm_eps": 1e-06,
|
| 40 |
+
"rope_scaling": {
|
| 41 |
+
"mrope_section": [
|
| 42 |
+
16,
|
| 43 |
+
24,
|
| 44 |
+
24
|
| 45 |
+
],
|
| 46 |
+
"rope_type": "default",
|
| 47 |
+
"type": "default"
|
| 48 |
+
},
|
| 49 |
+
"rope_theta": 1000000.0,
|
| 50 |
+
"sliding_window": 32768,
|
| 51 |
+
"tie_word_embeddings": true,
|
| 52 |
+
"torch_dtype": "bfloat16",
|
| 53 |
+
"transformers_version": "4.51.3",
|
| 54 |
+
"unsloth_fixed": true,
|
| 55 |
+
"use_cache": true,
|
| 56 |
+
"use_sliding_window": false,
|
| 57 |
+
"video_token_id": 151656,
|
| 58 |
+
"vision_config": {
|
| 59 |
+
"depth": 32,
|
| 60 |
+
"fullatt_block_indexes": [
|
| 61 |
+
7,
|
| 62 |
+
15,
|
| 63 |
+
23,
|
| 64 |
+
31
|
| 65 |
+
],
|
| 66 |
+
"hidden_act": "silu",
|
| 67 |
+
"hidden_size": 1280,
|
| 68 |
+
"in_channels": 3,
|
| 69 |
+
"in_chans": 3,
|
| 70 |
+
"intermediate_size": 3420,
|
| 71 |
+
"model_type": "qwen2_5_vl",
|
| 72 |
+
"num_heads": 16,
|
| 73 |
+
"out_hidden_size": 2048,
|
| 74 |
+
"patch_size": 14,
|
| 75 |
+
"spatial_merge_size": 2,
|
| 76 |
+
"spatial_patch_size": 14,
|
| 77 |
+
"temporal_patch_size": 2,
|
| 78 |
+
"tokens_per_second": 2,
|
| 79 |
+
"torch_dtype": "bfloat16",
|
| 80 |
+
"window_size": 112
|
| 81 |
+
},
|
| 82 |
+
"vision_end_token_id": 151653,
|
| 83 |
+
"vision_start_token_id": 151652,
|
| 84 |
+
"vision_token_id": 151654,
|
| 85 |
+
"vocab_size": 151936
|
| 86 |
+
}
|