tmberooney
commited on
Commit
•
a7859a2
1
Parent(s):
cb605f6
Update README.md
Browse files
README.md
CHANGED
@@ -20,6 +20,17 @@ tags:
|
|
20 |
|
21 |
**License:** Apache-2.0 License
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
### Intended Use
|
24 |
---------------
|
25 |
|
|
|
20 |
|
21 |
**License:** Apache-2.0 License
|
22 |
|
23 |
+
### Usage
|
24 |
+
For usage, use this code block, with GPU recommended
|
25 |
+
```
|
26 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
27 |
+
|
28 |
+
config = PeftConfig.from_pretrained("tmberooney/medllama")
|
29 |
+
model = AutoModelForCausalLM.from_pretrained("daryl149/llama-2-7b-chat-hf", device_map="auto")
|
30 |
+
model = PeftModel.from_pretrained(model, "tmberooney/medllama")
|
31 |
+
tokenizer=AutoTokenizer.from_pretrained(config.base_model_name_or_path)
|
32 |
+
```
|
33 |
+
|
34 |
### Intended Use
|
35 |
---------------
|
36 |
|