Feature Extraction
Transformers
Safetensors
flash_transformer
biology
genomics
long-context
custom_code
Instructions to use isyslab/DNAFlash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use isyslab/DNAFlash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="isyslab/DNAFlash", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("isyslab/DNAFlash", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update dnaflash.py
Browse files- dnaflash.py +3 -0
dnaflash.py
CHANGED
|
@@ -13,6 +13,9 @@ import torch.utils.checkpoint
|
|
| 13 |
from torch import nn, Tensor
|
| 14 |
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
# helper functions
|
| 17 |
|
| 18 |
def exists(val):
|
|
|
|
| 13 |
from torch import nn, Tensor
|
| 14 |
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
|
| 15 |
|
| 16 |
+
from typing import Optional, Tuple, Union, Any
|
| 17 |
+
|
| 18 |
+
|
| 19 |
# helper functions
|
| 20 |
|
| 21 |
def exists(val):
|