Instructions to use OneJz/tomato-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OneJz/tomato-8b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OneJz/tomato-8b")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("OneJz/tomato-8b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OneJz/tomato-8b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OneJz/tomato-8b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OneJz/tomato-8b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/OneJz/tomato-8b
- SGLang
How to use OneJz/tomato-8b 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 "OneJz/tomato-8b" \ --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": "OneJz/tomato-8b", "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 "OneJz/tomato-8b" \ --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": "OneJz/tomato-8b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use OneJz/tomato-8b with Docker Model Runner:
docker model run hf.co/OneJz/tomato-8b
Download preprocessor_config.json from OneJz/tomato-8b: direct link, hf CLI and curl.
- Browser
- Download file 192 Bytes
-
https://huggingface.co/OneJz/tomato-8b/resolve/main/preprocessor_config.json
- Command line
-
hf download hf://OneJz/tomato-8b/preprocessor_config.json
-
curl -L -o preprocessor_config.json https://huggingface.co/OneJz/tomato-8b/resolve/main/preprocessor_config.json
192 Bytes
| { | |
| "image_processor_type": "FuyuImageProcessor", | |
| "padding_mode": "constant", | |
| "padding_value": 1.0, | |
| "processor_class": "FuyuProcessor", | |
| "target_height": 1080, | |
| "target_width": 1920 | |
| } | |