Feature Extraction
Transformers
PyTorch
English
modernbert
genomics
rna
nucleotide
sequence-modeling
biology
bioinformatics
electra
Instructions to use FreakingPotato/RNAElectra with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FreakingPotato/RNAElectra with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="FreakingPotato/RNAElectra")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("FreakingPotato/RNAElectra") model = AutoModel.from_pretrained("FreakingPotato/RNAElectra", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
1735c76
1
Parent(s): 10234c4
Updated README
Browse files12345678910116 unmodified lines1819202122231 unmodified line2526272829301 unmodified line32333435---license: apache-2.0---# RNAElectraRNAElectra is a pretrained RNA language model for nucleotide-level sequence representation learning.## Load model```pythonimport torch6 unmodified lines"FreakingPotato/RNAElectra",trust_remote_code=True).to(device)tokenizer = NucEL_Tokenizer.from_pretrained("FreakingPotato/RNAElectra",1 unmodified line)sequence = "AUGCAUGCAUGCAUGC"inputs = tokenizer(sequence, return_tensors="pt")inputs = {k: v.to(device) for k, v in inputs.items()}1 unmodified lineoutputs = model(**inputs)embeddings = outputs.last_hidden_stateprint(embeddings.shape)123456789101112131415161718192021222324252627282930313233343536373839404142436 unmodified lines505152535455561 unmodified line585960616263641 unmodified line66676869707172737475767778798081828384858687888990919293949596---language:- enlicense: apache-2.0library_name: transformerstags:- genomics- rna- nucleotide- sequence-modeling- biology- bioinformatics- electrapipeline_tag: feature-extraction---# RNAElectra: Single-Nucleotide ELECTRA-Style Pre-training for RNA Representation LearningRNAElectra is a nucleotide-resolution RNA language model trained using an ELECTRA-style objective for efficient and discriminative representation learning. The model produces contextualized embeddings for RNA sequences and is designed for downstream transcriptomic and regulatory modeling tasks.## Model Details- **Model Type**: Transformer-based discriminator model- **Training Objective**: ELECTRA-style replaced-token detection- **Resolution**: Single-nucleotide- **Domain**: RNA and transcriptomic sequences- **Architecture**: ModernBERT-style backbone adapted for nucleotide sequencesRNAElectra focuses on efficient pre-training by learning to discriminate corrupted tokens rather than reconstruct them, leading to strong representations with improved training efficiency.## Key Features- Single-nucleotide tokenization- Contextual RNA sequence embeddings- ELECTRA-style discriminative pre-training- Suitable for RNA function prediction, RBP binding modeling, stability prediction, regulatory element analysis, and downstream fine-tuning tasks## Usage### Basic Feature Extraction```pythonimport torch6 unmodified lines"FreakingPotato/RNAElectra",trust_remote_code=True).to(device)model.eval()tokenizer = NucEL_Tokenizer.from_pretrained("FreakingPotato/RNAElectra",1 unmodified line)sequence = "AUGCAUGCAUGCAUGC"inputs = tokenizer(sequence, return_tensors="pt")inputs = {k: v.to(device) for k, v in inputs.items()}1 unmodified lineoutputs = model(**inputs)embeddings = outputs.last_hidden_stateprint(f"Sequence embeddings shape: {embeddings.shape}")```## Installation```bashpip install transformers torch```## Requirements- transformers >= 5.0.0- torch >= 2.10.0- Python >= 3.12.3GPU is recommended for large-scale inference.## Pre-training OverviewRNAElectra was trained using an ELECTRA-style generator–discriminator framework. A generator predicts corrupted tokens, and a discriminator learns to detect replaced tokens. Only the discriminator weights are released in this repository. This objective improves training efficiency compared to masked language modeling while preserving strong contextual representations.## Intended UseRNAElectra is intended for feature extraction, downstream fine-tuning, and representation learning in RNA and transcriptomic modeling tasks. It is not intended for clinical decision-making or medical diagnostics.## LicenseThis model is released under the Apache 2.0 License.
README.md+65-4