Views
No views yet
| Mode | Prompt (tok/s) | Generation (tok/s) | Peak Memory |
|---|---|---|---|
| Text only | ~210 | ~52 | 5.6 GB |
| Video (8 frames) | ~194 | ~36 | 7.2 GB |
| Image | ~150 | ~34 | 14.2 GB |
pip install mlx-vlm qwen-vl-utils1from mlx_vlm import load, generate
2
3model, processor = load("andrevp/Keye-VL-1.5-8B-MLX-4bit", trust_remote_code=True)
4
5# Image
6prompt = processor.apply_chat_template(
7 [{"role": "user", "content": [
8 {"type": "image", "image": "photo.jpg"},
9 {"type": "text", "text": "Describe this image."},
10 ]}],
11 tokenize=False, add_generation_prompt=True,
12)
13output = generate(
14 model, processor, prompt,
15 image=["photo.jpg"], max_tokens=200,
16)
17print(output.text)1# One-shot
2python chat.py photo.jpg -p "What's in this image?"
3python chat.py video.mp4 -p "Describe this video" --nframes 16
4
5# Interactive
6python chat.py photo.jpgkeyevl1_5) is required — included in this repo's conversion.