NVIDIA-Merlin / NVIDIA-Merlin/Transformers4Rec
[FEA] Feature to extract attention values from transformer heads
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 165
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Description
🚀 Feature request
Ability to extract attention weights from various heads of transformer
Motivation
Plotting attention provides insights into the inner-workings and user behaviors that business teams can relate with. This is easily available with pytorch / Tensorflow.
Is there a way to convert the trained model to PT / TF models to capture the attention values?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the existing transformer model and export paths, then determine how attention values could be exposed for individual heads in the supported PyTorch or TensorFlow workflows; done would mean a documented, tested way to extract those values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch, tensorflow
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100