Downloads · 30 days
88
1% of all-time downloads
Tesslate/UIGEN-T2-7B
UIGEN-T2-7B is a text generation model from Tesslate. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
88
1% of all-time downloads
All-time downloads
7K
Public
Parameters
7.6B
15.2 GB on disk
Likes
60
Public
Click a slice to open those files.
.safetensors15.2 GB · 100%
From the Hugging Face model README

We're excited to introduce UIGEN-T2, the next evolution in our UI generation model series. Fine-tuned from the highly capable Qwen2.5-Coder-7B-Instruct base model using PEFT/LoRA, UIGEN-T2 is specifically designed to generate HTML and Tailwind CSS code for web interfaces. What sets UIGEN-T2 apart is its training on a massive 50,000 sample dataset (up from 400) and its unique UI-based reasoning capability, allowing it to generate not just code, but code informed by thoughtful design principles.
think prompt! Interaction feels more natural.Here's a glimpse into the kind of reasoning that guides UIGEN-T2 internally, generated by our specialized teacher model:
<|begin_of_thought|>
When approaching the challenge of crafting an elegant stopwatch UI, my first instinct is to dissect what truly makes such an interface delightful yet functional—hence, I consider both aesthetic appeal and usability grounded in established heuristics like Nielsen’s “aesthetic and minimalist design” alongside Gestalt principles... placing the large digital clock prominently aligns with Fitts’ Law... The glassmorphism effect here enhances visual separation... typography choices—the use of a monospace font family ("Fira Code" via Google Fonts) supports readability... iconography paired with labels inside buttons provides dual coding... Tailwind CSS v4 enables utility-driven consistency... critical reflection concerns responsiveness: flexbox layouts combined with relative sizing guarantee graceful adaptation...
<|end_of_thought|>





You have to use this system prompt:
You are Tesslate, a helpful assistant specialized in UI generation.
These are the reccomended parameters: 0.7 Temp, Top P 0.9.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Make sure you have PEFT installed: pip install peft
from peft import PeftModel
# Use your specific model name/path once uploaded
model_name_or_path = "tesslate/UIGEN-T2" # Placeholder - replace with actual HF repo name
base_model_name = "Qwen/Qwen2.5-Coder-7B-Instruct"
# Load the base model
base_model = AutoModelForCausalLM.from_pretrained(
base_model_name,
torch_dtype=torch.bfloat16, # or float16 if bf16 not supported
device_map="auto"
)
# Load the PEFT model (LoRA weights)
model = PeftModel.from_pretrained(base_model, model_name_or_path)
tokenizer = AutoTokenizer.from_pretrained(base_model_name) # Use base tokenizer
# Note the simplified prompt structure (no double 'think')
prompt = """<|im_start|>user
Create a simple card component using Tailwind CSS with an image, title, and description.<|im_end|>
<|im_start|>assistant
""" # Model will generate reasoning and code following this
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
# Adjust generation parameters as needed
outputs = model.generate(**inputs, max_new_tokens=1024, do_sample=True, temperature=0.6, top_p=0.9)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
transformers)torch)peft)If you use UIGEN-T2 or the LoRA checkpoints in your work, please cite us:
@misc{tesslate_UIGEN-T2,
title={UIGEN-T2: Scaling UI Generation with Reasoning on Qwen2.5-Coder-7B},
author={tesslate},
year={2024}, # Adjust year if needed
publisher={Hugging Face},
url={https://huggingface.co/tesslate/UIGEN-T2} # Placeholder URL
}