Skip to content

Error running on google colab #73

Description

@George3d6
NameError                                 Traceback (most recent call last)

[<ipython-input-42-77feb2eb4300>](https://localhost:8080/#) in <module>
      1 from transformers import AutoTokenizer, OPTForCausalLM
      2 tokenizer = AutoTokenizer.from_pretrained("facebook/galactica-125m")
----> 3 model = OPTForCausalLM.from_pretrained("facebook/galactica-125m", device_map="auto")

[/usr/local/lib/python3.8/dist-packages/transformers/modeling_utils.py](https://localhost:8080/#) in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
   2357             init_contexts = [deepspeed.zero.Init(config_dict_or_path=deepspeed_config())] + init_contexts
   2358         elif load_in_8bit or low_cpu_mem_usage:
-> 2359             init_contexts.append(init_empty_weights())
   2360 
   2361         with ContextManagers(init_contexts):

NameError: name 'init_empty_weights' is not defined

I've installed the latest version of accelerate and transformers, no other libraries

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions