Instructions to use nikimori/gemma-4-e4b-it-4bit-slim with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use nikimori/gemma-4-e4b-it-4bit-slim 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("nikimori/gemma-4-e4b-it-4bit-slim") 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 nikimori/gemma-4-e4b-it-4bit-slim with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "nikimori/gemma-4-e4b-it-4bit-slim"
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": "nikimori/gemma-4-e4b-it-4bit-slim" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use nikimori/gemma-4-e4b-it-4bit-slim with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "nikimori/gemma-4-e4b-it-4bit-slim"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "nikimori/gemma-4-e4b-it-4bit-slim" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nikimori/gemma-4-e4b-it-4bit-slim", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use nikimori/gemma-4-e4b-it-4bit-slim 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 "nikimori/gemma-4-e4b-it-4bit-slim"
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 nikimori/gemma-4-e4b-it-4bit-slim
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use nikimori/gemma-4-e4b-it-4bit-slim with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "nikimori/gemma-4-e4b-it-4bit-slim"
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 "nikimori/gemma-4-e4b-it-4bit-slim" \ --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"
Gemma 4 E4B-it, 4-bit MLX (slim)
A slimmer re-pack of mlx-community/gemma-4-e4b-it-4bit, a conversion of google/gemma-4-E4B-it:
- The audio tower is removed. The vision tower stays, because Pretype's speculative-decoding load (with Google's MTP drafter) needs it.
- All other weights are unchanged.
The weights are 4.53 GB instead of 5.15 GB (−12%). In Pretype's evals the outputs match the original (details). The license is the upstream one (Apache-2.0).
Made for Pretype, on-device autocomplete for macOS. It is the model that fixes a selection (⌥Tab) and drafts replies on Pretype's Gemma E2B 8-bit tier, and on the E4B tiers in Base style.
On Pretype's held-out sets (2026-10-11, 17–19 languages), it restores 65% [61–69] of single-typo sentences exactly, proposes a change on 21% of clean lines, and drafts a usable reply for 95% [92–97] of on-screen conversations.
from mlx_lm import load, generate
model, tokenizer = load("nikimori/gemma-4-e4b-it-4bit-slim")
messages = [{"role": "user", "content": "Fix the typo: I recieved your letter."}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
print(generate(model, tokenizer, prompt=prompt, max_tokens=40))
- Downloads last month
- 41
4-bit