Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Enable training SAEs on vision models #37

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

luciaquirke
Copy link
Contributor

@luciaquirke luciaquirke commented Dec 3, 2024

  • Update input flattening to support hidden tensors with more batch dimensions
  • Enable specifying dummy inputs - the default transformers dummy input is of shape [3, 5] and uses the 'input_ids' key
  • Improve logging when hookpoints aren't specified correctly

TODO:

  • Enable training from command line (replace tokenizer with image processor)
  • Decide whether to support image data in MemmapDataset
  • Check if we can detect vision models and produce correct dummy input (key value, image shape) in the init

Maybe like

processor = AutoProcessor.from_pretrained(args.model, token=args.hf_token)
target_column = "pixel_values" if isinstance(processor, BaseImageProcessor) else "input_ids"

process.size.shortest_edge exists but no channel count

@luciaquirke luciaquirke changed the title [WIP] Enable training SAEs on vision models Enable training SAEs on vision models Dec 3, 2024
@luciaquirke luciaquirke force-pushed the lucia/vision branch 4 times, most recently from 685fcad to c700c96 Compare December 4, 2024 00:20
@luciaquirke luciaquirke changed the title Enable training SAEs on vision models [WIP] Enable training SAEs on vision models Dec 4, 2024
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