Skip to content

Commit

Permalink
Fix model memory issue (#2327)
Browse files Browse the repository at this point in the history
* Potential fix

* REmove config part?
  • Loading branch information
muellerzr committed Jan 11, 2024
1 parent 2a40373 commit 6ec92cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/accelerate/commands/estimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def create_empty_model(model_name: str, library_name: str, trust_remote_code: bo
print(f"Loading pretrained config for `{model_name}` from `transformers`...")

auto_map = model_info.config.get("auto_map", False)
config = AutoConfig.from_pretrained(model_name, trust_remote_code=trust_remote_code)
config = AutoConfig.from_pretrained(model_name, trust_remote_code=trust_remote_code, token=access_token)

with init_empty_weights():
# remote code could specify a specific `AutoModel` class in the `auto_map`
Expand Down

0 comments on commit 6ec92cf

Please sign in to comment.