* Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
* MindIE is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
#ifndef ILORA_MANAGER_H
#define ILORA_MANAGER_H
#include <memory>
#include "basic_types.h"
#include "concurrent_map.h"
#include "config/config_info.h"
#include "llm_manager_v2/llm_manager_v2.h"
namespace mindie_llm {
class ILoraManager {
public:
virtual ~ILoraManager() = default;
virtual Status Load(const LoraParamSPtr loraInfo) = 0;
virtual Status StartToUnload(const std::string &loraName) = 0;
virtual Status GetLoadedLoras(std::vector<LoraParamSPtr> &loraInfo) = 0;
virtual void TryUnLoadWaiting() = 0;
virtual bool ValidateLoraId(const std::optional<std::string> &loraId) = 0;
virtual void InitLoadedLoras(const std::vector<ModelParam> &modelParamVec) = 0;
virtual void IncLoraRef(const std::optional<std::string> &loraId) = 0;
virtual void DecLoraRef(const std::optional<std::string> &loraId) = 0;
};
}
#endif