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

[FEATURE]: Reduce Ray job cold-start time #694

Open
1 task done
veekaybee opened this issue Jan 20, 2025 · 0 comments
Open
1 task done

[FEATURE]: Reduce Ray job cold-start time #694

veekaybee opened this issue Jan 20, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@veekaybee
Copy link
Member

Motivation

Image

The first time we spin up a new inference job on the cluster, it takes over a minute because Ray has to hit HuggingFace, load the model into cache, instantiate the artifact, and then start inference. Model instantiation happens here:

model_client = HuggingFaceModelClient(config)
and more specifically the model is loaded here:
self._model = hf_model_loader.load_pretrained_model(config.model).to(self._device)

At the cluster level, we can mitigate this by pre-populating the model cache:

https://huggingface.co/docs/datasets/en/cache

Given that we don't know which model the user will select or their machine specs, we can try a couple strategies here depending on our product outcomes:

  1. Pre-populate a small model and point the user to try out that model locally, cache that model
  2. Load a small model as soon as the user instantiates and loads the UI and give an error message

Alternatives

No response

Contribution

Happy to work on this

Have you searched for similar issues before submitting this one?

  • Yes, I have searched for similar issues
@veekaybee veekaybee added the enhancement New feature or request label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant