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

safetensor streaming in from_single_file_loading() #10345

Open
AbhinavJangra29 opened this issue Dec 22, 2024 · 0 comments
Open

safetensor streaming in from_single_file_loading() #10345

AbhinavJangra29 opened this issue Dec 22, 2024 · 0 comments

Comments

@AbhinavJangra29
Copy link

can we add support for streaming safetensors while loading using from_single_file.
source:https://github.com/run-ai/runai-model-streamer

example:

from runai_model_streamer import SafetensorsStreamer

file_path = "/path/to/file.safetensors"

with SafetensorsStreamer() as streamer:
    streamer.stream_file(file_path)
    for name, tensor in streamer.get_tensors():
        tensor.to('CUDA:0')
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

1 participant