Skip to content

Guide on training that requires both LoRA and base model forward calls ? #2802

@thangld201

Description

@thangld201

Hi, I'm working on some training variants that require hidden states from the base model and the hidden states produced with LoRA. I'm currently initializing two separate model objects:

        from peft import get_peft_model
        m1=AutoModelForCausalLM.from_pretrained(model_path)
        m2=AutoModelForCausalLM.from_pretrained(model_path)
        lora_config = LoraConfig(....)
        m2 = get_peft_model(m2, lora_config)

Is there already an api to call non-lora forward with m2 object ? I believe it'll be more memory efficient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions