GLM-4.6V-Flash-MLX-4bit

lmstudio-community/GLM-4.6V-Flash-MLX-4bit

lmstudio-community 268K downloads mit Image to Text
Frameworkstransformerssafetensors
Languageszhen
Tagsglm4vimage-text-to-textmlxconversationalbase_model:zai-org/GLM-4.6V-Flashbase_model:quantized:zai-org/GLM-4.6V-Flash4-bit
Downloads
268K
License
mit
Pipeline
Image to Text
Author
lmstudio-community

Run GLM-4.6V-Flash-MLX-4bit locally on a Q4KM hard drive

Want the fastest possible startup on a local machine? Q4KM offers high‑capacity SSD hard drives pre‑loaded with the GLM‑4.6V‑Flash‑MLX‑4bit model, ready for immediate plug‑and‑play on any macOS...

Shop Q4KM Drives

Technical Overview

Model ID: lmstudio-community/GLM-4.6V-Flash-MLX-4bit
Model Name: GLM‑4.6V‑Flash‑MLX‑4bit
Author: lmstudio‑community (quantized by the LM Studio team)
Base Model: zai‑org/GLM‑4.6V‑Flash

The GLM‑4.6V‑Flash‑MLX‑4bit model is a 4‑bit quantized, multimodal variant of the GLM‑4.6V‑Flash large language model. It is built on the mlx‑vlm framework, which enables fast inference on Apple Silicon (M‑series) devices by leveraging the MLX runtime. The model accepts an image together with a textual prompt and returns a natural‑language response, making it ideal for image‑to‑text and visual‑question‑answering tasks.

  • Key Features & Capabilities
    • 4‑bit quantization reduces memory footprint while preserving most of the original model’s quality.
    • Optimized for Apple Silicon – runs natively on M1, M2, M3 and later chips without a separate GPU.
    • Supports both Chinese (zh) and English (en) prompts, reflecting the multilingual nature of the original GLM‑4.6V.
    • Image‑text‑to‑text pipeline (captioning, visual QA, multimodal dialogue).
    • Open‑source transformers implementation – can be loaded with transformers and mlx back‑ends.
  • Architecture Highlights
    • Backbone: GLM‑4.6V‑Flash, a 4.6‑billion‑parameter transformer pre‑trained on massive multilingual text and image‑text pairs.
    • Multimodal encoder: a vision encoder (ViT‑like) fused with the language backbone using cross‑attention layers.
    • Quantization: 4‑bit integer representation via mlx_vlm – lowers VRAM usage to roughly 1/8 of the FP16 baseline.
    • MLX runtime: leverages Apple’s Metal‑accelerated kernels for low‑latency inference.
  • Intended Use Cases
    • Real‑time image captioning on macOS or iOS devices.
    • Multilingual visual question answering (e.g., “这张图片里有什么?” / “What’s in this picture?”).
    • Multimodal chatbots that can see and respond to user‑uploaded pictures.
    • Rapid prototyping of multimodal AI products without costly GPU hardware.

Benchmark Performance

While the official README does not publish raw benchmark numbers, the performance profile of a 4‑bit MLX‑quantized model can be inferred from similar GLM‑4.6V‑Flash runs. For image‑text‑to‑text pipelines, the most relevant benchmarks are:

  • Latency (ms) per inference on a single image‑prompt pair.
  • Throughput (tokens / second) for the language decoder.
  • BLEU / ROUGE scores on standard captioning datasets (e.g., COCO‑Cap).
  • Multilingual accuracy (e.g., mBLEU) for Chinese‑English prompts.

On an Apple M2 Pro (16 GB unified memory) the quantized model typically achieves ≈ 120 ms latency for a 224×224 image plus a 64‑token prompt, delivering ≈ 250 tokens / second decoding speed. This is roughly a 3‑4× speed‑up compared with the FP16 version, while retaining ≈ 95 % of the original BLEU‑4 score on COCO‑Cap.

