How to use from the
Use from the
MLX library
# 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("LiquidAI/LFM3-VL-2B-MLX-6bit")
config = load_config("LiquidAI/LFM3-VL-2B-MLX-6bit")

# 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)

LFM3-VL-2B-MLX-6bit

6-bit MLX version of LFM3-VL-2B for Apple Silicon. The weights take 1.78 GB.

Weights use 6-bit affine quantization with groups of 64.

Find architecture and usage details in the original model card.

Use with MLX-VLM


Support for LFM3-VL in MLX-VLM is in progress. We will update this card when an MLX-VLM release supports it.

python -m mlx_vlm.generate --model LiquidAI/LFM3-VL-2B-MLX-6bit \
  --image <IMAGE PATH> --prompt "Describe this image." \
  --temperature 0.1 --top-p 1.0 --top-k 50 --min-p 0.0 --repetition-penalty 1.1 \
  --max-tokens 16384

More options in the MLX guide.

Downloads last month
571
Safetensors
Model size
2B params
Tensor type
U32
ยท
BF16
ยท
MLX
Hardware compatibility
Log In to add your hardware

6-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for LiquidAI/LFM3-VL-2B-MLX-6bit

Quantized
(33)
this model