Image-Text-to-Text
Transformers
ONNX
Safetensors
English
idefics3
conversational

Run this model with HF Jobs

Run HuggingFaceTB/SmolVLM-256M-Instruct on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/HuggingFaceTB/SmolVLM-256M-Instruct. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
kkkkkk98 commited on
Commit
efe4fd7
·
verified ·
1 Parent(s): 7e3e67e

Fix the example onnx inference code.

Browse files

The previous code uses `attention_mask=np.ones_like(input_ids)`, which restricts the attention mask shape to only `(1, 1)` during the decoding stage. This causes the model to get stuck in a loop, repeatedly outputting `<fake_token_around_image><row_1_col_1>`... after generating the word "the".

It should be updated to `np.ones_like(np.concatenate((attention_mask, input_ids), axis=-1))` instead, so that the KV cache length can grow properly as generation proceeds.
`The image depicts a large, historic statue of Liberty situated on a small island in a body of water. The statue is a green, cylindrical structure with a human figure at the top, which is the actual statue of Liberty. The statue is mounted on a pedestal that is supported by a cylindrical tower.`

1 file changed +1 -1
README.md+1-1