Text Generation
Safetensors
MLX
mlx-vlm
gemma4
lora
ui
ux
frontend
design-review
conversational
4-bit precision
Instructions to use RayyTien/gemma-4-e2b-uiux-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use RayyTien/gemma-4-e2b-uiux-lora with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("RayyTien/gemma-4-e2b-uiux-lora") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use RayyTien/gemma-4-e2b-uiux-lora with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "RayyTien/gemma-4-e2b-uiux-lora"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "RayyTien/gemma-4-e2b-uiux-lora" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use RayyTien/gemma-4-e2b-uiux-lora with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "RayyTien/gemma-4-e2b-uiux-lora"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "RayyTien/gemma-4-e2b-uiux-lora" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RayyTien/gemma-4-e2b-uiux-lora", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use RayyTien/gemma-4-e2b-uiux-lora with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "RayyTien/gemma-4-e2b-uiux-lora"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default RayyTien/gemma-4-e2b-uiux-lora
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use RayyTien/gemma-4-e2b-uiux-lora with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "RayyTien/gemma-4-e2b-uiux-lora"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "RayyTien/gemma-4-e2b-uiux-lora" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Add UIUX LoRA adapter and bundled model card
Browse files
README.md
CHANGED
|
@@ -1,25 +1,58 @@
|
|
| 1 |
---
|
| 2 |
-
library_name: mlx
|
| 3 |
license: apache-2.0
|
| 4 |
license_link: https://ai.google.dev/gemma/docs/gemma_4_license
|
| 5 |
-
|
|
|
|
| 6 |
tags:
|
| 7 |
-
- mlx
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
-
#
|
| 12 |
|
| 13 |
-
|
| 14 |
-
using mlx-vlm version **0.4.3**.
|
| 15 |
-
Refer to the [original model card](https://huggingface.co/google/gemma-4-e2b-it) for more details on the model.
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
``
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
```bash
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
license_link: https://ai.google.dev/gemma/docs/gemma_4_license
|
| 4 |
+
base_model: mlx-community/gemma-4-e2b-it-4bit
|
| 5 |
+
library_name: mlx-vlm
|
| 6 |
tags:
|
| 7 |
+
- mlx
|
| 8 |
+
- mlx-vlm
|
| 9 |
+
- lora
|
| 10 |
+
- gemma4
|
| 11 |
+
- ui
|
| 12 |
+
- ux
|
| 13 |
+
- frontend
|
| 14 |
+
- design-review
|
| 15 |
+
pipeline_tag: text-generation
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# Gemma 4 E2B UI/UX LoRA Adapter
|
| 19 |
|
| 20 |
+
Bundled MLX repo containing the `mlx-community/gemma-4-e2b-it-4bit` base model files plus a UI/UX LoRA adapter.
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
This is **not a fused model**. The base weights and LoRA adapter are stored in the same repository so users can download one repo, then pass the same directory as both `--model` and `--adapter-path`.
|
| 23 |
|
| 24 |
+
The adapter was tuned on UI/UX frontend guidance converted from:
|
| 25 |
+
|
| 26 |
+
- `nextlevelbuilder/ui-ux-pro-max-skill` - MIT
|
| 27 |
+
- `pbakaus/impeccable` - Apache-2.0
|
| 28 |
+
|
| 29 |
+
## Intended Use
|
| 30 |
+
|
| 31 |
+
Frontend UI/UX critique, React/Next.js/Tailwind implementation guidance, design anti-pattern review, accessibility and responsive layout recommendations.
|
| 32 |
+
|
| 33 |
+
## Usage
|
| 34 |
|
| 35 |
```bash
|
| 36 |
+
pip install mlx-vlm
|
| 37 |
+
hf download RayyTien/gemma-4-e2b-uiux-lora --local-dir ./gemma-e2b-uiux
|
| 38 |
+
|
| 39 |
+
python -m mlx_vlm.generate \
|
| 40 |
+
--model ./gemma-e2b-uiux \
|
| 41 |
+
--adapter-path ./gemma-e2b-uiux \
|
| 42 |
+
--system "You are a senior frontend engineer and UI/UX reviewer. Give concrete implementation-ready guidance." \
|
| 43 |
+
--prompt "Review this SaaS dashboard UI: nested cards, purple gradients, tiny gray labels, and no loading state." \
|
| 44 |
+
--max-tokens 320 \
|
| 45 |
+
--temperature 0.0
|
| 46 |
```
|
| 47 |
+
|
| 48 |
+
## Training Summary
|
| 49 |
+
|
| 50 |
+
See `training_args.json` and `dataset_summary.json`.
|
| 51 |
+
|
| 52 |
+
Important caveat: this adapter was trained locally with a patched `mlx-vlm` Gemma 4 loader because the unpatched loader did not instantiate K/V projections for weights present in the checkpoint. If vanilla `mlx-vlm` fails to load this model, use the same local patch or wait for upstream Gemma 4 loader support to catch up.
|
| 53 |
+
|
| 54 |
+
## Known Limitations
|
| 55 |
+
|
| 56 |
+
- This is a bundled base-model-plus-adapter repo, not a fused full fine-tuned checkpoint.
|
| 57 |
+
- The adapter improves UI/UX vocabulary and critique style, but should still be evaluated against real frontend tasks before production use.
|
| 58 |
+
- The converted dataset is guidance-heavy; add more paired bad/good UI implementation examples for stricter behavior.
|