monsoon-nlp
commited on
Commit
•
825838f
1
Parent(s):
18a58be
Update README.md
Browse files
README.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1 |
---
|
2 |
license: mit
|
|
|
|
|
3 |
---
|
4 |
|
5 |
-
Adapter model / weights only for https://huggingface.co/monsoon-nlp/nyc-savvy-llama2-7b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
datasets:
|
4 |
+
- monsoon-nlp/greenbeing-proteins
|
5 |
---
|
6 |
|
7 |
+
Adapter model / weights only for https://huggingface.co/monsoon-nlp/nyc-savvy-llama2-7b
|
8 |
+
|
9 |
+
## Usage
|
10 |
+
|
11 |
+
```
|
12 |
+
from peft import AutoPeftModelForCausalLM
|
13 |
+
from transformers import AutoTokenizer
|
14 |
+
|
15 |
+
# this model
|
16 |
+
model = AutoPeftModelForCausalLM.from_pretrained("monsoon-nlp/tinyllama-mixpretrain-uniprottune").to("cuda")
|
17 |
+
# base model for the tokenizer
|
18 |
+
tokenizer = AutoTokenizer.from_pretrained("monsoon-nlp/tinyllama-mixpretrain-quinoa-sciphi")
|
19 |
+
|
20 |
+
inputs = tokenizer("<sequence> Subcellular locations:", return_tensors="pt")
|
21 |
+
outputs = model.generate(input_ids=inputs["input_ids"].to("cuda"), max_new_tokens=50)
|
22 |
+
print(tokenizer.batch_decode(outputs, skip_special_tokens=True)[0])
|
23 |
+
```
|
24 |
+
|
25 |
+
Notebook: https://colab.research.google.com/drive/1UTavcVpqWkp4C_GkkS_HxDQ0Orpw43iu?usp=sharing
|