Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions examples/models/llama/llama_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,13 @@ def construct_transformer(model_args: ModelArgs) -> Transformer:
norm_eps=model_args.norm_eps,
)
)
elif (
model_args.layer_types
and model_args.layer_types[layer_id] == "skip_attention"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is 'skip_attention' standard?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

):
attention = AttentionSkip()
transformer_block = TransformerBlock(model_args, attention)
layers.append(transformer_block)
else:
attention = cls(
model_args, layer_id, rope, **model_args.attention_kwargs
Expand Down
Loading