Skip to content

Commit

Permalink
Fix model loading (#100)
Browse files Browse the repository at this point in the history
* match regex to the correct string

* update version
  • Loading branch information
brianhie authored Dec 17, 2024
1 parent 63555e1 commit 2670c74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions evo/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def load_checkpoint(
model_config = AutoConfig.from_pretrained(
hf_model_name,
trust_remote_code=True,
revision='1.1_fix' if re.match(r'evo-1-.*-base', hf_model_name) else 'main',
revision='1.1_fix' if re.match(r'evo-1-.*-base', model_name) else 'main',
)
model_config.use_cache = True

Expand All @@ -94,7 +94,7 @@ def load_checkpoint(
hf_model_name,
config=model_config,
trust_remote_code=True,
revision='1.1_fix' if re.match(r'evo-1-.*-base', hf_model_name) else 'main',
revision='1.1_fix' if re.match(r'evo-1-.*-base', model_name) else 'main',
)

# Load model state dict & cleanup.
Expand Down
2 changes: 1 addition & 1 deletion evo/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '0.2.1'
version = '0.3'

0 comments on commit 2670c74

Please sign in to comment.