Here's a glimpse into the kind of reasoning that guides UIGEN-T2 internally, generated by our specialized teacher model:
1<|begin_of_thought|>
2When 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...
3<|end_of_thought|>
These are the reccomended parameters: 0.7 Temp, Top P 0.9.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4# Make sure you have PEFT installed: pip install peft
5from peft import PeftModel
6
7# Use your specific model name/path once uploaded
8model_name_or_path = "tesslate/UIGEN-T2" # Placeholder - replace with actual HF repo name
9base_model_name = "Qwen/Qwen2.5-Coder-7B-Instruct"
10
11# Load the base model
12base_model = AutoModelForCausalLM.from_pretrained(
13 base_model_name,
14 torch_dtype=torch.bfloat16, # or float16 if bf16 not supported
15 device_map="auto"
16)
17
18# Load the PEFT model (LoRA weights)
19model = PeftModel.from_pretrained(base_model, model_name_or_path)
20tokenizer = AutoTokenizer.from_pretrained(base_model_name) # Use base tokenizer
21
22# Note the simplified prompt structure (no double 'think')
23prompt = """<|im_start|>user
24Create a simple card component using Tailwind CSS with an image, title, and description.<|im_end|>
25<|im_start|>assistant
26""" # Model will generate reasoning and code following this
27
28inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
29
30# Adjust generation parameters as needed
31outputs = model.generate(**inputs, max_new_tokens=1024, do_sample=True, temperature=0.6, top_p=0.9)
32
33print(tokenizer.decode(outputs[0], skip_special_tokens=True))
1@misc{tesslate_UIGEN-T2,
2 title={UIGEN-T2: Scaling UI Generation with Reasoning on Qwen2.5-Coder-7B},
3 author={tesslate},
4 year={2024}, # Adjust year if needed
5 publisher={Hugging Face},
6 url={https://huggingface.co/tesslate/UIGEN-T2} # Placeholder URL
7}