Update README.md
Browse files
README.md
CHANGED
@@ -9,10 +9,37 @@ tags:
|
|
9 |
- heavy chain
|
10 |
- AbLang
|
11 |
- CDR
|
|
|
12 |
---
|
13 |
|
14 |
-
|
15 |
|
16 |
This is a huggingface version of AbLang: A language model for antibodies. It was introduced in
|
17 |
[this paper](https://doi.org/10.1101/2022.01.20.477061) and first released in
|
18 |
-
[this repository](https://github.com/oxpig/AbLang). This model is trained on uppercase amino acids: it only works with capital letter amino acids.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
- heavy chain
|
10 |
- AbLang
|
11 |
- CDR
|
12 |
+
- OAS
|
13 |
---
|
14 |
|
15 |
+
# AbLang model for heavy chains
|
16 |
|
17 |
This is a huggingface version of AbLang: A language model for antibodies. It was introduced in
|
18 |
[this paper](https://doi.org/10.1101/2022.01.20.477061) and first released in
|
19 |
+
[this repository](https://github.com/oxpig/AbLang). This model is trained on uppercase amino acids: it only works with capital letter amino acids.
|
20 |
+
|
21 |
+
|
22 |
+
# Intended uses & limitations
|
23 |
+
|
24 |
+
The model could be used for protein feature extraction or to be fine-tuned on downstream tasks (TBA).
|
25 |
+
|
26 |
+
### How to use
|
27 |
+
|
28 |
+
Here is how to use this model to get the features of a given protein sequence in PyTorch:
|
29 |
+
|
30 |
+
```python
|
31 |
+
from transformers import BertModel, BertTokenizer
|
32 |
+
|
33 |
+
tokenizer = AutoTokenizer.from_pretrained('qilowoq/AbLang_heavy')
|
34 |
+
model = AutoModel.from_pretrained('qilowoq/AbLang_heavy', trust_remote_code=True)
|
35 |
+
|
36 |
+
sequence_Example = ' '.join("QIHLVQSGTEVKKPGSSVTVSCKAYGVNTFGLYAVNWVRQAPGQSLEYIGQIWRWKSSASHHFRGRVLISAVDLTGSSPPISSLEIKNLTSDDTAVYFCTTTSTYDKWSGLHHDGVMAFSSWGQGTLISVSAASTKGPSVFPLAPSSGTAALGCLVKDYFPEPVTVSWNSGALTSGVHTFPAVLQSSGLYSLSSVVTVPSTQTYICNVNHKPSNTKVDKKVEPK")
|
37 |
+
encoded_input = tokenizer(sequence_Example, return_tensors='pt')
|
38 |
+
model_output = model(encoded_input)
|
39 |
+
```
|
40 |
+
|
41 |
+
Sentence embeddings can be produced as follows:
|
42 |
+
|
43 |
+
```python
|
44 |
+
seq_embs = model_output.last_hidden_state[:, 0, :]
|
45 |
+
```
|