Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
francoishernandez committed Jan 29, 2025
1 parent f4a26f7 commit 1a8f969
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions eole/encoders/vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ def __init__(self, model_config, running_config=None):
self.ln_pre = RMSNorm(model_config.hidden_size, eps=1e-5)
self.transformer_layers = torch.nn.ModuleList()
for _ in range(model_config.layers):
self.transformer_layers.append(
TransformerEncoderLayer(model_config, running_config=running_config)
)
self.transformer_layers.append(TransformerEncoderLayer(model_config, running_config=running_config))

head_dim = model_config.hidden_size // model_config.heads
assert head_dim % 2 == 0, "ROPE requires even head_dim"
Expand Down
5 changes: 1 addition & 4 deletions eole/inputters/text_corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,7 @@ def __init__(self, name, data, is_train=False):

def load(self, offset=0, stride=1):
def make_ex(item):
example = {
"text": item["text"],
"images": item.get("images", {})
}
example = {"text": item["text"], "images": item.get("images", {})}
return example

if isinstance(self.data, list):
Expand Down

0 comments on commit 1a8f969

Please sign in to comment.