Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

mlx-community
/
idefics2-8b-8bit

Image-Text-to-Text
MLX
Safetensors
English
idefics2
multimodal
vision
conversational
Model card Files Files and versions
xet
Community
1

Instructions to use mlx-community/idefics2-8b-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use mlx-community/idefics2-8b-8bit 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/idefics2-8b-8bit")
    config = load_config("mlx-community/idefics2-8b-8bit")
    
    # 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
idefics2-8b-8bit
8.95 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 7 commits
prince-canuma's picture
prince-canuma
Update preprocessor_config.json
97ce2f7 verified over 1 year ago
  • .gitattributes
    1.52 kB
    initial commit about 2 years ago
  • README.md
    968 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • added_tokens.json
    92 Bytes
    Upload 12 files about 2 years ago
  • chat_template.json
    418 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • config.json
    840 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • model-00001-of-00002.safetensors
    5.35 GB
    xet
    Upload folder using huggingface_hub over 1 year ago
  • model-00002-of-00002.safetensors
    3.6 GB
    xet
    Upload folder using huggingface_hub over 1 year ago
  • model.safetensors.index.json
    154 kB
    Upload folder using huggingface_hub over 1 year ago
  • preprocessor_config.json
    460 Bytes
    Update preprocessor_config.json over 1 year ago
  • processor_config.json
    68 Bytes
    Upload 12 files about 2 years ago
  • special_tokens_map.json
    1.04 kB
    Upload 12 files about 2 years ago
  • tokenizer.json
    3.51 MB
    Upload folder using huggingface_hub over 1 year ago
  • tokenizer.model
    493 kB
    xet
    Upload 12 files about 2 years ago
  • tokenizer_config.json
    1.66 kB
    Upload folder using huggingface_hub over 1 year ago