Open George3d6 opened 1 year ago
The same error occurs if I install galai
and try to run it like that:
NameError Traceback (most recent call last)
[<ipython-input-45-baaf28fb626d>](https://localhost:8080/#) in <module>
1 import galai as gal
----> 2 model = gal.load_model("standard")
3 model.generate("Scaled dot product attention:\n\n\\[")
2 frames
[/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
2358 model = load_flax_checkpoint_in_pytorch_model(model, resolved_archive_file)
-> 2359 except ImportError:
2360 logger.error(
2361 "Loading a Flax model in PyTorch, requires both PyTorch and Flax to be installed. Please see"
NameError: name 'init_empty_weights' is not defined
Further things I tried were:
accelerate<=0.15.0
since I assume the latest release might be causing issuesnum_gpus=0
since I assumed the colab env not having GPUs might also be the issueNevermind, there was a caching issue, accelerate<=0.15.0
installed before transformers
(not 100% sure this is needed but the other way around didn't seem to work) fixed this for me. Will make a PR just in case, feel free to drop it if you don't think it's appropriate. I have my hack and I can move froward with it.
I've installed the latest version of
accelerate
andtransformers
, no other libraries