Update README.md
Browse files
README.md
CHANGED
@@ -8,3 +8,15 @@ language:
|
|
8 |
## Usage
|
9 |
|
10 |
Check the Github repo with code: https://github.com/Aciid/jalopeura
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
## Usage
|
9 |
|
10 |
Check the Github repo with code: https://github.com/Aciid/jalopeura
|
11 |
+
|
12 |
+
```python
|
13 |
+
from peft import PeftModel
|
14 |
+
from transformers import LLaMATokenizer, LLaMAForCausalLM, GenerationConfig
|
15 |
+
tokenizer = LLaMATokenizer.from_pretrained("decapoda-research/llama-7b-hf")
|
16 |
+
model = LLaMAForCausalLM.from_pretrained(
|
17 |
+
"decapoda-research/llama-7b-hf",
|
18 |
+
load_in_8bit=True,
|
19 |
+
device_map="auto",
|
20 |
+
)
|
21 |
+
model = PeftModel.from_pretrained(model, "aciidix/jalopeura-lora-7b")
|
22 |
+
```
|