Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecovlee committed Jan 5, 2024
1 parent def320e commit 6998658
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mlora.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,8 @@ def init_adapter_config(config: Dict[str, any],
llm_model: mlora.LLMModel,
) -> List[Union[mlora.GenerateConfig, mlora.TrainConfig]]:
if args.disable_adapter and args.inference:
config_class = mlora.LoraConfig(
adapter_name_="m-LoRA", device_=args.device)
config_class = mlora.GenerateConfig().init(
config_class)
mlora.LoraConfig(adapter_name_="m-LoRA", device_=args.device))
if args.prompt_template:
config_class.prompt_template_ = "template/template_demo.json"
return {"m-LoRA": config_class}
Expand Down

0 comments on commit 6998658

Please sign in to comment.