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

[rust] Avoid panic in error case #3133

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Conversation

frankfliu
Copy link
Contributor

Description

Brief description of what this PR is about

  • If this change is a backward incompatible change, why must this change be made?
  • Interesting edge cases to note here

@frankfliu frankfliu requested review from zachgk and a team as code owners April 26, 2024 16:39
if (!Files.isRegularFile(config)) {
throw new FileNotFoundException("config.json file not found");
}
Path file = modelDir.resolve("model.safetensors");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to handle sharded checkpoints here?

Copy link
Contributor Author

@frankfliu frankfliu Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only support safetensors, we don't support for LLM for now.

Copy link
Contributor

@siddvenk siddvenk Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it always the case for text-embedding models that they are provided in a single checkpoint? It seems from huggingface models that is overwhelmingly true, but there are some big text-embedding models in the single of billions parameter range (5b-7b) that are typically sharded but can still fit on single gpu. Example https://huggingface.co/Alibaba-NLP/gte-Qwen1.5-7B-instruct, https://huggingface.co/intfloat/e5-mistral-7b-instruct

It's not super important for now, but at some point we'll probably need to handle sharded checkpoints even for embedding models since the user is free to specify how many shards/max file size of checkpoints

@frankfliu frankfliu merged commit ec89a66 into deepjavalibrary:master Apr 26, 2024
5 checks passed
@frankfliu frankfliu deleted the rust branch April 26, 2024 18:45
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

Successfully merging this pull request may close these issues.

3 participants