Skip to content

Alpha scaling incorrect when using rslora #1668

Closed

Description

@TheCodeWrangler

System Info

Any

Who can help?

@kaiyux

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

If a model with LoRA weights is trained using rslora tensorRT-LLM will incorrectly calculate the scaling for the LoRA weights

https://github.com/NVIDIA/TensorRT-LLM/blob/main/tensorrt_llm/lora_manager.py#L632

This line should be updated based on the adapter_config.json --> rslora value to normalize by the square root of rank

Expected behavior

LoRa adapters give expected performance even when trained using rslora

actual behavior

LoRa adapters trained using rslora give very bad generations (due to incorrect adapter weights being applied)

additional notes

I would also like to have the lora scaling information used within the examples/hf_lora_convert.py script (which presently reads in the adapter_config.json file but does not consider alpha scaling)

Activity

  1. added
    bug
    on May 24, 2024
  2. self-assigned this
    on May 28, 2024
  3. added
    triaged
    on May 28, 2024
  4. github-actions commented on Jun 27, 2024

    @github-actions

    This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 15 days."

  5. byshiue commented on Jul 17, 2024

    @byshiue
    Collaborator

    The fix is merged and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugstaletriaged

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions