Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

mlx-community
/
Florence-2-base-ft-4bit

Image-Text-to-Text
MLX
Safetensors
florence2
vision
custom_code
Model card Files Files and versions
xet
Community

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
Florence-2-base-ft-4bit
169 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
prince-canuma's picture
prince-canuma
Upload folder using huggingface_hub
cfed5ed verified over 1 year ago
  • .gitattributes
    1.52 kB
    initial commit over 1 year ago
  • README.md
    608 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • added_tokens.json
    22.4 kB
    Upload folder using huggingface_hub over 1 year ago
  • config.json
    6.7 kB
    Upload folder using huggingface_hub over 1 year ago
  • merges.txt
    456 kB
    Upload folder using huggingface_hub over 1 year ago
  • model.safetensors
    164 MB
    xet
    Upload folder using huggingface_hub over 1 year ago
  • model.safetensors.index.json
    97 kB
    Upload folder using huggingface_hub over 1 year ago
  • preprocessor_config.json
    603 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • processing_florence2.py
    46.4 kB
    Upload folder using huggingface_hub over 1 year ago
  • processor_config.json
    130 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • special_tokens_map.json
    440 kB
    Upload folder using huggingface_hub over 1 year ago
  • tokenizer.json
    3.75 MB
    Upload folder using huggingface_hub over 1 year ago
  • tokenizer_config.json
    232 kB
    Upload folder using huggingface_hub over 1 year ago
  • vocab.json
    798 kB
    Upload folder using huggingface_hub over 1 year ago