Skip to content
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

[Question]: tarsclassifier prediction is very slow for more then 100 classes #3479

Open
sainiudit opened this issue Jun 30, 2024 · 1 comment
Labels
question Further information is requested

Comments

@sainiudit
Copy link

sainiudit commented Jun 30, 2024

Question

I am using tarsclassifier and fine tuned it for 100+ classes, prediction is taking forever to run any work around for this

@sainiudit sainiudit added the question Further information is requested label Jun 30, 2024
@alanakbik
Copy link
Collaborator

Hello @sainiudit, unfortunately TARS is slow in scenarios with many classes. The reason is that TARS makes an independent forward pass through the model for each class. So if you have 100 classes, each sentence requires 100 forward passes through the model in order to predict.

We worked together with a team at Bayer to scale TARS up to 80,000 classes. This is not integrated into Flair, but there is code and a paper available:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants