Instructions to use nalazhar/tiny_whaleye with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nalazhar/tiny_whaleye with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nalazhar/tiny_whaleye")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("nalazhar/tiny_whaleye") model = AutoModelForSeq2SeqLM.from_pretrained("nalazhar/tiny_whaleye", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nalazhar/tiny_whaleye with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nalazhar/tiny_whaleye" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nalazhar/tiny_whaleye", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nalazhar/tiny_whaleye
- SGLang
How to use nalazhar/tiny_whaleye 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 "nalazhar/tiny_whaleye" \ --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": "nalazhar/tiny_whaleye", "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 "nalazhar/tiny_whaleye" \ --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": "nalazhar/tiny_whaleye", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nalazhar/tiny_whaleye with Docker Model Runner:
docker model run hf.co/nalazhar/tiny_whaleye
Download processor_config.json from nalazhar/tiny_whaleye: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/nalazhar/tiny_whaleye/resolve/main/processor_config.json
- Command line
-
hf download hf://nalazhar/tiny_whaleye/processor_config.json
-
curl -L -o processor_config.json https://huggingface.co/nalazhar/tiny_whaleye/resolve/main/processor_config.json
1.04 kB
| { | |
| "image_break_token": "<|place▁holder▁no▁1|>", | |
| "image_end_token": "<|place▁holder▁no▁2|>", | |
| "image_processor": { | |
| "crop_size": null, | |
| "data_format": "channels_first", | |
| "device": null, | |
| "disable_grouping": null, | |
| "do_center_crop": null, | |
| "do_convert_rgb": true, | |
| "do_normalize": true, | |
| "do_pad": null, | |
| "do_rescale": true, | |
| "do_resize": true, | |
| "image_mean": [ | |
| 0.48145466, | |
| 0.4578275, | |
| 0.40821073 | |
| ], | |
| "image_processor_type": "PixtralImageProcessorFast", | |
| "image_seq_length": null, | |
| "image_std": [ | |
| 0.26862954, | |
| 0.26130258, | |
| 0.27577711 | |
| ], | |
| "input_data_format": null, | |
| "pad_size": null, | |
| "patch_size": 14, | |
| "processor_class": "PixtralProcessor", | |
| "resample": 3, | |
| "rescale_factor": 0.00392156862745098, | |
| "return_tensors": null, | |
| "size": { | |
| "longest_edge": 1540 | |
| } | |
| }, | |
| "image_token": "<|place▁holder▁no▁0|>", | |
| "patch_size": 14, | |
| "processor_class": "PixtralProcessor", | |
| "spatial_merge_size": 2 | |
| } | |