Spaces:
Sleeping
Sleeping
meghanaraok
commited on
Update LongHiLATmain/models/modeling.py
Browse files
LongHiLATmain/models/modeling.py
CHANGED
@@ -242,7 +242,6 @@ class CodingModel(torch.nn.Module, PyTorchModelHubMixin):
|
|
242 |
config.attention_window = [512, 512]
|
243 |
longformer_layer = LongformerEncoder(config)
|
244 |
# longformer_layer = longformer_layer(config)
|
245 |
-
longformer_layer = longformer_layer.to(torch.device("cuda:0"))
|
246 |
l2_dropout= l2_dropout.reshape(l2_dropout.shape[0], l2_dropout.shape[1]*l2_dropout.shape[2], l2_dropout.shape[3])
|
247 |
attention_mask = attention_mask.reshape(attention_mask.shape[0], attention_mask.shape[1]*attention_mask.shape[2])
|
248 |
# is_index_masked = attention_mask < 0
|
|
|
242 |
config.attention_window = [512, 512]
|
243 |
longformer_layer = LongformerEncoder(config)
|
244 |
# longformer_layer = longformer_layer(config)
|
|
|
245 |
l2_dropout= l2_dropout.reshape(l2_dropout.shape[0], l2_dropout.shape[1]*l2_dropout.shape[2], l2_dropout.shape[3])
|
246 |
attention_mask = attention_mask.reshape(attention_mask.shape[0], attention_mask.shape[1]*attention_mask.shape[2])
|
247 |
# is_index_masked = attention_mask < 0
|