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

Adding LoRA support + changing command format for main.cpp #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

quic-ashwjadh
Copy link

Feature Addition: LoRA Support

  • Added support for LoRA in the ai-engine-direct-helper. This enhancement allows the application of LoRA adapters on the graph.

Command Format Update

  • Updated the command format for the main.cpp function. The new command format is as follows:
    QAIAppSvc.exe --log_level <int:log_level> --QNN_Libraries_Path <str:QNN_Libraries_Path> --model_path <str:model_path> --perf_profile <str:perf_profile> --input_path <str:input_raw_path> --input_count <int:input_count> --memory_size<int:memory_size> --binary_updates<str:graph_name,binary_update_path_1;binary_update_path_2>

Example Command:
QAIAppSvc.exe --log_level 2 --QNN_Libraries_Path C:\\user\\lorav2\\qnn_assets\\2.28.2 --model_path C:\\user\\lorav2\\running_sample_app\\models_and_input\\text_encoder.serialized_qnn_2.28.bin --perf_profile burst --input_path C:\\user\\lorav2\\running_qai_helper\\text_encoder_inputs --input_count 2 --binary_updates text_encoder,C:\\user\\lorav2\\running_sample_app\\models_and_input\\text_encoder_Stickers_qnn_2.28.bin;C:\\user\\lorav2\\running_sample_app\\models_and_input\\text_encoder_TShirtDesignAF.bin --memory_size 102400000

@quic-prudhvi
Copy link
Contributor


QNNContext(const std::string& model_name,
const std::string& model_path, const std::string& backend_lib_path,
const std::string& system_lib_path, const std::vector<LoraAdaptor>& lora_adapters);
Copy link
Contributor

Choose a reason for hiding this comment

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

Stick to one spelling, Adapter or Adaptor throughout the PR. Better to use Adapter as preferred in US region.

@@ -0,0 +1,13 @@
#pragma once
Copy link
Contributor

Choose a reason for hiding this comment

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

Add license header to new files.

//==============================================================================
//
// Copyright (c) 2025, Qualcomm Innovation Center, Inc. All rights reserved.
//
// SPDX-License-Identifier: BSD-3-Clause
//
//==============================================================================

}

bool sample_app::QnnSampleApp::binaryUpdates() {
return m_lora_adapters.size() > 0; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Format the C++ files consistently

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.

2 participants