Skip to content

Feature/bart adapter#1442

Merged
jlarson4 merged 1 commit into
TransformerLensOrg:devfrom
hsusul:feature/bart-adapter-dev
Jun 25, 2026
Merged

Feature/bart adapter#1442
jlarson4 merged 1 commit into
TransformerLensOrg:devfrom
hsusul:feature/bart-adapter-dev

Conversation

@hsusul

@hsusul hsusul commented Jun 25, 2026

Copy link
Copy Markdown

Description

Adds initial TransformerBridge support for BartForConditionalGeneration.

This implements a minimal BART encoder-decoder adapter following the existing T5/MT5 encoder-decoder patterns, with BART-specific module paths for shared embeddings, encoder blocks, decoder blocks, decoder cross-attention, fc1 / fc2 MLPs, layer norms, and lm_head.

Fixes #1401

This first slice is intentionally raw-HF parity focused:

  • supports BartForConditionalGeneration
  • supports symmetric encoder/decoder BART configs
  • maps decoder cross-attention with is_cross_attention=True
  • disables fold-LN / center-writing processing for post-LN BART
  • does not add Pegasus, mBART, Marian, or M2M100 support
  • does not implement compatibility-mode weight processing

No new runtime dependencies are required.

Type of change

  • New feature (non-breaking change which adds functionality)

Screenshots

N/A

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have not rewritten tests relating to key interfaces which would affect backward compatibility

@hsusul hsusul changed the base branch from main to dev June 25, 2026 04:34
@hsusul hsusul force-pushed the feature/bart-adapter-dev branch from 8890e70 to 1aaee0e Compare June 25, 2026 04:35
@jlarson4

Copy link
Copy Markdown
Collaborator

Great work on this! Merging

@jlarson4 jlarson4 merged commit 7c94746 into TransformerLensOrg:dev Jun 25, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Proposal] Add BART encoder-decoder adapter (BartForConditionalGeneration)

2 participants