How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="chipherndon/Infinity-Parser2-Flash-vllm")
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("chipherndon/Infinity-Parser2-Flash-vllm")
model = AutoModelForMultimodalLM.from_pretrained("chipherndon/Infinity-Parser2-Flash-vllm", 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]:]))
Quick Links

Infinity-Parser2-Flash (vLLM / Transformers 4.x tokenizer)

Server-side copy of infly/Infinity-Parser2-Flash at cfddc4106b0abc4706f05575a164f7dd35d09c46.

The only change is in tokenizer_config.json:

tokenizer_class: TokenizersBackend -> Qwen2Tokenizer

tokenizer.json and the weights are unchanged. Use this repo when a serving runtime cannot rewrite the snapshot (vLLM 0.17.x / Transformers 4.x cannot import TokenizersBackend).

Do not swap in Qwen/Qwen3.5-2B as the model. Point --model at this repo.

Downloads last month
23
Safetensors
Model size
2B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for chipherndon/Infinity-Parser2-Flash-vllm

Finetuned
(2)
this model