# Text Generation
mlx_lm.generate--modelmlx-community/gemma-4-e2b-it-4bit--prompt"Who are you?"# Vision Task
mlx_vlm.generate--modelmlx-community/gemma-4-e2b-it-4bit--prompt"Describe this image."--image<path_to_image>
You can start the server with:
mlx_vlm.server--port8080# Preload a model at startup (Hugging Face repo or local path)
mlx_vlm.server--modelmlx-community/gemma-4-e2b-it-4bit
This creates a server that lets you access your model with the OpenAI-compatible
endpoint (http://localhost:8080/v1).
For more information and instructions on how to use MLX with Gemma, refer to the
official repository:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-04-16 UTC."],[],[]]