Instructions to use testfss/spring24 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use testfss/spring24 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="testfss/spring24")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("testfss/spring24") model = AutoModelForImageTextToText.from_pretrained("testfss/spring24") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use testfss/spring24 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "testfss/spring24" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "testfss/spring24", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/testfss/spring24
- SGLang
How to use testfss/spring24 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 "testfss/spring24" \ --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": "testfss/spring24", "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 "testfss/spring24" \ --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": "testfss/spring24", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use testfss/spring24 with Docker Model Runner:
docker model run hf.co/testfss/spring24
Training done
Browse files- preprocessor_config.json +4 -4
- tokenizer.json +0 -0
- tokenizer_config.json +7 -0
preprocessor_config.json
CHANGED
|
@@ -19,8 +19,8 @@
|
|
| 19 |
"processor_class": "DonutProcessor",
|
| 20 |
"resample": 2,
|
| 21 |
"rescale_factor": 0.00392156862745098,
|
| 22 |
-
"size":
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
}
|
|
|
|
| 19 |
"processor_class": "DonutProcessor",
|
| 20 |
"resample": 2,
|
| 21 |
"rescale_factor": 0.00392156862745098,
|
| 22 |
+
"size": {
|
| 23 |
+
"height": 1280,
|
| 24 |
+
"width": 960
|
| 25 |
+
}
|
| 26 |
}
|
tokenizer.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
CHANGED
|
@@ -314,11 +314,18 @@
|
|
| 314 |
"cls_token": "<s>",
|
| 315 |
"eos_token": "</s>",
|
| 316 |
"mask_token": "<mask>",
|
|
|
|
| 317 |
"model_max_length": 1000000000000000019884624838656,
|
|
|
|
| 318 |
"pad_token": "<pad>",
|
|
|
|
|
|
|
| 319 |
"processor_class": "DonutProcessor",
|
| 320 |
"sep_token": "</s>",
|
| 321 |
"sp_model_kwargs": {},
|
|
|
|
| 322 |
"tokenizer_class": "XLMRobertaTokenizer",
|
|
|
|
|
|
|
| 323 |
"unk_token": "<unk>"
|
| 324 |
}
|
|
|
|
| 314 |
"cls_token": "<s>",
|
| 315 |
"eos_token": "</s>",
|
| 316 |
"mask_token": "<mask>",
|
| 317 |
+
"max_length": 768,
|
| 318 |
"model_max_length": 1000000000000000019884624838656,
|
| 319 |
+
"pad_to_multiple_of": null,
|
| 320 |
"pad_token": "<pad>",
|
| 321 |
+
"pad_token_type_id": 0,
|
| 322 |
+
"padding_side": "right",
|
| 323 |
"processor_class": "DonutProcessor",
|
| 324 |
"sep_token": "</s>",
|
| 325 |
"sp_model_kwargs": {},
|
| 326 |
+
"stride": 0,
|
| 327 |
"tokenizer_class": "XLMRobertaTokenizer",
|
| 328 |
+
"truncation_side": "right",
|
| 329 |
+
"truncation_strategy": "longest_first",
|
| 330 |
"unk_token": "<unk>"
|
| 331 |
}
|