Instructions to use degaga/documentai with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use degaga/documentai with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="degaga/documentai")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("degaga/documentai") model = AutoModelForMultimodalLM.from_pretrained("degaga/documentai") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use degaga/documentai with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "degaga/documentai" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "degaga/documentai", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/degaga/documentai
- SGLang
How to use degaga/documentai 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 "degaga/documentai" \ --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": "degaga/documentai", "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 "degaga/documentai" \ --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": "degaga/documentai", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use degaga/documentai with Docker Model Runner:
docker model run hf.co/degaga/documentai
Gated model You can list files but not access them
Preview of files found in this repository
- Mar09_09-04-57_6e39772ccf6d
- Mar09_09-44-02_177f4c3ca5ca
- Mar09_10-23-16_4e6d4807af47
- Mar09_11-54-19_6b23b71f6ce4
- Mar10_06-49-08_b4b82eb9c42b
- Mar10_12-11-21_a19a4898c5b5
- Mar10_12-32-26_e013a4813376
- Mar10_20-13-32_a342908ba247
- Mar11_14-43-31_4c560ce516d1
- Mar12_06-07-38_c8e391869448
- Mar12_12-14-03_a64aebf79809
- Mar13_06-01-06_d89252a4a2c7
- Mar13_11-27-07_b4022e040eb6
- Mar13_19-10-43_a4a6bc1b3992
- Mar14_05-07-27_2b39d93efa20
- Mar14_07-59-10_77426961001a
- Mar16_07-23-40_e4b617140bf5
- Mar17_06-59-17_rdudevml007
- Mar17_07-04-07_rdudevml007
- Mar17_07-07-03_rdudevml007
- Mar17_07-14-48_rdudevml007
- Mar17_07-24-03_rdudevml007
- Mar17_07-28-26_rdudevml007
- Mar17_07-37-35_rdudevml007
- Mar22_05-13-56_rdudevml007
- Mar28_13-51-13_399cd1294fe1
- Mar28_16-42-33_3d67d68fbb5f