Update README.md
Browse files
README.md
CHANGED
@@ -44,8 +44,11 @@ To use these weights:
|
|
44 |
from peft import PeftModel, PeftConfig
|
45 |
from transformers import AutoModelForCausalLM
|
46 |
|
47 |
-
|
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 |
|