File size: 1,064 Bytes
dd3d7bf
 
618fa27
 
 
 
 
 
 
 
 
 
dd3d7bf
 
203bc02
dd3d7bf
 
 
 
 
 
 
 
3540c1c
 
dd3d7bf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bcb1745
 
 
 
 
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
---
license: apache-2.0
tags:
- LucaOne
- Biological Foundation Model
- Unified Nucleic Acid and Protein Language Model
- Biology
- AI4Science
- AI4Biology
- Bio
language:
- en
---

# LucaOne-Gene(only for nucleinic acid)

LucaOne-Gene - The LUCA Gene 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-step36M")
tokenizer = LucaGPLMTokenizer.from_pretrained("LucaGroup/LucaOne-default-step36M")

# Example usage(Only for DNA or RNA, both seq_type="gene")
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)
```

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

https://github.com/LucaOne/LucaOne