-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError when predicting with the french models #9
Comments
Did you install the version of transformers from requirements? This kind of error is typical of a mismatch in Bert model class structure. |
That was indeed the issue, and installing the required version of transformers fixed it. Thanks a lot! I may as well add that I did not use requirements.txt because, when running ERROR: Could not find a version that satisfies the requirement torch==1.9.0+cu111 (from versions: 1.11.0, 1.11.0+cpu, 1.11.0+cu102, 1.11.0+cu113, 1.11.0+cu115, 1.11.0+rocm4.3.1, 1.11.0+rocm4.5.2, 1.12.0, 1.12.0+cpu, 1.12.0+cu102, 1.12.0+cu113, 1.12.0+cu116, 1.12.0+rocm5.0, 1.12.0+rocm5.1.1) |
I had the same problem for the French language. I tested several types of configuration files. With the following content as requirements.txt file, the installation is done without problem:
Then, I can install recasepunc with simple The version of each library in my current installation is :
I would add that the pytorch version required in the original requirements.txt file crashes my computers that don't have enough RAM (8GB + 6GB swap). The latest version doesn't seem to exceed the 3GB of Ram used for the installation. With this requirements.txt file the installation works very well (I have only tested the French models and the English model...) ! Maybe it deserves a commit ;) |
I tried to use the french models (both
fr.22000
andfr-txt.large.19000
) on a very simple text:When running
python3 recasepunc.py predict fr.22000 < input.txt > output.txt
(or with the other model), I get the followingRuntimeError
:I tried the same with the english model, and it worked perfectly. Looks like something is broken with the french ones?
The text was updated successfully, but these errors were encountered: