Instructions to use mlx-community/Lumine2-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Lumine2-8bit 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/Lumine2-8bit") config = load_config("mlx-community/Lumine2-8bit") # 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 mlx-community/Lumine2-8bit 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/Lumine2-8bit"
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": "mlx-community/Lumine2-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use mlx-community/Lumine2-8bit 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/Lumine2-8bit"
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/Lumine2-8bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mlx-community/Lumine2-8bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Lumine2-8bit"
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 "mlx-community/Lumine2-8bit" \ --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"
Lumine2-8bit
Lumine 2 is a vision-language game agent that takes screenshots and generates keyboard and mouse actions. This MLX conversion runs on Apple Silicon with mlx-vlm. Original model ยท mlx-vlm
Conversion
The exported files use the MLX Safetensors layout, with the original tokenizer, processor files, and chat template. Eligible language-model layers use 8-bit affine quantization with group size 64. The vision encoder stays in BF16. The export omits the upstream MTP draft tensors. The weight files total about 10.4 GB on disk.
Quick start
This single-frame test uses the upstream corridor screenshot and Instant prompt. The preparation step applies the client's JPEG encoding before resizing the image to 800ร448. It was verified on an M3 Max with Python 3.12. The pinned OpenCV wheel requires macOS 15 or later.
python -m pip install 'mlx-vlm==0.8.2' 'mlx==0.32.5' \
'opencv-python==5.1.0.95' 'Pillow==13.0.0'
python - <<'PYTHON'
from io import BytesIO
from pathlib import Path
from urllib.request import urlopen
import cv2
import numpy as np
from PIL import Image
source = "https://raw.githubusercontent.com/LumineResearch/Lumine2/a383527d2f4c515e7f680a3aeca8d7502e0c4e69/"
def fetch(path):
with urlopen(source + path, timeout=30) as response:
return response.read()
game = fetch("client/prompts/games/cyberpunk_2077_en.txt").decode().rstrip()
instant = fetch("client/prompts/modes/instant.en.txt").decode().strip()
system = (game + "\n\n" + instant).replace(
"<instruction>", "Walk forward down the corridor by holding W."
)
Path("system.txt").write_text(system, encoding="utf-8")
png = fetch("server/tests/test_data/screenshots/corridor.png")
frame = cv2.imdecode(np.frombuffer(png, dtype=np.uint8), cv2.IMREAD_COLOR)
frame = cv2.resize(frame, (1280, 720), interpolation=cv2.INTER_LINEAR)
ok, jpeg = cv2.imencode(".jpg", frame, [cv2.IMWRITE_JPEG_QUALITY, 95])
if not ok:
raise RuntimeError("Could not encode the corridor frame")
with Image.open(BytesIO(jpeg.tobytes())) as image:
image.convert("RGB").resize((800, 448), Image.Resampling.BILINEAR).save("corridor-800.png")
PYTHON
python -m mlx_vlm.generate \
--model mlx-community/Lumine2-8bit \
--image corridor-800.png \
--system "$(cat system.txt)" \
--prompt "" --no-enable-thinking --temperature 0 --max-tokens 48
The model emits six action slices. In this example, the sixth slice contains W.
<|action_start|>0 0 0<|action_sep|><|action_sep|><|action_sep|><|action_sep|><|action_sep|><|action_sep|> W<|action_end|>
Keep the special tokens in the output so the action slices can be parsed. This command prints actions to the terminal. For live play, the Lumine 2 client handles screen capture and input with a compatible server. Client setup
License
The converted weights use Apache License 2.0. The original model is credited to the Lumine 2 contributors. License ยท Upstream project
- Downloads last month
- -
8-bit