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

[LLM] [NPU] StaticLLMPipeline: Import model if blob file is present in Stateful pipeline #1494

Merged
merged 9 commits into from
Jan 14, 2025

Conversation

smirnov-alexey
Copy link
Contributor

@smirnov-alexey smirnov-alexey commented Jan 7, 2025

@smirnov-alexey smirnov-alexey added this to the 2025.0 milestone Jan 7, 2025
@github-actions github-actions bot added the category: LLM LLM pipeline (stateful, static) label Jan 7, 2025
@smirnov-alexey smirnov-alexey changed the title [DO NOT MERGE] StaticLLMPipeline: Import model if blob file is present in Stateful pipeline StaticLLMPipeline: Import model if blob file is present in Stateful pipeline Jan 8, 2025
@ilya-lavrenov ilya-lavrenov changed the title StaticLLMPipeline: Import model if blob file is present in Stateful pipeline [LLM] [NPU] StaticLLMPipeline: Import model if blob file is present in Stateful pipeline Jan 9, 2025
@dmatveev dmatveev assigned TolyaTalamanov and unassigned dmatveev Jan 13, 2025
@dmatveev
Copy link
Contributor

@TolyaTalamanov @AsyaPronina please review

Copy link
Collaborator

@TolyaTalamanov TolyaTalamanov left a comment

Choose a reason for hiding this comment

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

Here is how blob logic is done for StatelessLLMPipeline:

  1. User provides USE_BLOB option to specify its intention to use precompiled blob:
    const auto use_blobs = pop_or_default(properties, "USE_BLOBS", false);
  2. Along with this, user may also provide BLOB_PATH option that points to the folder where blobs are located
  3. Depends on the model type (prefill, generation). Pipeline searches for opevino_prefill.blob and openvino_generate.blob.

Here is the proposal how it can be done for your case:

  • Keep (1) and (2) the same way as in StatelessLLMPipeline.
  • For (3) blob name can be just openvino_model.blob

This will allow user to:

  • Specify exact blob location if it's different from folder provided
  • Switch between blob and model cases

auto compiled = setupAndCompileModel(model, model_desc, properties);
m_request = compiled->create_infer_request();
m_sampler.set_seed(m_generation_config.rng_seed);
const auto use_blobs = pop_or_default(properties, "USE_BLOBS", false);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We only have 1 blob, so it must be USE_BLOB???

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fixed

@TolyaTalamanov TolyaTalamanov self-requested a review January 14, 2025 10:02
@smirnov-alexey smirnov-alexey added this pull request to the merge queue Jan 14, 2025
Merged via the queue into openvinotoolkit:master with commit 2e5c2a1 Jan 14, 2025
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: LLM LLM pipeline (stateful, static) category: NPU Code Freeze
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants