Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Not compatible with the latest version of transformers? (4.26.1) #192

Open
skiingpacman opened this issue Feb 18, 2023 · 2 comments
Open

Comments

@skiingpacman
Copy link

skiingpacman commented Feb 18, 2023

When using transformers version 4.26.1 this import breaks from transformers.generation_logits_process import TopKLogitsWarper, TopPLogitsWarper, TemperatureLogitsWarper, LogitsProcessorList

I think it needs to be changed to from transformers.generation.logits_process import TopKLogitsWarper, TopPLogitsWarper, TemperatureLogitsWarper, LogitsProcessorList (dot instead of underscore after generation).

Either editing as above, or rolling back to transformers 4.24.0 resolves this import error.

(I have other errors that stop running the OPT inference example but likely unrelated.)

@skiingpacman skiingpacman changed the title Not compatible with the latest version of transformers? Not compatible with the latest version of transformers? (4.26.1) Feb 18, 2023
@Yiran-Zhu
Copy link

It could be a version compatibility issue. The problem was solved when I replaced source file from transformers import TopKLogitsWarper, TopPLogitsWarper, TemperatureLogitsWarper, LogitsProcessorList

@binmakeswell
Copy link
Member

It could be a version compatibility issue. The problem was solved when I replaced source file from transformers import TopKLogitsWarper, TopPLogitsWarper, TemperatureLogitsWarper, LogitsProcessorList
Hi @Yiran-Zhu Thank you very much for your contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants