Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: bsd
|
3 |
+
tags:
|
4 |
+
- chemistry
|
5 |
+
- biology
|
6 |
+
- protein
|
7 |
+
- antibodies
|
8 |
+
- antibody
|
9 |
+
- light chain
|
10 |
+
- AbLang
|
11 |
+
- CDR
|
12 |
+
- OAS
|
13 |
+
---
|
14 |
+
|
15 |
+
# AbLang model for light 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 antibody sequence in PyTorch:
|
29 |
+
|
30 |
+
```python
|
31 |
+
from transformers import AutoModel, AutoTokenizer
|
32 |
+
|
33 |
+
tokenizer = AutoTokenizer.from_pretrained('qilowoq/AbLang_light')
|
34 |
+
model = AutoModel.from_pretrained('qilowoq/AbLang_light', trust_remote_code=True)
|
35 |
+
|
36 |
+
sequence_Example = ' '.join("DIQMTQSPSTLSASIGDTVRISCRASQSITGNWVAWYQQRPGKAPRLLIYRGAALLGGVPSRFSGSAAGTDFTLTIGNLQAEDFGTFYCQQYDTYPGTFGQGTKVEVKRTVAAPSVFIFPPSDEQLKSGTASVVCLLNNFYPREAKVQWKVDNALQSGNSQESVTEQDSKDSTYSLSSTLTLSKADYEKHKVYACEVTHQGLSSPVTKSFNR")
|
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 |
+
```
|
46 |
+
|
47 |
+
### Citation
|
48 |
+
```
|
49 |
+
@article{Olsen2022,
|
50 |
+
title={AbLang: An antibody language model for completing antibody sequences},
|
51 |
+
author={Tobias H. Olsen, Iain H. Moal and Charlotte M. Deane},
|
52 |
+
journal={bioRxiv},
|
53 |
+
doi={https://doi.org/10.1101/2022.01.20.477061},
|
54 |
+
year={2022}
|
55 |
+
}
|
56 |
+
```
|