Edit model card

This model has been pushed to the Hub using the PytorchModelHubMixin integration:

  • Library: [More Information Needed]
  • Docs: [More Information Needed]

Steps to run model

from transforna import GeneEmbeddModel,RnaTokenizer
import torch
model_name = 'Seq-Struct'
model_path = f"HBDX/{model_name}-TransfoRNA"

#load model and tokenizer
model = GeneEmbeddModel.from_pretrained(model_path)
model.eval()

#init tokenizer. 
tokenizer = RnaTokenizer.from_pretrained(model_path,model_name=model_name)
output = tokenizer(['AAAGTCGGAGGTTCGAAGACGATCAGATAC','TTTTCGGAACTGAGGCCATGATTAAGAGGG'])

#inference
#gene_embedds and second input embedds are the latent space representation of the input sequence's odd tokens and even tokens respectively.
#In this case, the second input would be the secondary structure of the sequence
gene_embedd, second_input_embedd, activations,attn_scores_first,attn_scores_second = \
                                model(output['input_ids'])


#get sub class labels
sub_class_labels = model.convert_ids_to_labels(activations)

#get major class labels
major_class_labels = model.convert_subclass_to_majorclass(sub_class_labels)
Downloads last month
61
Safetensors
Model size
2M params
Tensor type
F32
·
Unable to determine this model’s pipeline type. Check the docs .