Text Generation
MLX
Safetensors
English
Hindi
gemma4
grammar
grammar-correction
writing
rewriting
tone
hindi
hinglish
on-device
lora
iris
apple-silicon
conversational
Eval Results (legacy)
4-bit precision
Instructions to use ImAXISOG/iris-gemma-4-e4b-it-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ImAXISOG/iris-gemma-4-e4b-it-mlx 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("ImAXISOG/iris-gemma-4-e4b-it-mlx") 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 ImAXISOG/iris-gemma-4-e4b-it-mlx with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ImAXISOG/iris-gemma-4-e4b-it-mlx"
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": "ImAXISOG/iris-gemma-4-e4b-it-mlx" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use ImAXISOG/iris-gemma-4-e4b-it-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "ImAXISOG/iris-gemma-4-e4b-it-mlx"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "ImAXISOG/iris-gemma-4-e4b-it-mlx" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ImAXISOG/iris-gemma-4-e4b-it-mlx", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use ImAXISOG/iris-gemma-4-e4b-it-mlx 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 "ImAXISOG/iris-gemma-4-e4b-it-mlx"
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 ImAXISOG/iris-gemma-4-e4b-it-mlx
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ImAXISOG/iris-gemma-4-e4b-it-mlx with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ImAXISOG/iris-gemma-4-e4b-it-mlx"
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 "ImAXISOG/iris-gemma-4-e4b-it-mlx" \ --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"
Model card: exact Windows-file comparisons, training starting point, 8 GB not yet tested
Browse files
README.md
CHANGED
|
@@ -252,9 +252,9 @@ Keep every point of the draft and add nothing. Keep who does what, and keep ques
|
|
| 252 |
|
| 253 |

|
| 254 |
|
| 255 |
-
| **Starting point** | [google/gemma-4-E4B-it](https://huggingface.co/google/gemma-4-E4B-it), with thinking switched off in the chat template |
|
| 256 |
|---|---|
|
| 257 |
-
| Lessons | 10,200 distinct examples (13,439 rows:
|
| 258 |
| Where lessons came from | Drafts and answers written and reviewed with AI models; Hindi and Hinglish translations reviewed by AI reviewers who corrected tense, idiom and who-does-what. None is taken from the test drafts, and lessons that resembled a test draft were dropped. Not released. |
|
| 259 |
| Method | LoRA on every layer: rank 16, scale 20, dropout 0.05; loss on the answers only (prompts masked) |
|
| 260 |
| Schedule | One pass, 3,360 steps, batch 4, learning rate 5e-5 with cosine decay to 2e-6, 20 warm-up steps, up to 2,048 tokens |
|
|
@@ -268,14 +268,15 @@ Keep every point of the draft and add nothing. Keep who does what, and keep ques
|
|
| 268 |
- **Drafts:** messages people type at work and to friends and family, written only for testing and never shown to
|
| 269 |
whoever wrote the lessons: 50 English drafts (Fix and all five tones), 82 Hindi and Hinglish drafts for Fix, and
|
| 270 |
240 tone answers on Hindi and Hinglish drafts.
|
| 271 |
-
- **Answers:** temperature 0 with Iris's short prompts
|
|
|
|
| 272 |
- **Judge:** an AI model, blind: the answers of all three models to a draft were shown together in shuffled order,
|
| 273 |
with no model names, and judged against written rules.
|
| 274 |
- **Fix "accepted":** no real mistake left and nothing changed beyond trivial tidying (a reworded phrase, an expanded
|
| 275 |
short form or a lost casual voice counts against it). For Hindi drafts: an accurate, natural English version.
|
| 276 |
- **Tones "would send":** the writer could send it in place of the draft: the same meaning, the tone asked for, and
|
| 277 |
it reads naturally.
|
| 278 |
-
- **The GGUF file** was judged on the answers that differ from the MLX model's.
|
| 279 |
|
| 280 |
## Limitations
|
| 281 |
|
|
|
|
| 252 |
|
| 253 |

|
| 254 |
|
| 255 |
+
| **Starting point** | Google's [google/gemma-4-E4B-it](https://huggingface.co/google/gemma-4-E4B-it), as the 4-bit MLX copy [mlx-community/gemma-4-e4b-it-4bit](https://huggingface.co/mlx-community/gemma-4-e4b-it-4bit) (what Iris used before), with thinking switched off in the chat template |
|
| 256 |
|---|---|
|
| 257 |
+
| Lessons | 10,200 distinct examples (13,439 rows: some lessons appear more than once), 408 held back to check progress |
|
| 258 |
| Where lessons came from | Drafts and answers written and reviewed with AI models; Hindi and Hinglish translations reviewed by AI reviewers who corrected tense, idiom and who-does-what. None is taken from the test drafts, and lessons that resembled a test draft were dropped. Not released. |
|
| 259 |
| Method | LoRA on every layer: rank 16, scale 20, dropout 0.05; loss on the answers only (prompts masked) |
|
| 260 |
| Schedule | One pass, 3,360 steps, batch 4, learning rate 5e-5 with cosine decay to 2e-6, 20 warm-up steps, up to 2,048 tokens |
|
|
|
|
| 268 |
- **Drafts:** messages people type at work and to friends and family, written only for testing and never shown to
|
| 269 |
whoever wrote the lessons: 50 English drafts (Fix and all five tones), 82 Hindi and Hinglish drafts for Fix, and
|
| 270 |
240 tone answers on Hindi and Hinglish drafts.
|
| 271 |
+
- **Answers:** through the same code the app uses. The trained models at temperature 0 with Iris's short prompts; the
|
| 272 |
+
untrained model as Iris ran it before, with Iris's longer prompts (worked examples included) and its usual settings.
|
| 273 |
- **Judge:** an AI model, blind: the answers of all three models to a draft were shown together in shuffled order,
|
| 274 |
with no model names, and judged against written rules.
|
| 275 |
- **Fix "accepted":** no real mistake left and nothing changed beyond trivial tidying (a reworded phrase, an expanded
|
| 276 |
short form or a lost casual voice counts against it). For Hindi drafts: an accurate, natural English version.
|
| 277 |
- **Tones "would send":** the writer could send it in place of the draft: the same meaning, the tone asked for, and
|
| 278 |
it reads naturally.
|
| 279 |
+
- **The GGUF file** was judged on the answers that differ from the MLX model's. Against the MLX model, counted over two judging rounds (MLX against the standard Q4_K_M, then that against this smaller file): English Fix 1 fewer good answer of 50, English tones 1 fewer of 200, Funny 6 fewer of 50, Hindi and Hinglish Fix 1 more of 82, Hindi and Hinglish tones 3 more of 240.
|
| 280 |
|
| 281 |
## Limitations
|
| 282 |
|