arnavgrg commited on
Commit
6991149
1 Parent(s): 10aec68

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -2
README.md CHANGED
@@ -44,8 +44,11 @@ To use these weights:
44
  from peft import PeftModel, PeftConfig
45
  from transformers import AutoModelForCausalLM
46
 
47
- config = PeftConfig.from_pretrained("arnavgrg/codealpaca-qlora", load_in_4bit=True)
48
- model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-hf")
 
 
 
49
  model = PeftModel.from_pretrained(model, "arnavgrg/codealpaca-qlora")
50
  ```
51
 
 
44
  from peft import PeftModel, PeftConfig
45
  from transformers import AutoModelForCausalLM
46
 
47
+ # Load base model in 4 bit
48
+ model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-hf", load_in_4bit=True)
49
+
50
+ # Wrap model with pretrained model weights
51
+ config = PeftConfig.from_pretrained("arnavgrg/codealpaca-qlora")
52
  model = PeftModel.from_pretrained(model, "arnavgrg/codealpaca-qlora")
53
  ```
54