File size: 1,156 Bytes
7ddf5e8
 
136fc4a
 
 
 
 
 
 
 
 
 
7ddf5e8
 
efde32a
7ddf5e8
efde32a
7ddf5e8
 
 
 
 
 
 
dcb0e36
 
7ddf5e8
 
 
 
 
 
 
 
b980598
 
7ddf5e8
 
 
efde32a
7ddf5e8
 
 
54e84f6
 
7ddf5e8
 
 
 
 
 
5d8561e
 
8ffc4a6
 
 
5d8561e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
license: apache-2.0
tags:
- LucaOne
- Biological Foundation Model
- Unified Nucleic Acid and Protein Language Model
- Biology
- AI4Science
- AI4Biology
- Bio
language:
- en
---

# LucaOne/LucaGPLM

LucaOne/LucaGPLM - The LUCA Gene-Protein language model.

## Installation

You can install the package from source using pip:

```bash
pip install lucagplm
pip install tokenizers==0.19.1
pip install transformers==4.41.2
```

## Usage

```python
from lucagplm import LucaGPLMModel, LucaGPLMTokenizer

# Load model
model = LucaGPLMModel.from_pretrained("LucaGroup/LucaOne-default-step36M")
tokenizer = LucaGPLMTokenizer.from_pretrained("LucaGroup/LucaOne-default-step36M")

# Example usage
seq = "ATCG"
# seq_type="gene", which includes DNA or RNA(Nucleotide Sequences)
inputs = tokenizer(seq, seq_type="gene",return_tensors="pt")
outputs = model(**inputs)

print(outputs.last_hidden_state.shape)

seq = "NSQTA"
inputs = tokenizer(seq, seq_type="prot",return_tensors="pt")
outputs = model(**inputs)

print(outputs.last_hidden_state.shape)
```

## Github
For long sequence embedding, please refer to the git repository:

https://github.com/LucaOne/LucaOne