Parallelisation for speedier CPU inference? #12
Replies: 3 comments 2 replies
-
|
I would love to figure out paralleliz(s)ation. We could have a use_parallel parameter, and if it's true, check that furrr or future is installed. We wouldn't need a dependency that way. I really like the furrr package; it's super simple to use. |
Beta Was this translation helpful? Give feedback.
-
|
Actually R parallelism doesn't work with Reticulate objects so it's not a slick as it usually is in R. I've tried this for speed ups and you have to load the model in each process. https://cran.r-project.org/web/packages/future/vignettes/future-4-non-exportable-objects.html |
Beta Was this translation helpful? Give feedback.
-
|
Latest update on this is that we’re using torch to send models and pipelines to the GPU. Currently testing/benchmarking this to get a better gauge of speed up. Currently not quite as fast as expected - but thinking that when it comes to training (future versions of this package will look to utilise the trainer API and the datasets library) the speed up would be higher - calculating gradients etc. Do also need to test with different batch sizes, pushing the GPU to its limit etc. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Should we add a dependency to furrr/future and provide functions for cutting datasets + processing in parallel, or should this be left to the user?
Beta Was this translation helpful? Give feedback.
All reactions