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
Contributing
The rule that matters
No number enters the documentation unless a committed result file backs it.
The original Piko-9b release published nine benchmark scores that had been measured on a different checkpoint — a text-only model that predated the vision composition and contained none of the Piko training stages. That is the specific failure this repository is built to prevent.
So:
- If you did not run it, write "Not run" and say why.
- If it failed, record the failure. Every runner here has a
failureslist for exactly this. - If a number came from an upstream model card, attribute it to that model, not to Piko-9b.
- If you cannot verify something, write "Could not be verified."
make validate-model-card enforces part of this automatically: it cross-references every
percentage in a results table against the committed JSON under evaluation/results/ and
benchmarks/results/.
Setup
python -m venv .venv && source .venv/bin/activate
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128
make install-dev
Before opening a pull request
make check # lint + fast tests + model-card validation, no weights needed
If your change touches inference, evaluation, or the checkpoint:
export PIKO_MODEL_PATH=/path/to/local/checkpoint
make test-all
make smoke-eval
Copy the checkpoint to internal NVMe first. Loading 21 GB from an external USB disk takes 10–20 minutes per run; from NVMe it takes about 100 seconds.
Test tiers
| Tier | Marker | Needs | Runs in CI |
|---|---|---|---|
| Fast | (none) | config and tokenizer files only | Yes, every commit |
| Heavy | @pytest.mark.slow |
the 9.65 B checkpoint and a CUDA GPU | Manual dispatch only |
CI must never download the full model on an ordinary commit. Keep the fast tier fast and
weight-free; put anything that loads weights behind @pytest.mark.slow.
Adding an evaluation case
- Add a line to the right
evaluation/custom_suite/cases/*.jsonl. - Prefer a deterministic check. The available types are listed in
evaluation/custom_suite/README.md. - If you need an image, draw it in
build_assets.py. Do not download fixtures — the original project's vision benchmark died permanently because a remote host's TLS certificate changed. - Re-run the category and commit the result file alongside the case.
If you change a grading rule, re-run and report both the old and new scores. Adjusting a grader after seeing results is how honest suites quietly become dishonest ones. Say what you changed and why.
Changing the checkpoint
Any change to weights or config.json requires:
make audit— regeneratesreports/repository_audit.json; must report zero secrets and zero absolute paths.make lineage— re-verifies provenance by tensor comparison.make smoke-eval— the first check catches the degenerate-output failure mode.- An entry in
CHANGELOG.md.
Style
ruff for linting and formatting; run make format. Beyond that: write comments that explain
why, not what. The most valuable comments in this repository are the ones warning that
device_map="auto" silently corrupts this architecture — that is not deducible from the code.
What not to do
- Do not add
trust_remote_code=Trueto examples. It is unnecessary and teaches a bad habit. - Do not use
device_map="auto"anywhere. It is the single most likely way to break this model. - Do not commit weights, tokens, or absolute local paths.
- Do not describe untested capabilities as supported. Video input, for instance, has inherited metadata and a preprocessor config but was never exercised — so it is documented as untested, not as a feature.