You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we can only get shape and dtype for all tensors via Python bindings. Could we also expose a global data offset as well as start/end offsets of specific tensors?
In particular, I'm interested in getting (start, end) offsets in the file for a specific tensor, so probably the global offset is not even needed, we can do addition on the Rust side.
Motivation
I want to experiment with reading the actual data using our custom interface that can stream data directly to GPU. So my plan is to read safetensors metadata using normal POSIX reads and then use custom API to stream the data. Custom API is in C but there are working Python bindings, so at this stage I'd prefer to keep the wiring in Python instead of trying to call into C from Rust. But for that I need to expose the offsets to Python.
Your contribution
Yes, I can submit a PR. It seems like a trivial change.
The text was updated successfully, but these errors were encountered:
Feature request
Currently we can only get shape and dtype for all tensors via Python bindings. Could we also expose a global data offset as well as start/end offsets of specific tensors?
In particular, I'm interested in getting (start, end) offsets in the file for a specific tensor, so probably the global offset is not even needed, we can do addition on the Rust side.
Motivation
I want to experiment with reading the actual data using our custom interface that can stream data directly to GPU. So my plan is to read safetensors metadata using normal POSIX reads and then use custom API to stream the data. Custom API is in C but there are working Python bindings, so at this stage I'd prefer to keep the wiring in Python instead of trying to call into C from Rust. But for that I need to expose the offsets to Python.
Your contribution
Yes, I can submit a PR. It seems like a trivial change.
The text was updated successfully, but these errors were encountered: