alpaca-lora icon indicating copy to clipboard operation
alpaca-lora copied to clipboard

offload_dir error on Colab

Open amrrs opened this issue 3 years ago • 8 comments

This error seems to be due to accelerate , curious if you have any solution?

Traceback (most recent call last):
  File "/content/alpaca-lora/generate.py", line 36, in <module>
    model = PeftModel.from_pretrained(
  File "/usr/local/lib/python3.9/dist-packages/peft/peft_model.py", line 177, in from_pretrained
    model = dispatch_model(model, device_map=device_map)
  File "/usr/local/lib/python3.9/dist-packages/accelerate/big_modeling.py", line 342, in dispatch_model
    raise ValueError(
ValueError: We need an `offload_dir` to dispatch this model according to this `device_map`, the following submodules need to be offloaded: base_model.model.model.layers.27, base_model.model.model.layers.28, base_model.model.model.layers.29, base_model.model.model.layers.30, base_model.model.model.layers.31, base_model.model.model.norm, base_model.model.lm_head.

amrrs avatar Mar 23 '23 13:03 amrrs

Increasing the memory works for me.

llcing avatar Mar 24 '23 14:03 llcing

Did you try this on Google Colab?

amrrs avatar Mar 24 '23 14:03 amrrs

Did you try this on Google Colab?

no, I tried on my own gpu server.

llcing avatar Mar 24 '23 14:03 llcing

Strangely this error seems to occur on Colab, not sure if it's because it's a 16 gig RAM @tloen Any thoughts?

amrrs avatar Mar 24 '23 19:03 amrrs

I also face the same error, using Colab !

abdul-thoughtworks avatar Mar 24 '23 20:03 abdul-thoughtworks

I also face the same error, using Colab !

Managed to address it by using a custom vm (using GCP) :)

abdul-thoughtworks avatar Mar 24 '23 21:03 abdul-thoughtworks

ror seems to occur on Colab, not sure if it's because it's a 16 gig

Yes it is the memory I believe, Once I plugged in a custom vm with 30gigs it worked fine.

abdul-thoughtworks avatar Mar 24 '23 21:03 abdul-thoughtworks

i only can run correctly on my without Gpu server

zhangbo2008 avatar Mar 31 '23 15:03 zhangbo2008