Instructions to use vikp/texify with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vikp/texify with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="vikp/texify")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("vikp/texify") model = AutoModelForImageTextToText.from_pretrained("vikp/texify") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use vikp/texify with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vikp/texify" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vikp/texify", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/vikp/texify
- SGLang
How to use vikp/texify 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 "vikp/texify" \ --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": "vikp/texify", "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 "vikp/texify" \ --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": "vikp/texify", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use vikp/texify with Docker Model Runner:
docker model run hf.co/vikp/texify
Upload processor
Browse files- preprocessor_config.json +12 -12
- tokenizer_config.json +1 -1
preprocessor_config.json
CHANGED
|
@@ -7,19 +7,19 @@
|
|
| 7 |
"do_thumbnail": false,
|
| 8 |
"feature_extractor_type": "DonutFeatureExtractor",
|
| 9 |
"image_mean": [
|
| 10 |
-
0.
|
| 11 |
-
0.
|
| 12 |
-
0.
|
| 13 |
],
|
| 14 |
"image_processor_type": "VariableDonutImageProcessor",
|
| 15 |
"image_std": [
|
| 16 |
-
0.
|
| 17 |
-
0.
|
| 18 |
-
0.
|
| 19 |
],
|
| 20 |
"max_size": {
|
| 21 |
-
"height":
|
| 22 |
-
"width":
|
| 23 |
},
|
| 24 |
"patch_size": [
|
| 25 |
4,
|
|
@@ -28,9 +28,9 @@
|
|
| 28 |
"processor_class": "VariableDonutProcessor",
|
| 29 |
"resample": 2,
|
| 30 |
"rescale_factor": 0.00392156862745098,
|
| 31 |
-
"size":
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
"train": false
|
| 36 |
}
|
|
|
|
| 7 |
"do_thumbnail": false,
|
| 8 |
"feature_extractor_type": "DonutFeatureExtractor",
|
| 9 |
"image_mean": [
|
| 10 |
+
0.485,
|
| 11 |
+
0.456,
|
| 12 |
+
0.406
|
| 13 |
],
|
| 14 |
"image_processor_type": "VariableDonutImageProcessor",
|
| 15 |
"image_std": [
|
| 16 |
+
0.229,
|
| 17 |
+
0.224,
|
| 18 |
+
0.225
|
| 19 |
],
|
| 20 |
"max_size": {
|
| 21 |
+
"height": 420,
|
| 22 |
+
"width": 420
|
| 23 |
},
|
| 24 |
"patch_size": [
|
| 25 |
4,
|
|
|
|
| 28 |
"processor_class": "VariableDonutProcessor",
|
| 29 |
"resample": 2,
|
| 30 |
"rescale_factor": 0.00392156862745098,
|
| 31 |
+
"size": [
|
| 32 |
+
420,
|
| 33 |
+
420
|
| 34 |
+
],
|
| 35 |
"train": false
|
| 36 |
}
|
tokenizer_config.json
CHANGED
|
@@ -195,7 +195,7 @@
|
|
| 195 |
"pad_token": "<pad>",
|
| 196 |
"pad_token_type_id": 0,
|
| 197 |
"padding_side": "right",
|
| 198 |
-
"processor_class": "
|
| 199 |
"stride": 0,
|
| 200 |
"tokenizer_class": "NougatTokenizer",
|
| 201 |
"truncation_side": "right",
|
|
|
|
| 195 |
"pad_token": "<pad>",
|
| 196 |
"pad_token_type_id": 0,
|
| 197 |
"padding_side": "right",
|
| 198 |
+
"processor_class": "VariableDonutProcessor",
|
| 199 |
"stride": 0,
|
| 200 |
"tokenizer_class": "NougatTokenizer",
|
| 201 |
"truncation_side": "right",
|