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", dtype="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
| { | |
| "add_special_token": false, | |
| "candidate_resolutions": [ | |
| [ | |
| 384, | |
| 384 | |
| ], | |
| [ | |
| 384, | |
| 768 | |
| ], | |
| [ | |
| 768, | |
| 384 | |
| ], | |
| [ | |
| 384, | |
| 1152 | |
| ], | |
| [ | |
| 1152, | |
| 384 | |
| ], | |
| [ | |
| 384, | |
| 1536 | |
| ], | |
| [ | |
| 1536, | |
| 384 | |
| ], | |
| [ | |
| 768, | |
| 768 | |
| ], | |
| [ | |
| 384, | |
| 1920 | |
| ], | |
| [ | |
| 1920, | |
| 384 | |
| ], | |
| [ | |
| 384, | |
| 2304 | |
| ], | |
| [ | |
| 2304, | |
| 384 | |
| ], | |
| [ | |
| 768, | |
| 1152 | |
| ], | |
| [ | |
| 1152, | |
| 768 | |
| ], | |
| [ | |
| 384, | |
| 2688 | |
| ], | |
| [ | |
| 2688, | |
| 384 | |
| ], | |
| [ | |
| 384, | |
| 3072 | |
| ], | |
| [ | |
| 3072, | |
| 384 | |
| ], | |
| [ | |
| 768, | |
| 1536 | |
| ], | |
| [ | |
| 1536, | |
| 768 | |
| ], | |
| [ | |
| 384, | |
| 3456 | |
| ], | |
| [ | |
| 3456, | |
| 384 | |
| ], | |
| [ | |
| 1152, | |
| 1152 | |
| ] | |
| ], | |
| "downsample_ratio": 2, | |
| "ignore_id": -100, | |
| "image_mean": [ | |
| 0.5, | |
| 0.5, | |
| 0.5 | |
| ], | |
| "image_std": [ | |
| 0.5, | |
| 0.5, | |
| 0.5 | |
| ], | |
| "image_token": "<image>", | |
| "mask_prompt": false, | |
| "normalize": true, | |
| "pad_token": "<\uff5c\u2581pad\u2581\uff5c>", | |
| "patch_size": 14, | |
| "processor_class": "DeepseekVLV2Processor", | |
| "sft_format": "deepseek" | |
| } | |