Image-Text-to-Text
MLX
Safetensors
gemma4
rotorquant
kv-cache-quantization
gemma
multimodal
quantized
2bit
conversational
2-bit
Instructions to use majentik/gemma-4-31B-it-RotorQuant-MLX-2bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use majentik/gemma-4-31B-it-RotorQuant-MLX-2bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("majentik/gemma-4-31B-it-RotorQuant-MLX-2bit") config = load_config("majentik/gemma-4-31B-it-RotorQuant-MLX-2bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use majentik/gemma-4-31B-it-RotorQuant-MLX-2bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "majentik/gemma-4-31B-it-RotorQuant-MLX-2bit"
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": "majentik/gemma-4-31B-it-RotorQuant-MLX-2bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use majentik/gemma-4-31B-it-RotorQuant-MLX-2bit 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 "majentik/gemma-4-31B-it-RotorQuant-MLX-2bit"
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 majentik/gemma-4-31B-it-RotorQuant-MLX-2bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use majentik/gemma-4-31B-it-RotorQuant-MLX-2bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "majentik/gemma-4-31B-it-RotorQuant-MLX-2bit"
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 "majentik/gemma-4-31B-it-RotorQuant-MLX-2bit" \ --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"
Commit History
-
Remove links to retired duplicate brand variants
Verified signatureee05058
-
Fix quantization metadata: top-level bits 2 (matches tensor data)
Verified signature2861d44
-
Card accuracy pass 2: remove unmeasured speed claims, honest brand labels
Verified signatureefbecfb -
Card accuracy sweep: honest brand labeling, remove dead links, upstream KV tip
Verified signature3be5469 -
Remove links to retired card-only KV-docs repos
Verified signature18d380f
-
docs: upstream-first KV-cache guidance (q8_0/q4_0, mainline Hadamard rotation); fork demoted to experimental
Verified signaturea1c1d3a
-
docs: remove AWQ variants from family table (AWQ lane paused, repos private)
Verified signaturec032db5
-
fix: family model links majentik/gemma4-* -> majentik/gemma-4-* (reported by @shramee in gemma-4-31B-TurboQuant-MLX-4bit#1)
Verified signatureaff45ce
-
docs: Tier 2 polish — variant matrix + quant trade-off
Verified signature886e60d
-
chore(card): enrich YAML frontmatter (pipeline_tag, language, library_name, inference)
Verified signature401ec9d
-
Add MLX quantized model with KV cache compression
Verified signature4c89218 -
initial commit
Verified signature496b83a