GPTJConfig has no attribute rotary. (#532)

This commit is contained in:
leegohi04517 2023-07-25 02:29:30 +08:00 committed by GitHub
parent 6fc2a38b11
commit 1dde34e0f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,7 @@ class GPTJAttention(nn.Module):
self.num_heads = self.total_num_heads // tp_world_size
scaling = self.head_size**-0.5
assert config.rotary
assert getattr(config, "rotary", True)
assert config.rotary_dim % 2 == 0
self.attn = PagedAttentionWithRoPE(self.num_heads, self.head_size,
scaling, config.rotary_dim)