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

Implement GPU/CPU parameter in QAPipeline() #137

Closed
fmikaelian opened this issue May 18, 2019 · 0 comments
Closed

Implement GPU/CPU parameter in QAPipeline() #137

fmikaelian opened this issue May 18, 2019 · 0 comments
Assignees

Comments

@fmikaelian
Copy link
Collaborator

I think I understand. You are saying training the model on GPU and after that send it to CPU to make predictions.

It is already possible to do it (I did it with the CPU version trained on SQUAD), but it is not that transparent. After training the reader on GPU, you only need to run the code:

qa_pipeline.reader.model.to('cpu')

But we can also implement inside a method inside QAPipeline that does that, let's say to_cpu():

def to_cpu():
     self.reader.model.to('cpu')

Originally posted by @andrelmfarias in #133 (comment)

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

No branches or pull requests

2 participants