# salesforce/ALBEF

Code for ALBEF: a new vision-language pre-training method

Repository: https://github.com/salesforce/ALBEF
Canonical: https://ross.abutalabs.com/products/albef
Language: Python
License: BSD-3-Clause
License Family: permissive
Topics: vision-and-language, representation-learning, image-text, weakly-supervised-learning, contrastive-learning
Archived: true
Last push: 2022-09-20T04:57:34+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 1878, "days_push": 1443, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1755, forks 220 (observed 2026-08-28T04:05:32.076513+00:00)

## What it is
Official PyTorch implementation of ALBEF, a vision-and-language pre-training method that aligns image and text representations before fusing them, with momentum distillation. It supports pre-training on custom image-text datasets and fine-tuning for retrieval, VQA, NLVR2, SNLI-VE, and visual grounding tasks.

## Use cases
- pre-train a vision-language model on my own image-caption dataset
- build an image-text retrieval system for MSCOCO or Flickr30k
- fine-tune a multimodal model for visual question answering
- perform visual grounding to locate image regions from text descriptions
- learn contrastive vision-language representation learning methods
- visualize which image regions correspond to words in a caption

## When to choose
- you need the original ALBEF research code with released checkpoints for reproducibility
- you want to pre-train or fine-tune a vision-language model on custom image-text data
- you need strong baselines for image-text retrieval, VQA, or visual grounding research

## When to avoid
- you want a maintained, production-ready multimodal library - use LAVIS instead, which now integrates ALBEF
- you need text-only or image-only models without cross-modal capabilities
- you lack GPU resources, since pre-training requires multiple A100 GPUs

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning, nlp, image-processing, rag
- domain: machine-learning, computer-vision, artificial-intelligence
- platform: python
- tags: vision-language, contrastive-learning, pre-training, momentum-distillation, pytorch, multimodal, image-text-retrieval, visual-grounding, vqa, research-code, natural-language-processing, gpu, linux

## Member repositories
- salesforce/ALBEF (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:32.076513+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:28:01.937868+00:00, confidence not recorded.
  - readme: https://github.com/salesforce/ALBEF (fetched 2026-08-28T04:05:32.076513+00:00, sha d92739978252)
- Data as of 2026-08-30T08:39:29.467469+00:00.
