microsoft / torchscale

Foundation Architecture for (M)LLMs
https://aka.ms/GeneralAI
MIT License
2.98k stars 201 forks source link

There're a confusion in torchscale #65

Closed lovekang3344 closed 9 months ago

lovekang3344 commented 10 months ago

When using from torchscale.architecture.config import RetNetConfig , I got a error.

      from torchscale.architecture.config import RetNetConfig
ImportError: cannot import name 'RetNetConfig' from 'torchscale.architecture.config'

But I can import Decoder and EncoderDecoder. help!

lovekang3344 commented 10 months ago

I got it. When I use pip install torchscale,I realized that there isn't a class here called RetNetConfig in config.py. When I pulled the code directly from GitHub and replaced the original one with the torchscale folder in it, it solved the issue.

donglixp commented 10 months ago

Thanks for reporting the issue. We will fix it.

shumingma commented 9 months ago

The latest release (https://pypi.org/project/torchscale/) should fix this problem. Please try upgrading torchscale. Any problem feel free to reopen the issue. Thanks!