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

[Llama Model] Run LLaMa with LoRA Error #637

Closed
wlsghks4043 opened this issue Dec 12, 2023 · 3 comments
Closed

[Llama Model] Run LLaMa with LoRA Error #637

wlsghks4043 opened this issue Dec 12, 2023 · 3 comments
Assignees
Labels
bug Something isn't working triaged Issue has been triaged by maintainers

Comments

@wlsghks4043
Copy link

Hi,

During the process of building a lora model without a modules_to_save value, the error below occurs.

Isn't the lora model based on the llama model without a modules_to_save value supported yet?

[error log]
Traceback (most recent call last): File "/code/tensorrt_llm/examples/llama/build.py", line 828, in <module> args = parse_arguments() File "/code/tensorrt_llm/examples/llama/build.py", line 499, in parse_arguments lora_config = LoraConfig.from_hf(args.hf_lora_dir, File "/usr/local/lib/python3.10/dist-packages/tensorrt_llm/runtime/lora_manager.py", line 60, in from_hf if "lm_head" in adapter_config["modules_to_save"]: TypeError: argument of type 'NoneType' is not iterable

[adapter_config.json]
{ "alpha_pattern": {}, "auto_mapping": null, "base_model_name_or_path": "/home/model/Llama2-7b-hf", "bias": "none", "fan_in_fan_out": false, "inference_mode": true, "init_lora_weights": true, "layers_pattern": null, "layers_to_transform": null, "lora_alpha": 32, "lora_dropout": 0.1, "modules_to_save": null, "peft_type": "LORA", "r": 8, "rank_pattern": {}, "revision": null, "target_modules": [ "v_proj", "q_proj", "down_proj", "k_proj", "up_proj" ], "task_type": "CAUSAL_LM" }

@byshiue
Copy link
Collaborator

byshiue commented Dec 12, 2023

We don't have checkpoint to verify, but I think you could just remove the related codes about modules_to_save if it is nullptr in your case.

We will also consider a more stabler way to support that.

@byshiue byshiue self-assigned this Dec 12, 2023
@byshiue byshiue added triaged Issue has been triaged by maintainers bug Something isn't working labels Dec 12, 2023
@byshiue
Copy link
Collaborator

byshiue commented Dec 15, 2023

The issue should be fixed in latest main branch, please take a try.

@kaiyux
Copy link
Member

kaiyux commented Dec 26, 2023

Closing since no reply for 2 weeks. Please feel free to comment if you are still seeing the issue, thanks.

@kaiyux kaiyux closed this as completed Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants