Instructions to use Elamranilyas/modataDONUT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Elamranilyas/modataDONUT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Elamranilyas/modataDONUT")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Elamranilyas/modataDONUT") model = AutoModelForMultimodalLM.from_pretrained("Elamranilyas/modataDONUT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Elamranilyas/modataDONUT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Elamranilyas/modataDONUT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Elamranilyas/modataDONUT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Elamranilyas/modataDONUT
- SGLang
How to use Elamranilyas/modataDONUT 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 "Elamranilyas/modataDONUT" \ --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": "Elamranilyas/modataDONUT", "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 "Elamranilyas/modataDONUT" \ --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": "Elamranilyas/modataDONUT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Elamranilyas/modataDONUT with Docker Model Runner:
docker model run hf.co/Elamranilyas/modataDONUT
Commit ·
04dbda1
1
Parent(s): 0f4bd04
Training in progress, epoch 0
Browse files- config.json +2 -2
- generation_config.json +1 -1
- pytorch_model.bin +1 -1
config.json
CHANGED
|
@@ -83,7 +83,7 @@
|
|
| 83 |
"top_p": 1.0,
|
| 84 |
"torch_dtype": null,
|
| 85 |
"torchscript": false,
|
| 86 |
-
"transformers_version": "4.
|
| 87 |
"typical_p": 1.0,
|
| 88 |
"use_bfloat16": false,
|
| 89 |
"use_cache": true,
|
|
@@ -180,7 +180,7 @@
|
|
| 180 |
"top_p": 1.0,
|
| 181 |
"torch_dtype": null,
|
| 182 |
"torchscript": false,
|
| 183 |
-
"transformers_version": "4.
|
| 184 |
"typical_p": 1.0,
|
| 185 |
"use_absolute_embeddings": false,
|
| 186 |
"use_bfloat16": false,
|
|
|
|
| 83 |
"top_p": 1.0,
|
| 84 |
"torch_dtype": null,
|
| 85 |
"torchscript": false,
|
| 86 |
+
"transformers_version": "4.30.2",
|
| 87 |
"typical_p": 1.0,
|
| 88 |
"use_bfloat16": false,
|
| 89 |
"use_cache": true,
|
|
|
|
| 180 |
"top_p": 1.0,
|
| 181 |
"torch_dtype": null,
|
| 182 |
"torchscript": false,
|
| 183 |
+
"transformers_version": "4.30.2",
|
| 184 |
"typical_p": 1.0,
|
| 185 |
"use_absolute_embeddings": false,
|
| 186 |
"use_bfloat16": false,
|
generation_config.json
CHANGED
|
@@ -6,5 +6,5 @@
|
|
| 6 |
"forced_eos_token_id": 2,
|
| 7 |
"max_length": 768,
|
| 8 |
"pad_token_id": 1,
|
| 9 |
-
"transformers_version": "4.
|
| 10 |
}
|
|
|
|
| 6 |
"forced_eos_token_id": 2,
|
| 7 |
"max_length": 768,
|
| 8 |
"pad_token_id": 1,
|
| 9 |
+
"transformers_version": "4.30.2"
|
| 10 |
}
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 809232153
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1ec9c6ec0df7a64c2d37f26b9dec928e1e2bfcce31182c53e1eabda275de258e
|
| 3 |
size 809232153
|