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

推理减速问题 #72

Open
susimonxu opened this issue Aug 2, 2023 · 0 comments
Open

推理减速问题 #72

susimonxu opened this issue Aug 2, 2023 · 0 comments

Comments

@susimonxu
Copy link

susimonxu commented Aug 2, 2023

使用opendelta来微调cpmbee的10b后,使用加载lora的方式进行推理(如下所示)和原本进行推理速度相比会变慢(减慢50%),请问如何解决。
是否可以将lora与原权重进行合并。

    tokenizer = CPMBeeTokenizer()
    model = CPMBeeTorch(config=config)
    delta_model = LoraModel(backbone_model=model, modified_modules=["project_q", "project_v"], backend="hf")
    model.load_state_dict(torch.load(args.delta), strict=False)
    model.load_state_dict(torch.load(ckpt_path), strict=False)
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

1 participant