Downloads · 30 days
2
1% of all-time downloads
megistone/qwen2-5-3b-vl-websight-plus-lora
qwen2-5-3b-vl-websight-plus-lora is a image-text-to-text model from megistone. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
This model is a Low-Rank Adaptation (LoRA) fine-tune of the Qwen/Qwen2.5-VL-3B-Instruct base model. It is specifically optimized for visual web development tasks, translating visual inputs such as hand-drawn wireframe…
Downloads · 30 days
2
1% of all-time downloads
All-time downloads
264
Public
Repo size
161 MB
Likes
1
Public
Click a slice to open those files.
.safetensors150 MB · 93%
From the Hugging Face model README
This model is a Low-Rank Adaptation (LoRA) fine-tune of the Qwen/Qwen2.5-VL-3B-Instruct base model. It is specifically optimized for visual web development tasks, translating visual inputs such as hand-drawn wireframes, low-fidelity sketches, and digital web screenshots directly into structural HTML and Tailwind CSS code.
The "plus" in the model designation indicates a composite training methodology utilizing both the standard WebSight dataset and the custom Sketch2Code dataset, enhancing the model's spatial reasoning and abstract UI interpretation capabilities.
The primary function of this model is image-to-code generation. Users can input images of UI designs (sketches, wireframes, or rendered screenshots) accompanied by a text prompt (e.g., "Convert this wireframe to clean HTML/CSS code"), and the model will output corresponding semantic HTML5 and Tailwind CSS markup.
Integration into automated prototyping workflows, design-to-code pipelines, or as a backend engine for UI/UX drafting applications where rapid iteration from whiteboard to functional prototype is required.
This model is not intended for general-purpose conversational tasks, complex logic implementation (JavaScript/backend programming), or generating non-UI-related code. It should not be deployed in automated production pipelines without human-in-the-loop review, as generative AI code may contain rendering hallucinations or accessibility oversights.
While fine-tuned on diverse UI layouts, the model may exhibit biases toward common web design patterns present in the WebSight and Sketch2Code datasets. It may struggle with highly unconventional, abstract, or text-heavy layouts where optical character recognition (OCR) ambiguity exists. Generated code may not consistently adhere to strict WCAG accessibility guidelines without manual intervention.
Users are advised to manually review, debug, and validate all generated HTML/CSS code before deploying it in production environments. Output should be treated as a high-fidelity prototype rather than a final production artifact.
Use the following Python code to initialize the base model and load the LoRA weights using the transformers and peft libraries.
import torch
from transformers import AutoProcessor
from peft import PeftModel
from transformers import Qwen2_5_VLForConditionalGeneration
# Define model paths
base_model_id = "Qwen/Qwen2.5-VL-3B-Instruct"
adapter_id = "megistone/qwen2-5-3b-vl-websight-plus-lora"
# Load processor and base model
processor = AutoProcessor.from_pretrained(base_model_id)
base_model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
base_model_id,
device_map="auto",
torch_dtype=torch.bfloat16
)
# Load the LoRA adapter
model = PeftModel.from_pretrained(base_model, adapter_id)
# Example inference structure
# messages = [
# {
# "role": "user",
# "content": [
# {"type": "image", "image": "path_to_your_sketch.png"},
# {"type": "text", "text": "Convert this wireframe to clean HTML/CSS code"}
# ]
# }
# ]
# text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
The model was fine-tuned on a composite dataset strategy denoted as "websight-plus":
The training utilized Low-Rank Adaptation (LoRA) to efficiently update attention mechanisms without modifying the full 3 billion parameter count of the base model. Safetensors format was used for weight serialization.
adapter_model.safetensors).Evaluation was conducted on a held-out validation subset of the composite dataset to measure the model's ability to minimize language modeling loss given visual context.
Based on the recorded TensorBoard telemetry:
The learning curve indicates successful adaptation to the target domain without immediate signs of severe overfitting within the observed 200-step window.
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
The model relies on the Qwen2.5 Vision-Language architecture, which integrates a visual encoder with a large language model. The objective function during fine-tuning was standard causal language modeling (next-token prediction) conditioned on the combined text prompt and processed visual tokens.
This model is the result of a joint effort between the authors. Special thanks to Illia Denysenko for the development of the functional implementation framework and his significant role in the construction of the Sketch2Code dataset.
Model Citation:
@misc{qwen2.5-vl-websight-plus-lora,
author = {megistone},
title = {qwen2-5-3b-vl-websight-plus-lora},
year = {2024},
publisher = {Hugging Face},
journal = {Hugging Face Repository},
howpublished = {\url{https://huggingface.co/megistone/qwen2-5-3b-vl-websight-plus-lora}}
}
Training Data Citation:
@dataset{kyselov_denysenko_2026_19741715,
author = {Mykyta Kyselov and Illia Denysenko},
title = {Sketch2Code: Hand-Drawn Wireframes to HTML/Tailwind Dataset},
month = jan,
year = 2026,
publisher = {Zenodo},
version = {1.0.0},
doi = {10.5281/zenodo.19741715},
url = {https://doi.org/10.5281/zenodo.19741715}
}
APA for Training Data: Mykyta Kyselov, & Illia Denysenko. (2026). Sketch2Code: Hand-Drawn Wireframes to HTML/Tailwind Dataset (1.0.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.19741715