Skip to content

[WIP] Add AST Adapter#1484

Draft
dylanberens wants to merge 1 commit into
TransformerLensOrg:dev-4.xfrom
dylanberens:add-ast-adapter
Draft

[WIP] Add AST Adapter#1484
dylanberens wants to merge 1 commit into
TransformerLensOrg:dev-4.xfrom
dylanberens:add-ast-adapter

Conversation

@dylanberens

Copy link
Copy Markdown

map HF ASTConfig to HookedTransformerConfig

build custom ASTEmbed w/ 16x16 Conv2d patch extraction

translate q/k/v_proj and fc1/fc2 dense weights to TL standard blocks

implement CLS and Distillation token averaging for AST MLP head

apply dual layernorm architecture to pooled tokens

draft local matrix parity test suite (current max diff: ~0.05)

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots

Please attach before and after screenshots of the change if applicable.

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

map HF ASTConfig to HookedTransformerConfig

build custom ASTEmbed w/ 16x16 Conv2d patch extraction

translate q/k/v_proj and fc1/fc2 dense weights to TL standard blocks

implement CLS and Distillation token averaging for AST MLP head

apply dual layernorm architecture to pooled tokens

draft local matrix parity test suite (current max diff: ~0.05)
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.

1 participant