NameError: name 'init_empty_weights' is not defined

#16
by interstellarninja - opened

I'm getting the error when I run this line:
gpt = GPTJForCausalLM.from_pretrained("hivemind/gpt-j-6B-8bit", low_cpu_mem_usage=True)

/usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py:2608 in from_pretrained β”‚
β”‚ β”‚
β”‚ 2605 β”‚ β”‚ β”‚
β”‚ 2606 β”‚ β”‚ # Instantiate model. β”‚
β”‚ 2607 β”‚ β”‚ init_contexts = [no_init_weights(_enable=_fast_init)] β”‚
β”‚ ❱ 2608 β”‚ β”‚ β”‚
β”‚ 2609 β”‚ β”‚ if is_deepspeed_zero3_enabled(): β”‚
β”‚ 2610 β”‚ β”‚ β”‚ import deepspeed β”‚
β”‚ 2611

Sign up or log in to comment