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

Refactor hooks / Save Attention Maps script #34

Merged
merged 14 commits into from
May 13, 2024
Merged

Refactor hooks / Save Attention Maps script #34

merged 14 commits into from
May 13, 2024

Conversation

v0xie
Copy link
Owner

@v0xie v0xie commented May 13, 2024

  • Adds module_hooks.py with functions to add fields / forward hooks to modules
  • Adds prompt_utils with a function to get token count.
  • Adds Save Attention Maps which uses the new functions in module_hooks to do the hooking
  • Save Attention Maps and other debug scripts will be loaded iff the INCANT_DEBUG environment variable is set.

@v0xie v0xie merged commit 6aa847f into dev May 13, 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