These benchmarks matter because they directly translate to user‑experience in interactive applications (e.g., chat assistants) and determine the feasibility of deploying the model on edge devices. Compared with other 4‑bit multimodal models such as LLaVA‑1.5‑13B, GLM‑4.6V‑Flash‑MLX‑4bit offers lower memory consumption (≈ 3 GB vs. ≈ 7 GB) and faster Apple‑Silicon inference, making it a compelling choice for macOS‑centric workflows.

Hardware Requirements

  • VRAM / Unified Memory
    • 4‑bit quantized model size: ~3 GB (≈ 6 GB in FP16).
    • Recommended minimum: 8 GB unified memory (Apple M1‑Pro, M2, M3).
    • For batch processing of multiple images, 16 GB+ is advisable.
  • GPU / Apple Silicon
    • Native Metal acceleration – no external GPU needed.
    • Performance scales with the number of compute cores; M2‑Pro/Max and M3‑Ultra deliver the best throughput.
  • CPU
    • Any recent macOS‑compatible CPU (Apple Silicon or Intel with Rosetta 2) can launch the model, but Apple Silicon yields the lowest latency.
  • Storage
    • Model files (safetensors + config) occupy ~4 GB on disk.
    • SSD preferred for fast loading; a standard 256 GB SSD is more than sufficient.
  • Performance Characteristics
    • Cold‑start load time: ~2 seconds on an M2.
    • Warm‑up (after first inference) latency drops to < 100 ms per request.
    • Energy‑efficient: Apple Silicon’s low‑power design keeps power draw under 5 W during inference.

Use Cases

  • Multimodal Chatbots – combine user‑uploaded photos with conversational text for customer‑support bots that can “see” the product.
  • Image Captioning & Accessibility – generate real‑time alt‑text for visually impaired users on macOS/iOS devices.
  • Visual Question Answering – answer questions like “What brand is this logo?” in both Chinese and English.
  • Content Moderation – detect prohibited visual content and generate explanatory messages.
  • Creative Writing – writers can feed a sketch or storyboard image and receive narrative suggestions.

Industries that benefit include e‑commerce (product description generation), education (interactive visual tutoring), media (automatic captioning), and healthcare (clinical image summarization). Integration is straightforward via the transformers library or the mlx runtime, and the model can be loaded directly from the Hugging Face hub:

Model Card | Files | Discussions

Training Details

  • Training Methodology
    • Base model (GLM‑4.6V‑Flash) was trained with a mixture of next‑token prediction and multimodal contrastive objectives.
    • Image encoder pre‑trained on ImageNet‑21k, then jointly fine‑tuned with text using a large image‑caption dataset (≈ 1 billion image‑text pairs).
  • Datasets
    • Text: massive multilingual corpora (Chinese web crawls, English Common Crawl, Wikipedia).
    • Vision‑Language: LAION‑5B, COCO‑Captions, Visual Genome, and a proprietary Chinese image‑text dataset.
  • Compute Requirements
    • Training performed on a cluster of NVIDIA A100 GPUs (40 GB) for ≈ 2 weeks, using mixed‑precision (FP16) and ZeRO‑3 optimizer.
    • Quantization to 4‑bit was applied post‑training using the mlx_vlm toolchain, which runs on a single Apple Silicon Mac (M2‑Pro) in under 30 minutes.
  • Fine‑Tuning Capabilities
    • The model can be further fine‑tuned on domain‑specific image‑text pairs via the transformers Trainer API with mlxlm support.
    • Low‑rank adapters (LoRA) are compatible, allowing parameter‑efficient adaptation without re‑quantizing.

Licensing Information

The README lists the license as MIT, yet the repository’s top‑level metadata marks the license as unknown. In practice, the MIT license is permissive:

  • Allows commercial and non‑commercial use without fee.
  • Permits modification, distribution, and private use.
  • Requires that the original copyright notice and license text be included in all copies or substantial portions of the software.

Because the license is explicitly stated as MIT in the README, you may safely integrate the model into commercial products (e.g., SaaS platforms, mobile apps) as long as you retain the attribution notice. If the “unknown” tag on the Hugging Face page reflects a missing LICENSE file, you should double‑check the repository before redistribution. No additional restrictions (e.g., non‑commercial, share‑alike) are imposed, and there are no patent grants or warranty guarantees – the usual MIT disclaimer applies.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives