ai-forever / ru-gpts

Russian GPT3 models.
Apache License 2.0
2.08k stars 444 forks source link

A strange error when running the example #36

Closed asimaranov closed 3 years ago

asimaranov commented 3 years ago

Python 3.6


> initializing model parallel cuda seeds on global rank 0, model parallel rank 0, and data parallel rank 0 with model parallel seed: 3952 and data parallel seed: 1234Downloading: 100%|████████████████████████████| 1.57M/1.57M [00:00<00:00, 1.85MB/s]Downloading: 100%|████████████████████████████| 1.23M/1.23M [00:00<00:00, 1.41MB/s]Downloading: 100%|████████████████████████████| 2.63G/2.63G [03:49<00:00, 11.5MB/s]Downloading: 100%|█████████████████████████████████| 653/653 [00:00<00:00, 329kB/s]Traceback (most recent call last):
  File "gpt_bot.py", line 8, in <module>
    gpt = RuGPT3XL.from_pretrained("sberbank-ai/rugpt3xl", seq_len=512)
  File "gw/generation_wrapper.py", line 179, in from_pretrained
    model = setup_model(weights_path, deepspeed_config_path)
  File "gw/generation_wrapper.py", line 82, in setup_model
    model = get_model(deepspeed_config_path)
  File "gw/generation_wrapper.py", line 71, in get_model
    sparse_mode=sparse_mode)
TypeError: __init__() got an unexpected keyword argument 'deepspeed_sparsity_config'```
king-menin commented 3 years ago

May be you run your script from root of our repo and model was loaded from model/ dir, not gw/model/. If you want test RuGPT3XL model, pls do not run script from root of repo and just add to your code:

import sys
sys.path.append("/path/to/repo/gw/")