Text Generation
Transformers
Safetensors
English
qwen3
trl
text-generation-inference
code
ui
conversational
Instructions to use prithivMLmods/Octans-Qwen3-UI-Code-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Octans-Qwen3-UI-Code-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prithivMLmods/Octans-Qwen3-UI-Code-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/Octans-Qwen3-UI-Code-4B") model = AutoModelForCausalLM.from_pretrained("prithivMLmods/Octans-Qwen3-UI-Code-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use prithivMLmods/Octans-Qwen3-UI-Code-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/Octans-Qwen3-UI-Code-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Octans-Qwen3-UI-Code-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prithivMLmods/Octans-Qwen3-UI-Code-4B
- SGLang
How to use prithivMLmods/Octans-Qwen3-UI-Code-4B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "prithivMLmods/Octans-Qwen3-UI-Code-4B" \ --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": "prithivMLmods/Octans-Qwen3-UI-Code-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
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 "prithivMLmods/Octans-Qwen3-UI-Code-4B" \ --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": "prithivMLmods/Octans-Qwen3-UI-Code-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prithivMLmods/Octans-Qwen3-UI-Code-4B with Docker Model Runner:
docker model run hf.co/prithivMLmods/Octans-Qwen3-UI-Code-4B
Update README.md
Browse files
README.md
CHANGED
|
@@ -2,4 +2,89 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model:
|
| 4 |
- prithivMLmods/Muscae-Qwen3-UI-Code-4B
|
| 5 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model:
|
| 4 |
- prithivMLmods/Muscae-Qwen3-UI-Code-4B
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# **Octans-Qwen3-UI-Code-4B**
|
| 8 |
+
|
| 9 |
+
> **Octans-Qwen3-UI-Code-4B** is an **optimized successor** of **Muscae-Qwen3-UI-Code-4B**, fine-tuned for enhanced **UI reasoning precision**, **layout structuring**, and **frontend code synthesis**.
|
| 10 |
+
> Built upon **Qwen3-4B** and refined through **Abliterated Reasoning Optimization**, it delivers **balanced, structured, and production-grade** UI code outputs for experimental and research use.
|
| 11 |
+
> Ideal for **frontend developers**, **UI engineers**, and **design system researchers** exploring next-generation code synthesis.
|
| 12 |
+
|
| 13 |
+
> [!note]
|
| 14 |
+
> GGUF: [https://huggingface.co/prithivMLmods/Octans-Qwen3-UI-Code-4B-GGUF](https://huggingface.co/prithivMLmods/Octans-Qwen3-UI-Code-4B-GGUF)
|
| 15 |
+
|
| 16 |
+
## **Key Features**
|
| 17 |
+
|
| 18 |
+
1. **Enhanced UI-Oriented Reasoning**
|
| 19 |
+
Upgraded reasoning calibration from *Muscae* with deeper token optimization for **frontend logic**, **layout reasoning**, and **component cohesion**.
|
| 20 |
+
|
| 21 |
+
2. **Refined Web UI Component Generation**
|
| 22 |
+
Generates **responsive, accessible**, and **semantic** UI components with **Tailwind**, **React**, and **HTML5**, ensuring cleaner syntax and reduced redundancy.
|
| 23 |
+
|
| 24 |
+
3. **Improved Layout-Aware Structure**
|
| 25 |
+
Demonstrates superior understanding of **hierarchical design**, **stateful components**, and **responsive alignment**, enhancing multi-device compatibility.
|
| 26 |
+
|
| 27 |
+
4. **Optimized Hybrid Reasoning Engine**
|
| 28 |
+
Integrates symbolic and probabilistic logic for **event-driven** UI workflows, conditional rendering, and state synchronization in code outputs.
|
| 29 |
+
|
| 30 |
+
5. **Structured Output Excellence**
|
| 31 |
+
Produces consistent results in **HTML**, **React**, **Markdown**, **JSON**, and **YAML**, suitable for **UI prototyping**, **design systems**, and **auto-documentation**.
|
| 32 |
+
|
| 33 |
+
6. **Lightweight and Deployable**
|
| 34 |
+
Maintains a **4B parameter** scale, optimized for **mid-range GPUs**, **edge inference**, or **offline environments**, without compromising structure or reasoning depth.
|
| 35 |
+
|
| 36 |
+
## **Quickstart with Transformers**
|
| 37 |
+
|
| 38 |
+
```python
|
| 39 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 40 |
+
|
| 41 |
+
model_name = "prithivMLmods/Octans-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 dashboard layout with Tailwind and modular React components."
|
| 51 |
+
|
| 52 |
+
messages = [
|
| 53 |
+
{"role": "system", "content": "You are a frontend coding assistant skilled in UI generation, semantic HTML, and structured React components."},
|
| 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 |
+
* Advanced web UI and component code generation
|
| 80 |
+
* Responsive frontend prototyping with Tailwind/React
|
| 81 |
+
* Research on **structured reasoning** in code synthesis
|
| 82 |
+
* Semantic, design-system-aligned component generation
|
| 83 |
+
* Experimental projects exploring **UI intelligence modeling**
|
| 84 |
+
|
| 85 |
+
## **Limitations**
|
| 86 |
+
|
| 87 |
+
* Research-focused model – not fine-tuned for production-critical pipelines
|
| 88 |
+
* Specialized for **UI code** – not suitable for general text generation or long-form reasoning
|
| 89 |
+
* May exhibit variability with **cross-framework** or **overextended prompts**
|
| 90 |
+
* Prioritizes **code structure and logic clarity** over aesthetic or creative expression
|