Instructions to use tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned
- SGLang
How to use tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned 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 "tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned" \ --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": "tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned", "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 "tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned" \ --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": "tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned with Docker Model Runner:
docker model run hf.co/tech4humans/deepseek-vl2-tiny-swift-r2-rslora-bf16-merged-tuned
Upload processor_config.json
Browse files- processor_config.json +116 -0
processor_config.json
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_special_token": false,
|
| 3 |
+
"candidate_resolutions": [
|
| 4 |
+
[
|
| 5 |
+
384,
|
| 6 |
+
384
|
| 7 |
+
],
|
| 8 |
+
[
|
| 9 |
+
384,
|
| 10 |
+
768
|
| 11 |
+
],
|
| 12 |
+
[
|
| 13 |
+
768,
|
| 14 |
+
384
|
| 15 |
+
],
|
| 16 |
+
[
|
| 17 |
+
384,
|
| 18 |
+
1152
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
1152,
|
| 22 |
+
384
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
384,
|
| 26 |
+
1536
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
1536,
|
| 30 |
+
384
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
768,
|
| 34 |
+
768
|
| 35 |
+
],
|
| 36 |
+
[
|
| 37 |
+
384,
|
| 38 |
+
1920
|
| 39 |
+
],
|
| 40 |
+
[
|
| 41 |
+
1920,
|
| 42 |
+
384
|
| 43 |
+
],
|
| 44 |
+
[
|
| 45 |
+
384,
|
| 46 |
+
2304
|
| 47 |
+
],
|
| 48 |
+
[
|
| 49 |
+
2304,
|
| 50 |
+
384
|
| 51 |
+
],
|
| 52 |
+
[
|
| 53 |
+
768,
|
| 54 |
+
1152
|
| 55 |
+
],
|
| 56 |
+
[
|
| 57 |
+
1152,
|
| 58 |
+
768
|
| 59 |
+
],
|
| 60 |
+
[
|
| 61 |
+
384,
|
| 62 |
+
2688
|
| 63 |
+
],
|
| 64 |
+
[
|
| 65 |
+
2688,
|
| 66 |
+
384
|
| 67 |
+
],
|
| 68 |
+
[
|
| 69 |
+
384,
|
| 70 |
+
3072
|
| 71 |
+
],
|
| 72 |
+
[
|
| 73 |
+
3072,
|
| 74 |
+
384
|
| 75 |
+
],
|
| 76 |
+
[
|
| 77 |
+
768,
|
| 78 |
+
1536
|
| 79 |
+
],
|
| 80 |
+
[
|
| 81 |
+
1536,
|
| 82 |
+
768
|
| 83 |
+
],
|
| 84 |
+
[
|
| 85 |
+
384,
|
| 86 |
+
3456
|
| 87 |
+
],
|
| 88 |
+
[
|
| 89 |
+
3456,
|
| 90 |
+
384
|
| 91 |
+
],
|
| 92 |
+
[
|
| 93 |
+
1152,
|
| 94 |
+
1152
|
| 95 |
+
]
|
| 96 |
+
],
|
| 97 |
+
"downsample_ratio": 2,
|
| 98 |
+
"ignore_id": -100,
|
| 99 |
+
"image_mean": [
|
| 100 |
+
0.5,
|
| 101 |
+
0.5,
|
| 102 |
+
0.5
|
| 103 |
+
],
|
| 104 |
+
"image_std": [
|
| 105 |
+
0.5,
|
| 106 |
+
0.5,
|
| 107 |
+
0.5
|
| 108 |
+
],
|
| 109 |
+
"image_token": "<image>",
|
| 110 |
+
"mask_prompt": false,
|
| 111 |
+
"normalize": true,
|
| 112 |
+
"pad_token": "<\uff5c\u2581pad\u2581\uff5c>",
|
| 113 |
+
"patch_size": 14,
|
| 114 |
+
"processor_class": "DeepseekVLV2Processor",
|
| 115 |
+
"sft_format": "deepseek"
|
| 116 |
+
}
|