tatsu-lab / stanford_alpaca

Code and documentation to train Stanford's Alpaca models, and generate the data.
https://crfm.stanford.edu/2023/03/13/alpaca.html
Apache License 2.0
29.39k stars 4.03k forks source link

TypeError: 'type' object is not subscriptable #287

Open WYXG233 opened 1 year ago

WYXG233 commented 1 year ago

I'm trying to train the alpaca model using python 3.10. But when I try to train, there is always a bug here:

  File "./stanford_alpaca/weight_diff.py", line 21, in <module>
    from train import smart_tokenizer_and_embedding_resize
  File "./stanford_alpaca/train.py", line 22, in <module>
    import utils
  File "./stanford_alpaca/utils.py", line 40, in <module>
    prompts: Union[str, Sequence[str], Sequence[dict[str, str]], dict[str, str]],
TypeError: 'type' object is not subscriptable
dongguanting commented 1 year ago

same problem

zhangyx0417 commented 1 year ago

171