Efficient Torch Tensor Serialization #15
Replies: 3 comments 5 replies
-
Copying @lionel- I mentioned at the Sprint. Also |
Beta Was this translation helpful? Give feedback.
-
A note to @dfalbel and others - this functionality was merged in ad5af25 and is no longer experimental. The next CRAN release of {nanonext} allows send / recv of reference objects such as Torch tensors across R sessions. In the case of {torch}, this would be as simple as the following one-time call to register the serialization/unserialization functions: nextmode(safetensors::safe_serialize, safetensors::safe_load_file) This capability will make its way into {mirai} in due course. |
Beta Was this translation helpful? Give feedback.
-
Closed with the release of |
Beta Was this translation helpful? Give feedback.
-
Inviting @dfalbel
Continuing our email conversation here so it is easier to keep track.
Current Status Update:
nanonext
0.10.0 (released on CRAN) completes the optimisation work for data serialization in general.New Feature: Allow efficient serialisation / unserialization of Torch Tensors
nanonext
(not dissimilar to how Safetensors work)nanonext
) - meaning it 'just works' inmirai
without requiring any change in that packageInitial testing implementation: https://github.com/shikokuchuo/nanonext/tree/tensor
I've updated the examples here: https://github.com/shikokuchuo/wip/blob/main/tensor.R
To dos:
Next Steps:
To discuss how best to utilise
mirai
in the Torch / mlverse ecosystem.Beta Was this translation helpful? Give feedback.
All reactions