duttaprat/HVUE-v2
Viewer • Updated • 2.61M • 8
How to use duttaprat/HViLM-Patho with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="duttaprat/HViLM-Patho", trust_remote_code=True) # Load model directly
from transformers import AutoModelForSequenceClassification
model = AutoModelForSequenceClassification.from_pretrained("duttaprat/HViLM-Patho", trust_remote_code=True, device_map="auto")HViLM-Patho is the official HViLM model for binary virus pathogenicity classification.
Pathogenicity/standard_capped_1000bpcheckpoint-3000)This repository contains a standalone full fine-tuned checkpoint, so users can load duttaprat/HViLM-Patho directly without separately loading HViLM-base.
| ID | Label |
|---|---|
| 0 | NON_PATHOGENIC |
| 1 | PATHOGENIC |
Held-out HVUE v2 test set, standard 1000-nt configuration:
| Metric | Score |
|---|---|
| Accuracy | 92.39 |
| F1 | 91.32 |
| MCC | 83.10 |
| Precision | 93.03 |
| Recall | 90.12 |
The released repository contains the full task-specific model weights rather than only the LoRA adapter.
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model_id = "duttaprat/HViLM-Patho"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForSequenceClassification.from_pretrained(
model_id,
trust_remote_code=True,
)
sequence = "ATGCGTACGTTAGCCGATCGATTACGCGTACGTAGCTAGC"
inputs = tokenizer(
sequence,
return_tensors="pt",
truncation=True,
max_length=250,
)
with torch.no_grad():
logits = model(**inputs).logits
prediction_id = logits.argmax(dim=-1).item()
print(model.config.id2label[prediction_id])
Possible outputs are NON_PATHOGENIC and PATHOGENIC.
HViLM-Patho is intended for research on virus sequence representation and computational pathogenicity classification. Predictions should be interpreted as model outputs rather than experimental or clinical evidence.
@article{dutta2026hvilm,
title={HViLM: A foundation model for viral genomics enables multi-task prediction of pathogenicity, transmissibility, and host tropism},
author={Dutta, Pratik and Vaska, Jack and Surana, Pallavi and Sathian, Rekha and Chao, Max and Zhou, Zhihan and Liu, Han and Davuluri, Ramana V},
journal={bioRxiv},
pages={2026--03},
year={2026},
publisher={Cold Spring Harbor Laboratory}
}