Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
piko
piko-9b
multimodal
vision-language
hybrid-attention
linear-attention
ocr
document-understanding
conversational
Instructions to use Dexy2/Piko-9b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Dexy2/Piko-9b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Dexy2/Piko-9b") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Dexy2/Piko-9b") model = AutoModelForMultimodalLM.from_pretrained("Dexy2/Piko-9b", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Dexy2/Piko-9b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Dexy2/Piko-9b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Dexy2/Piko-9b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Dexy2/Piko-9b
- SGLang
How to use Dexy2/Piko-9b 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 "Dexy2/Piko-9b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Dexy2/Piko-9b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "Dexy2/Piko-9b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Dexy2/Piko-9b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use Dexy2/Piko-9b with Docker Model Runner:
docker model run hf.co/Dexy2/Piko-9b
| # Evaluation configuration — Piko-9b (candidate) | |
| # | |
| # This file and base_model.yaml must differ ONLY in the `model` block. | |
| # Any other difference invalidates the comparison. | |
| model: | |
| id: Dexy2/Piko-9b | |
| revision: null # pin a commit sha for reproducible runs | |
| label: piko-9b | |
| runtime: | |
| # CPU offload corrupts this architecture's linear-attention state. | |
| # device_map is forced to a single device by the harness; do not set "auto". | |
| device: cuda:0 | |
| dtype: bfloat16 | |
| quantization: 4bit # none | 4bit | 8bit | |
| attn_implementation: null | |
| trust_remote_code: false | |
| generation: | |
| do_sample: false # greedy, matching the shipped generation_config.json | |
| temperature: null | |
| top_p: null | |
| max_new_tokens: 384 | |
| batch_size: 1 | |
| seed: 0 | |
| prompting: | |
| system: null # set identically in both configs, or leave null in both | |
| strip_reasoning: true # grade only the text after </think> | |
| suites: | |
| custom_suite: | |
| enabled: true | |
| categories: all | |
| smoke: | |
| enabled: true | |
| gsm8k: | |
| enabled: false | |
| limit: 200 | |
| note: "Not run — see evaluation/README.md for runtime cost" | |
| mmlu_pro: | |
| enabled: false | |
| limit: 200 | |
| ifeval: | |
| enabled: false | |
| limit: 200 | |
| humaneval: | |
| enabled: false | |
| limit: 40 | |
| ocrbench: | |
| enabled: false | |
| limit: 200 | |
| docvqa: | |
| enabled: false | |
| limit: 200 | |
| chartqa: | |
| enabled: false | |
| limit: 200 | |
| textvqa: | |
| enabled: false | |
| limit: 200 | |
| mmmu: | |
| enabled: false | |
| limit: 150 | |
| needle_in_haystack: | |
| enabled: true | |
| lengths: [2000, 8000, 32000] | |
| depths: [0.1, 0.5, 0.9] | |
| output: | |
| directory: evaluation/results | |
| record_environment: true | |