How to use from
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 "yasserrmd/AgentUX-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": "yasserrmd/AgentUX-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 "yasserrmd/AgentUX-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": "yasserrmd/AgentUX-4B",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Quick Links

🧠 AgentUX‑4B

AgentUX‑4B is a compact, agentic reasoning model designed for UI layout generation, component reasoning, and lightweight code structuring tasks. It’s a 4B-parameter model merged using SLERP (Spherical Linear Interpolation) via MergeKit, combining:


✨ Highlights

  • 📐 UI reasoning & layout structure understanding
  • 🧩 Component-to-code generation (HTML, JSX, CSS fragments)
  • 🧠 Compact agentic planning and multi-step reasoning
  • Lightweight & merge-optimized for local inference and real-time apps
  • 🧬 Merged using SLERP to preserve semantic smoothness between sources

🧪 Example Use Cases

Prompt Task
"Generate a signup form layout using HTML and CSS" Frontend layout generation
"Explain the role of flex-wrap in UI design" UI reasoning
"Plan 3 steps to build a sidebar menu using React" Agentic decomposition

🔧 Usage Example

from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline

model_id = "yasserrmd/AgentUX-4B"

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)

pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)

prompt = "Create a responsive layout with sidebar and header using Flexbox."
response = pipe(prompt, max_new_tokens=512)[0]["generated_text"]
print(response)

🛠 Merge Details

  • 🔗 MergeKit method: slerp
  • 🔍 Focused on reasoning alignment between structured generation (UIGEN) and agent-style planning (Jan-nano)
  • 🤖 No additional fine-tuning post-merge

📘 License & Credit


Downloads last month
1
Safetensors
Model size
4B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for yasserrmd/AgentUX-4B

Merge model
this model
Quantizations
3 models