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
fix param err
Browse files- dnaflash.py +1 -1
dnaflash.py
CHANGED
|
@@ -450,7 +450,7 @@ class FLASHTransformerForSequenceClassification(FLASHTransformerForPretrained):
|
|
| 450 |
|
| 451 |
# 获取基模型输出
|
| 452 |
outputs = super().forward(
|
| 453 |
-
input_ids
|
| 454 |
)
|
| 455 |
hidden_states = outputs["hidden_states"]
|
| 456 |
input_mask_expanded = input_ids["attention_mask"].unsqueeze(-1).expand(hidden_states.size()) # 维度匹配
|
|
|
|
| 450 |
|
| 451 |
# 获取基模型输出
|
| 452 |
outputs = super().forward(
|
| 453 |
+
input_ids
|
| 454 |
)
|
| 455 |
hidden_states = outputs["hidden_states"]
|
| 456 |
input_mask_expanded = input_ids["attention_mask"].unsqueeze(-1).expand(hidden_states.size()) # 维度匹配
|