Image-Text-to-Text
MLX
Safetensors
multilingual
internvl_chat
mlx-vlm
internvl
internvl3
4-bit precision
quantized
vision-language-model
apple-silicon
conversational
custom_code
Instructions to use mlx-community/InternVL3-8B-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/InternVL3-8B-MLX-4bit 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("mlx-community/InternVL3-8B-MLX-4bit") config = load_config("mlx-community/InternVL3-8B-MLX-4bit") # 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
- LM Studio
- Pi new
How to use mlx-community/InternVL3-8B-MLX-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/InternVL3-8B-MLX-4bit"
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": "mlx-community/InternVL3-8B-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use mlx-community/InternVL3-8B-MLX-4bit 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 "mlx-community/InternVL3-8B-MLX-4bit"
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 mlx-community/InternVL3-8B-MLX-4bit
Run Hermes
hermes
InternVL3-8B-MLX-4bit
This repository contains a 4-bit MLX quantized conversion of mlx-community/InternVL3-8B-bf16 for Apple Silicon inference.
Conversion Details
| Setting | Value |
|---|---|
| Source model | mlx-community/InternVL3-8B-bf16 |
| Conversion tool | mlx_vlm.convert |
| Quantization bits | 4 |
| Group size | 64 |
| Quantization mode | affine |
| Quant predicate | none (uniform quantization) |
Conversion command used:
python3 -m mlx_vlm convert \
--hf-path "mlx-community/InternVL3-8B-bf16" \
--mlx-path "./models/InternVL3-8B-4bit" \
-q --q-bits 4 --q-group-size 64
Validation
| Test | Status |
|---|---|
| Text generation load test | passed |
Verification command:
python3 -m mlx_vlm generate \
--model "./models/InternVL3-8B-4bit" \
--prompt "Reply with exactly: OK" \
--max-tokens 8 --temperature 0
Observed response: OK
Usage
Install:
python3 -m pip install -U mlx-vlm
Run locally from this folder:
python3 -m mlx_vlm generate \
--model "." \
--prompt "Describe the image briefly." \
--image path/to/image.jpg \
--max-tokens 256 \
--temperature 0
Run from Hugging Face after upload:
python3 -m mlx_vlm generate \
--model "mlx-community/InternVL3-8B-MLX-4bit" \
--prompt "Describe the image briefly." \
--image path/to/image.jpg \
--max-tokens 256 \
--temperature 0
Notes
- This conversion does not upload anything automatically.
- Quantization changes numerical behavior relative to bf16 weights.
- During local tests,
mlx_vlmemitted an upstream tokenizer regex warning from the source model assets.
Links
- Source model: https://huggingface.co/mlx-community/InternVL3-8B-bf16
- MLX: https://github.com/ml-explore/mlx
- mlx-vlm: https://github.com/Blaizzy/mlx-vlm
License
Follows the upstream model license terms from the source repository.
- Downloads last month
- 127
Model size
1B params
Tensor type
BF16
·
U32 ·
Hardware compatibility
Log In to add your hardware
4-bit
Model tree for mlx-community/InternVL3-8B-MLX-4bit
Base model
OpenGVLab/InternVL3-1B-Pretrained Finetuned
OpenGVLab/InternVL3-1B-Instruct Finetuned
mlx-community/InternVL3-8B-bf16