Instructions to use Gopal2002/donut_visual_zeon with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Gopal2002/donut_visual_zeon with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Gopal2002/donut_visual_zeon")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Gopal2002/donut_visual_zeon") model = AutoModelForMultimodalLM.from_pretrained("Gopal2002/donut_visual_zeon", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Gopal2002/donut_visual_zeon with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Gopal2002/donut_visual_zeon" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gopal2002/donut_visual_zeon", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Gopal2002/donut_visual_zeon
- SGLang
How to use Gopal2002/donut_visual_zeon 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 "Gopal2002/donut_visual_zeon" \ --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": "Gopal2002/donut_visual_zeon", "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 "Gopal2002/donut_visual_zeon" \ --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": "Gopal2002/donut_visual_zeon", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Gopal2002/donut_visual_zeon with Docker Model Runner:
docker model run hf.co/Gopal2002/donut_visual_zeon
Upload model
Browse files- config.json +2 -5
- generation_config.json +1 -1
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
-
"_name_or_path": "nielsr/donut-base",
|
| 4 |
"architectures": [
|
| 5 |
"VisionEncoderDecoderModel"
|
| 6 |
],
|
|
@@ -83,7 +82,6 @@
|
|
| 83 |
"top_p": 1.0,
|
| 84 |
"torch_dtype": null,
|
| 85 |
"torchscript": false,
|
| 86 |
-
"transformers_version": "4.26.1",
|
| 87 |
"typical_p": 1.0,
|
| 88 |
"use_bfloat16": false,
|
| 89 |
"use_cache": true,
|
|
@@ -180,7 +178,6 @@
|
|
| 180 |
"top_p": 1.0,
|
| 181 |
"torch_dtype": null,
|
| 182 |
"torchscript": false,
|
| 183 |
-
"transformers_version": "4.26.1",
|
| 184 |
"typical_p": 1.0,
|
| 185 |
"use_absolute_embeddings": false,
|
| 186 |
"use_bfloat16": false,
|
|
@@ -191,5 +188,5 @@
|
|
| 191 |
"pad_token_id": 1,
|
| 192 |
"tie_word_embeddings": false,
|
| 193 |
"torch_dtype": "float32",
|
| 194 |
-
"transformers_version":
|
| 195 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "Gopal2002/donut_visual_zeon",
|
|
|
|
| 3 |
"architectures": [
|
| 4 |
"VisionEncoderDecoderModel"
|
| 5 |
],
|
|
|
|
| 82 |
"top_p": 1.0,
|
| 83 |
"torch_dtype": null,
|
| 84 |
"torchscript": false,
|
|
|
|
| 85 |
"typical_p": 1.0,
|
| 86 |
"use_bfloat16": false,
|
| 87 |
"use_cache": true,
|
|
|
|
| 178 |
"top_p": 1.0,
|
| 179 |
"torch_dtype": null,
|
| 180 |
"torchscript": false,
|
|
|
|
| 181 |
"typical_p": 1.0,
|
| 182 |
"use_absolute_embeddings": false,
|
| 183 |
"use_bfloat16": false,
|
|
|
|
| 188 |
"pad_token_id": 1,
|
| 189 |
"tie_word_embeddings": false,
|
| 190 |
"torch_dtype": "float32",
|
| 191 |
+
"transformers_version": "4.35.2"
|
| 192 |
}
|
generation_config.json
CHANGED
|
@@ -6,5 +6,5 @@
|
|
| 6 |
"forced_eos_token_id": 2,
|
| 7 |
"max_length": 8,
|
| 8 |
"pad_token_id": 1,
|
| 9 |
-
"transformers_version": "4.
|
| 10 |
}
|
|
|
|
| 6 |
"forced_eos_token_id": 2,
|
| 7 |
"max_length": 8,
|
| 8 |
"pad_token_id": 1,
|
| 9 |
+
"transformers_version": "4.35.2"
|
| 10 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe4c2cbb9729fd4201f3e9c24f857447103e8026ce3668badc1d8eb129d742f2
|
| 3 |
+
size 809095320
|