LucaVirus
Collection
Unified Genome-Protein Language Model for Virus. https://github.com/LucaOne/LucaVirus
•
4 items
•
Updated
LucaVirus-prot - The LUCA protein language model for Virus.
You can install the package from source using pip:
pip install tokenizers==0.19.1
pip install transformers==4.41.2
pip install lucagplm
from lucagplm import LucaGPLMModel, LucaGPLMTokenizer
# Load model
model = LucaGPLMModel.from_pretrained("LucaGroup/LucaVirus-default-step3.8M")
tokenizer = LucaGPLMTokenizer.from_pretrained("LucaGroup/LucaVirus-default-step3.8M")
seq = "NSQTA"(only for protein, bath seq_type="prot")
inputs = tokenizer(seq, seq_type="prot",return_tensors="pt")
outputs = model(**inputs)
print(outputs.last_hidden_state.shape)
For long sequence embedding, please refer to the git repository:
https://github.com/LucaOne/LucaVirus