Update README.md
Browse files
README.md
CHANGED
@@ -62,6 +62,20 @@ tokenizer = get_chat_template(
|
|
62 |
)
|
63 |
```
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
To perform inference on a document, you can use the following prompt:
|
66 |
|
67 |
|
|
|
62 |
)
|
63 |
```
|
64 |
|
65 |
+
Or if you don't want to use unsloth, it is also possible to use Huggingface PEFT and Transformers libraries:
|
66 |
+
|
67 |
+
```python
|
68 |
+
from peft import AutoPeftModelForCausalLM
|
69 |
+
from transformers import AutoTokenizer
|
70 |
+
model = AutoPeftModelForCausalLM.from_pretrained(
|
71 |
+
"zmilczarek/llama3_8b-finetuned-nlp_industry-adapters",
|
72 |
+
load_in_4bit = True,
|
73 |
+
)
|
74 |
+
tokenizer = AutoTokenizer.from_pretrained("zmilczarek/llama3_8b-finetuned-nlp_industry-adapters")
|
75 |
+
```
|
76 |
+
|
77 |
+
|
78 |
+
|
79 |
To perform inference on a document, you can use the following prompt:
|
80 |
|
81 |
|