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

Salesforce
/
blip2-opt-2.7b-coco

Image-to-Text
Transformers
PyTorch
Safetensors
English
blip-2
visual-question-answering
vision
image-captioning
Model card Files Files and versions
xet
Community
2

Instructions to use Salesforce/blip2-opt-2.7b-coco with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use Salesforce/blip2-opt-2.7b-coco with Transformers:

    # Use a pipeline as a high-level helper
    # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5.
    # You must load the model directly (see below) or downgrade to v4.x with:
    # 'pip install "transformers<5.0.0'
    from transformers import pipeline
    
    pipe = pipeline("image-to-text", model="Salesforce/blip2-opt-2.7b-coco")
    # Load model directly
    from transformers import AutoProcessor, AutoModelForVisualQuestionAnswering
    
    processor = AutoProcessor.from_pretrained("Salesforce/blip2-opt-2.7b-coco")
    model = AutoModelForVisualQuestionAnswering.from_pretrained("Salesforce/blip2-opt-2.7b-coco")
  • Notebooks
  • Google Colab
  • Kaggle
blip2-opt-2.7b-coco
Ctrl+K
Ctrl+K
  • 5 contributors
History: 10 commits
nielsr's picture
nielsr HF Staff
Update layer norm eps
21f1690 over 2 years ago
  • .gitattributes
    1.48 kB
    initial commit over 3 years ago
  • README.md
    3.37 kB
    Update README.md about 3 years ago
  • config.json
    6.96 kB
    Update layer norm eps over 2 years ago
  • merges.txt
    456 kB
    Upload processor over 3 years ago
  • preprocessor_config.json
    432 Bytes
    Upload processor over 3 years ago
  • pytorch_model-00001-of-00002.bin

    Detected Pickle imports (3)

    • "torch._utils._rebuild_tensor_v2",
    • "collections.OrderedDict",
    • "torch.FloatStorage"

    What is a pickle import?

    10 GB
    xet
    Upload Blip2ForConditionalGeneration over 3 years ago
  • pytorch_model-00002-of-00002.bin

    Detected Pickle imports (3)

    • "collections.OrderedDict",
    • "torch.FloatStorage",
    • "torch._utils._rebuild_tensor_v2"

    What is a pickle import?

    5.5 GB
    xet
    Upload Blip2ForConditionalGeneration over 3 years ago
  • pytorch_model.bin.index.json
    122 kB
    Upload Blip2ForConditionalGeneration over 3 years ago
  • special_tokens_map.json
    548 Bytes
    Upload processor over 3 years ago
  • tokenizer.json
    2.11 MB
    Upload processor over 3 years ago
  • tokenizer_config.json
    904 Bytes
    Upload processor over 3 years ago
  • vocab.json
    798 kB
    Upload processor over 3 years ago