transformer_lens.model_bridge.supported_architectures.florence2 module

Florence-2 architecture adapter.

Microsoft’s Florence-2 (Florence2ForConditionalGeneration): a DaViT vision backbone at model.vision_tower whose projected features are scattered into image-placeholder tokens, feeding a BART encoder-decoder at model.language_model. The text stack reuses the BART mapping with re-prefixed paths; the vision tower and projector are opaque delegated components (window/channel-attention DaViT has no TL analogue).

class transformer_lens.model_bridge.supported_architectures.florence2.Florence2ArchitectureAdapter(cfg: Any)

Bases: BartArchitectureAdapter

Architecture adapter for Florence2ForConditionalGeneration models.

__init__(cfg: Any) None

Initialize the Florence-2 architecture adapter.