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

请问为如何两次加载不同的微调后生成的lora权重? #54

Open
jinlong7790 opened this issue Jan 24, 2024 · 1 comment
Open

Comments

@jinlong7790
Copy link

    model = LlamaForCausalLM.from_pretrained(
        base_model,
        load_in_8bit=load_8bit,
        torch_dtype=torch.float16,
        device_map="auto",
        trust_remote_code=True,
    )
    model = PeftModel.from_pretrained(
        model,
        lora_weights,
        torch_dtype=torch.float16,
    )
    model = PeftModel.from_pretrained(model, "/home/zzu_zxw/zjl_data/KnowPAT/save4")
@HZQ950419
Copy link
Collaborator

Hi,
只需要加载一次就可以了,这里的第二次加载的代码是在哪个文件呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants