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

how to infer with finetuned model? #117

Open
balaji-skoruz opened this issue Jun 2, 2023 · 4 comments
Open

how to infer with finetuned model? #117

balaji-skoruz opened this issue Jun 2, 2023 · 4 comments

Comments

@balaji-skoruz
Copy link

Got adapter_mode.bin,adapter_config.json after finetuning the vicuna 4bit 128g model ,
and checkpoints folders.
Screenshot 2023-06-02 172023

how to use this folders or files to infer the model?

@afnanhabib787
Copy link

following

@johnsmith0031
Copy link
Owner

Use this

from monkeypatch.peft_tuners_lora_monkey_patch import replace_peft_model_with_gptq_lora_model
replace_peft_model_with_gptq_lora_model()
from peft import PeftModel
from monkeypatch.peft_tuners_lora_monkey_patch import Linear4bitLt
model = PeftModel.from_pretrained(model, lora_path, device_map={'': 'cpu'}, torch_dtype=torch.float32, is_trainable=True)

It's inside load_llama_model_4bit_low_ram_and_offload function

@ra-MANUJ-an
Copy link

@johnsmith0031 what should be at the place of model, lora_path?

@johnsmith0031
Copy link
Owner

Yes, lora_path should be point to the path of finetuned lora model.

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

4 participants