MRNH commited on
Commit
dd6ac0e
1 Parent(s): 2a8278d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -8
README.md CHANGED
@@ -4,16 +4,16 @@ library_name: peft
4
 
5
  # Load the Lora model
6
 
7
- import torch
8
- from peft import PeftModel, PeftConfig
9
- from transformers import AutoModelForCausalLM, AutoTokenizer
10
 
11
- peft_model_id = "lucas0/empath-llama-7b"
12
- config = PeftConfig.from_pretrained(peft_model_id)
13
- model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, return_dict=True, load_in_8bit=True, device_map='auto')
14
- tokenizer = AutoTokenizer.from_pretrained(cwd+"/tokenizer.model")
15
 
16
- model = PeftModel.from_pretrained(model, peft_model_id)
17
 
18
  ## Training procedure
19
 
 
4
 
5
  # Load the Lora model
6
 
7
+ import torch
8
+ from peft import PeftModel, PeftConfig
9
+ from transformers import AutoModelForCausalLM, AutoTokenizer
10
 
11
+ peft_model_id = "lucas0/empath-llama-7b"
12
+ config = PeftConfig.from_pretrained(peft_model_id)
13
+ model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, return_dict=True, load_in_8bit=True, device_map='auto')
14
+ tokenizer = AutoTokenizer.from_pretrained(cwd+"/tokenizer.model")
15
 
16
+ model = PeftModel.from_pretrained(model, peft_model_id)
17
 
18
  ## Training procedure
19