Skip to content

Commit

Permalink
update code for case of no lora adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-knoblauch committed Oct 9, 2024
1 parent 5cd12ba commit 677a01e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,26 +134,27 @@ async def _initialize_engines(self):
if lora_modules is not None:
try:
lora_modules = json.loads(lora_modules)
lora_modules = LoRAModulePath(**lora_modules)
lora_modules = [LoRAModulePath(**lora_modules)]
except:
lora_modules = None



self.chat_engine = OpenAIServingChat(
engine_client=self.llm,
model_config=self.model_config,
base_model_paths=self.base_model_paths,
response_role=self.response_role,
chat_template=self.tokenizer.tokenizer.chat_template,
lora_modules=[lora_modules],
lora_modules=lora_modules,
prompt_adapters=None,
request_logger=None
)
self.completion_engine = OpenAIServingCompletion(
engine_client=self.llm,
model_config=self.model_config,
base_model_paths=self.base_model_paths,
lora_modules=[lora_modules],
lora_modules=lora_modules,
prompt_adapters=None,
request_logger=None
)
Expand Down

0 comments on commit 677a01e

Please sign in to comment.