Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
e0beb91 to
d409f10
Compare
Comment on lines
+766
to
+770
| "hidden_states": [ | ||
| OutputRecorder(MllamaTextSelfAttention, index=0), | ||
| OutputRecorder(MllamaTextCrossAttention, index=0), | ||
| ], | ||
| "attentions": [ | ||
| OutputRecorder(MllamaTextSelfAttention, index=1, layer_name="self_attn"), | ||
| OutputRecorder(MllamaTextSelfAttention, index=1, layer_name="cross_attn"), | ||
| OutputRecorder(MllamaTextCrossAttention, index=1, layer_name="cross_attn"), | ||
| ], |
Collaborator
There was a problem hiding this comment.
Index can be optinal, by default hidden is 0 and attention is 1
Collaborator
Author
There was a problem hiding this comment.
Updated hidden_states to "hidden_states": [MllamaSelfAttentionDecoderLayer, MllamaCrossAttentionDecoderLayer],, but for attentions still using direct layers
af0e94c to
3bd4c0a
Compare
f7811d4 to
4ebcc20
Compare
ArthurZucker
approved these changes
Jul 28, 2025
Collaborator
ArthurZucker
left a comment
There was a problem hiding this comment.
Decoder layer should only need to return HS, never the attention weights no?
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: mllama |
b71d470 to
fa870ff
Compare
5 tasks
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* mllama outputs refactor * forgot kwargs * fix output * add can_record_outputs * correct @check_model_inputs placement * ruff and copies * rebase * feedback * only return hidden_states --------- Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-161-153.ec2.internal> Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-162-14.ec2.internal>
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* mllama outputs refactor * forgot kwargs * fix output * add can_record_outputs * correct @check_model_inputs placement * ruff and copies * rebase * feedback * only return hidden_states --------- Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-161-153.ec2.internal> Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-162-14.ec2.internal>
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* mllama outputs refactor * forgot kwargs * fix output * add can_record_outputs * correct @check_model_inputs placement * ruff and copies * rebase * feedback * only return hidden_states --------- Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-161-153.ec2.internal> Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-162-14.ec2.internal>
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* mllama outputs refactor * forgot kwargs * fix output * add can_record_outputs * correct @check_model_inputs placement * ruff and copies * rebase * feedback * only return hidden_states --------- Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-161-153.ec2.internal> Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-162-14.ec2.internal>
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* mllama outputs refactor * forgot kwargs * fix output * add can_record_outputs * correct @check_model_inputs placement * ruff and copies * rebase * feedback * only return hidden_states --------- Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-161-153.ec2.internal> Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-162-14.ec2.internal>
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* mllama outputs refactor * forgot kwargs * fix output * add can_record_outputs * correct @check_model_inputs placement * ruff and copies * rebase * feedback * only return hidden_states --------- Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-161-153.ec2.internal> Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-162-14.ec2.internal>
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* mllama outputs refactor * forgot kwargs * fix output * add can_record_outputs * correct @check_model_inputs placement * ruff and copies * rebase * feedback * only return hidden_states --------- Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-161-153.ec2.internal> Co-authored-by: ita.zaporozhets@huggingface.co <ita_zaporozhets@ip-26-0-162-14.ec2.internal>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
refactor using latest outputs merge