Fill-Mask
Transformers
Safetensors
nucengram
feature-extraction
biology
genomics
dna
masked-lm
custom_code
Instructions to use FreakingPotato/NucEngram with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FreakingPotato/NucEngram with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="FreakingPotato/NucEngram", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("FreakingPotato/NucEngram", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 537 Bytes
cb634e7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | """HuggingFace config for the NucEngram genomic language model."""
from transformers import PretrainedConfig
class NucEngramConfig(PretrainedConfig):
model_type = "nucengram"
def __init__(self, backbone=None, engram=None, max_length=8192, pad_token_id=0, **kwargs):
# `backbone` = ModernBertGenomicConfig kwargs; `engram` = EngramConfig kwargs.
self.backbone = backbone or {}
self.engram = engram or {}
self.max_length = max_length
super().__init__(pad_token_id=pad_token_id, **kwargs)
|