Alan Liu commited on
Commit
c3170d8
1 Parent(s): cae5be9

fix import bug

Browse files
Files changed (1) hide show
  1. model_util.py +1 -1
model_util.py CHANGED
@@ -3,7 +3,6 @@ import re
3
  from collections import defaultdict
4
  # Utilities related to loading in and working with models/specific models
5
  from urllib.parse import urlparse
6
- import torch
7
  from accelerate.commands.estimate import check_has_model, create_empty_model
8
  from accelerate.utils import compute_module_sizes, named_module_tensors
9
  from huggingface_hub.utils import GatedRepoError, RepositoryNotFoundError
@@ -125,6 +124,7 @@ def get_module_tensors_matched(filter_fn, module_classes_dict):
125
 
126
 
127
  if __name__ == '__main__':
 
128
  model = get_model('NousResearch/Nous-Hermes-Llama2-13b', None, None)
129
  module_tensors = get_module_tensors(model)
130
  module_classes = classify_module(module_tensors)
 
3
  from collections import defaultdict
4
  # Utilities related to loading in and working with models/specific models
5
  from urllib.parse import urlparse
 
6
  from accelerate.commands.estimate import check_has_model, create_empty_model
7
  from accelerate.utils import compute_module_sizes, named_module_tensors
8
  from huggingface_hub.utils import GatedRepoError, RepositoryNotFoundError
 
124
 
125
 
126
  if __name__ == '__main__':
127
+ import torch
128
  model = get_model('NousResearch/Nous-Hermes-Llama2-13b', None, None)
129
  module_tensors = get_module_tensors(model)
130
  module_classes = classify_module(module_tensors)