File size: 1,179 Bytes
72da594
 
8fb7d3a
 
 
 
 
 
 
2f9558a
8fb7d3a
 
72da594
 
8f6392e
72da594
a3b7fef
72da594
 
 
 
 
 
8303257
 
72da594
 
 
 
 
 
 
 
 
a3b7fef
 
72da594
 
 
a3b7fef
72da594
 
 
a3b7fef
 
72da594
 
 
 
 
 
be104b5
26c778a
be104b5
26c778a
be104b5
 
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
---
license: apache-2.0
tags:
- LucaOne
- Biological Foundation Model
- Unified Nucleic Acid and Protein Language Model
- Biology
- AI4Science
- AI4Biology
- Bio
language:
- en
---

# LucaOne/LucaGPLM(old checkpoint: 5.6M)

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

## Installation

You can install the package from source using pip:

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

## Usage

```python
from lucagplm import LucaGPLMModel, LucaGPLMTokenizer

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

# 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