Instructions to use HandmadeMayo/UDOP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HandmadeMayo/UDOP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="HandmadeMayo/UDOP")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("HandmadeMayo/UDOP") model = AutoModelForImageTextToText.from_pretrained("HandmadeMayo/UDOP") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use HandmadeMayo/UDOP with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HandmadeMayo/UDOP" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HandmadeMayo/UDOP", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HandmadeMayo/UDOP
- SGLang
How to use HandmadeMayo/UDOP 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 "HandmadeMayo/UDOP" \ --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": "HandmadeMayo/UDOP", "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 "HandmadeMayo/UDOP" \ --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": "HandmadeMayo/UDOP", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HandmadeMayo/UDOP with Docker Model Runner:
docker model run hf.co/HandmadeMayo/UDOP
Upload UdopForConditionalGeneration
Browse files- config.json +1 -1
- generation_config.json +1 -1
- model.safetensors +1 -1
config.json
CHANGED
|
@@ -38,7 +38,7 @@
|
|
| 38 |
}
|
| 39 |
],
|
| 40 |
"torch_dtype": "float32",
|
| 41 |
-
"transformers_version": "4.
|
| 42 |
"use_cache": true,
|
| 43 |
"vocab_size": 33255
|
| 44 |
}
|
|
|
|
| 38 |
}
|
| 39 |
],
|
| 40 |
"torch_dtype": "float32",
|
| 41 |
+
"transformers_version": "4.42.4",
|
| 42 |
"use_cache": true,
|
| 43 |
"vocab_size": 33255
|
| 44 |
}
|
generation_config.json
CHANGED
|
@@ -3,5 +3,5 @@
|
|
| 3 |
"decoder_start_token_id": 0,
|
| 4 |
"eos_token_id": 1,
|
| 5 |
"pad_token_id": 0,
|
| 6 |
-
"transformers_version": "4.
|
| 7 |
}
|
|
|
|
| 3 |
"decoder_start_token_id": 0,
|
| 4 |
"eos_token_id": 1,
|
| 5 |
"pad_token_id": 0,
|
| 6 |
+
"transformers_version": "4.42.4"
|
| 7 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2966898360
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f7ea152b1a89314abef332af25de0b09a6881509328d626745c32d6afa24bff8
|
| 3 |
size 2966898360
|