Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,90 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
# **Muscae-Qwen3-UI-Code-4B**
|
| 6 |
+
|
| 7 |
+
> **Muscae-Qwen3-UI-Code-4B** is a reasoning-enhanced model fine-tuned on **Qwen** using the **GPT-OSS Web UI Coding dataset traces**, specializing in **web interface coding**, **structured generation**, and **polished token probabilities**.
|
| 8 |
+
> It excels at generating **production-grade UI components**, **frontend layouts**, and **logic-driven interface code** with high precision and consistency.
|
| 9 |
+
|
| 10 |
+
> \[!note]
|
| 11 |
+
> GGUF: [https://huggingface.co/prithivMLmods/Muscae-Qwen3-UI-Code-4B-GGUF](https://huggingface.co/prithivMLmods/Muscae-Qwen3-UI-Code-4B-GGUF)
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
## **Key Features**
|
| 15 |
+
|
| 16 |
+
1. **UI-Focused Reasoning Engine**
|
| 17 |
+
Fine-tuned for precise **frontend development workflows**, generating optimized HTML, CSS, React, and Tailwind-based code with minimal refactoring needs.
|
| 18 |
+
|
| 19 |
+
2. **Web Interface Generation Mastery**
|
| 20 |
+
Excels in building responsive layouts, interactive components, and dashboard UIs directly from natural language prompts or wireframe descriptions.
|
| 21 |
+
|
| 22 |
+
3. **Polished Token Probabilities**
|
| 23 |
+
Trained for smoother generation curves and deterministic structure in code, minimizing syntax errors and enhancing readability.
|
| 24 |
+
|
| 25 |
+
4. **Hybrid Logic-Coding Synthesis**
|
| 26 |
+
Combines structural reasoning with frontend logic understanding to generate UI code that’s both **functional** and **aesthetically consistent**.
|
| 27 |
+
|
| 28 |
+
5. **Structured Output Formats**
|
| 29 |
+
Outputs code and structured data in **HTML**, **React (JSX/TSX)**, **Tailwind**, **JSON**, and **YAML**, supporting full-stack workflows and CI/CD pipelines.
|
| 30 |
+
|
| 31 |
+
6. **Optimized Lightweight Footprint**
|
| 32 |
+
Compact **4B parameter size**, deployable on **mid-range GPUs**, **developer workstations**, and **edge build servers** while maintaining high-quality UI generation.
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## **Quickstart with Transformers**
|
| 37 |
+
|
| 38 |
+
```python
|
| 39 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 40 |
+
|
| 41 |
+
model_name = "prithivMLmods/Muscae-Qwen3-UI-Code-4B"
|
| 42 |
+
|
| 43 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 44 |
+
model_name,
|
| 45 |
+
torch_dtype="auto",
|
| 46 |
+
device_map="auto"
|
| 47 |
+
)
|
| 48 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 49 |
+
|
| 50 |
+
prompt = "Generate a responsive React dashboard with a sidebar and top navigation bar using Tailwind CSS."
|
| 51 |
+
|
| 52 |
+
messages = [
|
| 53 |
+
{"role": "system", "content": "You are a frontend coding assistant skilled in web UI generation and responsive design."},
|
| 54 |
+
{"role": "user", "content": prompt}
|
| 55 |
+
]
|
| 56 |
+
|
| 57 |
+
text = tokenizer.apply_chat_template(
|
| 58 |
+
messages,
|
| 59 |
+
tokenize=False,
|
| 60 |
+
add_generation_prompt=True
|
| 61 |
+
)
|
| 62 |
+
|
| 63 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 64 |
+
|
| 65 |
+
generated_ids = model.generate(
|
| 66 |
+
**model_inputs,
|
| 67 |
+
max_new_tokens=512
|
| 68 |
+
)
|
| 69 |
+
generated_ids = [
|
| 70 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
| 71 |
+
]
|
| 72 |
+
|
| 73 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
| 74 |
+
print(response)
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
## **Intended Use**
|
| 78 |
+
|
| 79 |
+
* Web UI component generation and layout scaffolding
|
| 80 |
+
* Responsive dashboard, landing page, and frontend application coding
|
| 81 |
+
* Educational and research tasks related to frontend development
|
| 82 |
+
* Lightweight deployment in developer environments and CI/CD pipelines
|
| 83 |
+
* Structured code generation and UI prototyping from natural language prompts
|
| 84 |
+
|
| 85 |
+
## **Limitations**
|
| 86 |
+
|
| 87 |
+
* Focused on **UI and frontend code generation** — not suited for deep backend logic or non-UI tasks
|
| 88 |
+
* Might require minor manual adjustments for large-scale production apps
|
| 89 |
+
* Prioritizes structured and readable code over creative design experimentation
|
| 90 |
+
* Performance may vary with **extremely long code contexts** or multi-file full-stack generation tasks
|