Instructions to use mavis-ai/Gemma4-31B-MLX-Q8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mavis-ai/Gemma4-31B-MLX-Q8 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("mavis-ai/Gemma4-31B-MLX-Q8") config = load_config("mavis-ai/Gemma4-31B-MLX-Q8") # 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 mavis-ai/Gemma4-31B-MLX-Q8 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mavis-ai/Gemma4-31B-MLX-Q8"
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": "mavis-ai/Gemma4-31B-MLX-Q8" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use mavis-ai/Gemma4-31B-MLX-Q8 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 "mavis-ai/Gemma4-31B-MLX-Q8"
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 mavis-ai/Gemma4-31B-MLX-Q8
Run Hermes
hermes
mavis-ai/Gemma4-31B-MLX-Q8
This model is a pure 8-bit MLX quantized version of the official Google Gemma 4 31B model. No structural modifications or fine-tuning have been applied to the base weights—just efficient quantization for seamless local inference on Apple Silicon Macs.
💡 Notice for Everyone While this repository is hosted primarily as a dedicated engine source for our application ecosystem (R.E.V.I.S.), you are completely free to download and use this quantized model normally for your own local MLX projects or workflows. For more details on the base model, please refer directly to the Official google/gemma-4-31B page.
🚀 Optimized for R.E.V.I.S. (Local Cognitive OS)
We quantized and thoroughly tested this model to serve as the local reasoning engine for our project: R.E.V.I.S.
R.E.V.I.S. is a 100% local Cognitive OS for Multi-Agentic AI. It transforms your Mac devices into a distributed Agentic Swarm via zero-config Wi-Fi clustering, allowing you to run heavy AI workloads—like recursive web research, dynamic RAG generation, and multi-step logic—without killing single-machine performance.
If you are interested in pushing the absolute limits of local AI and open-weight models like this one, check out our project!
- 🌐 Official Website: https://mavis-ai.co.jp/revis/
- ▶️ Watch the 13-min Raw Demo (Multi-node Dynamic RAG): https://x.gd/LxaBF
- 🐦 Follow our updates on X: @mavis_ai_jp
License
This model is a quantized derivative of Google's Gemma 4 (base model: google/gemma-4-31B), which is released by Google under the Apache License 2.0.
This derivative is likewise distributed under the Apache License 2.0. A copy of the license is included in the LICENSE file in this repository, and can also be found at https://www.apache.org/licenses/LICENSE-2.0.
Modification notice: The base weights have been quantized to 8-bit using MLX. No fine-tuning or structural modifications were made to the model architecture.
- Downloads last month
- 593
8-bit
Model tree for mavis-ai/Gemma4-31B-MLX-Q8
Base model
google/gemma-4-31B