CrochetBench: Can Vision-Language Models Move from Describing to Doing in Crochet Domain?
Paper • 2511.09483 • Published
How to use peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned")
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("peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned")
model = AutoModelForMultimodalLM.from_pretrained("peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned", 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]:]))How to use peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned",
"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 run hf.co/peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned
How to use peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned" \
--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": "peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned",
"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 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 "peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned" \
--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": "peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned",
"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"
}
}
]
}
]
}'How to use peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned with Docker Model Runner:
docker model run hf.co/peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned
docker model run hf.co/peiyugeorgia/qwen2vl-crochetbench-task-c-finetunedThis model is a fine-tuned version of Qwen/Qwen2-VL-7B-Instruct, trained on the crochetBench Task C benchmark.
Task C — Image-to-Pattern Generation: Given an image of a finished crochet product, the model generates a complete set of crochet instructions in standard published-pattern format.
The output follows these conventions:
sc (single crochet), hdc (half double crochet), dc (double crochet), tr (treble), ch (chain), sl st (slip stitch), rep (repeat)Rnd 1: ..., Row 2: ...)| Property | Value |
|---|---|
| Base model | Qwen/Qwen2-VL-7B-Instruct |
| Fine-tuning method | Full fine-tuning |
| Optimizer | AdamW |
| Learning rate | 1e-5 |
| Epochs | 3 |
| Effective batch size | 8 |
| Best checkpoint | Step 1500 |
| Training date | December 13, 2025 |
from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
from PIL import Image
import torch
model_id = "peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned"
model = Qwen2VLForConditionalGeneration.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
processor = AutoProcessor.from_pretrained(model_id)
image = Image.open("your_crochet_image.jpg").convert("RGB")
messages = [
{
"role": "system",
"content": (
"You are a professional crochet pattern writer. "
"Examine the image of the finished crochet product carefully. "
"Write a complete set of crochet instructions in the standard style used in published patterns. "
"Use standard abbreviations: sc (single crochet), hdc (half double crochet), dc (double crochet), "
"tr (treble), ch (chain), sl st (slip stitch), rep (repeat). "
"Organize the instructions row by row or round by round (e.g., 'Rnd 1: ...', 'Row 2: ...'). "
"Keep the instructions concise and precise, as if for experienced crocheters. "
"Output only the crochet pattern. Do not add any explanations, commentary, or extra text."
)
},
{
"role": "user",
"content": [
{"type": "image", "image": image},
{"type": "text", "text": "Generate step-by-step crochet instructions for this image."}
]
}
]
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=[text], images=[image], return_tensors="pt").to(model.device)
with torch.no_grad():
output_ids = model.generate(**inputs, max_new_tokens=1024)
generated = processor.batch_decode(output_ids, skip_special_tokens=True)[0]
print(generated)
If you use this model, please cite the crochetBench benchmark.
@inproceedings{peiyuli2026,
title = {CrochetBench: Can Vision-Language Models Move from Describing to
Doing in Crochet Domain?},
author = {Li, Peiyu and Huang, Xiaobao and Hua, Ting and Chawla, Nitesh V.},
booktitle = {Proceedings of the 64th Annual Meeting of the Association for
Computational Linguistics (Volume 1: Long Papers)},
year = {2026}
}
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "peiyugeorgia/qwen2vl-crochetbench-task-c-finetuned", "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" } } ] } ] }'