Instructions to use mlx-community/Florence-2-base-ft-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Florence-2-base-ft-4bit 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/Florence-2-base-ft-4bit") config = load_config("mlx-community/Florence-2-base-ft-4bit") # 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
- LM Studio
- Xet hash:
- 13fd6af6c39e1532161561e41b9906138a69ef0609ad0d55a1aee00b5a626570
- Size of remote file:
- 164 MB
- SHA256:
- 904321eedba8cf7bb1d7258e08d4efb6b8b2f62dc154d530b7ff663f240df533
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.