Instructions to use stamsam/Gemma-4-21B-REAP-JANG3M-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use stamsam/Gemma-4-21B-REAP-JANG3M-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("stamsam/Gemma-4-21B-REAP-JANG3M-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 stamsam/Gemma-4-21B-REAP-JANG3M-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 "stamsam/Gemma-4-21B-REAP-JANG3M-MLX"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "stamsam/Gemma-4-21B-REAP-JANG3M-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use stamsam/Gemma-4-21B-REAP-JANG3M-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 "stamsam/Gemma-4-21B-REAP-JANG3M-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 stamsam/Gemma-4-21B-REAP-JANG3M-MLX
Run Hermes
hermes
- MLX LM
How to use stamsam/Gemma-4-21B-REAP-JANG3M-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 "stamsam/Gemma-4-21B-REAP-JANG3M-MLX"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "stamsam/Gemma-4-21B-REAP-JANG3M-MLX" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stamsam/Gemma-4-21B-REAP-JANG3M-MLX", "messages": [ {"role": "user", "content": "Hello"} ] }'
Gemma-4-21B-REAP-JANG3M-MLX
Runtime Notice
This is an experimental JANG3M MLX package, not a fully quality-certified general-purpose release.
Validation snapshot, 2026-05-27:
- The published
config.jsonandmodel.safetensors.index.jsonmatch the local oMLX copy reviewed by the maintainer. - The model loads successfully with the maintainer's local oMLX / MLX runtime.
- A tiny generation smoke test completed without a shape-mismatch crash.
- Output quality is still experimental; use the included REAP/provider scaffold for guarded agent-style behavior.
If you see a shape-mismatch error while loading:
- Make sure you are using a recent oMLX / MLX runtime with
gemma4support. - Re-download the repo into a clean folder instead of mixing files from older local experiments.
- Confirm
config.json,model.safetensors.index.json, and all shard files come from the same Hugging Face revision. - For stable baseline inference, prefer a validated oQ4 build until this JANG3M variant passes broader evals.
Summary
Gemma-4-21B-REAP-JANG3M-MLX is a local agent-instruct model package built
around Gemma-4-21B REAP/JANG training work. It is intended for local agent-style
use through a provider wrapper that can enforce structured-output behavior.
This is one model package, not separate model versions. The recommended Agent path uses:
- model weights
- tokenizer and chat template
- generation config
- included REAP runtime scaffold helper
Recommended Usage
Use the included examples / provider wrapper for Agent behavior. The included runtime scaffold helper can validate structured outputs, repair once, and return safe deterministic fallbacks for JSON/tool/5-tag/refusal routes.
No separate download is required for the scaffold; it is included in the package as helper code.
Technical Caveat
The scaffold is included in the repo, but .safetensors weights cannot execute
Python logic by themselves. Some third-party runtimes may only load weights,
tokenizer, and config, and may not automatically use the scaffold helper. For
best Agent behavior, use the included REAP Agent examples/provider wrapper.
Known Limitations
- Strict JSON/tool behavior is not guaranteed by weights alone.
- Generic runtimes may not execute helper code automatically.
- Code generation remains weak in local evals.
- Runtime validation is a guardrail layer, not a proof of correctness.
- Small adapter experiments were tested locally during development; the final release keeps the clean JANG3M path.
Intended Audience
Local AI agent developers who want a compact REAP/JANG agent package with repo-included structured-output helper logic for local provider wrappers.
- Downloads last month
- 186
Quantized
Model tree for stamsam/Gemma-4-21B-REAP-JANG3M-MLX
Base model
0xSero/Gemma-4-21B