duttaprat commited on
Commit
57995d4
·
verified ·
1 Parent(s): c66d275

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +117 -0
README.md ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ base_model: duttaprat/HViLM-base
4
+ datasets:
5
+ - duttaprat/HVUE-v2
6
+ pipeline_tag: text-classification
7
+ tags:
8
+ - genomics
9
+ - virology
10
+ - dna
11
+ - virus
12
+ - pathogenicity
13
+ - hvue-v2
14
+ license: apache-2.0
15
+ ---
16
+
17
+ # HViLM-Patho
18
+
19
+ **HViLM-Patho** is the official HViLM model for binary virus pathogenicity classification.
20
+
21
+ - **Fine-tuned from:** [duttaprat/HViLM-base](https://huggingface.co/duttaprat/HViLM-base)
22
+ - **Benchmark:** [duttaprat/HVUE-v2](https://huggingface.co/datasets/duttaprat/HVUE-v2)
23
+ - **HVUE v2 configuration:** `Pathogenicity/standard_capped_1000bp`
24
+ - **Checkpoint selection:** best validation F1 (`checkpoint-3000`)
25
+ - **Input:** virus nucleotide sequence
26
+ - **Output:** non-pathogenic vs. pathogenic
27
+
28
+ This repository contains a **standalone full fine-tuned checkpoint**, so users can load `duttaprat/HViLM-Patho` directly without separately loading `HViLM-base`.
29
+
30
+ ## Label Mapping
31
+
32
+ | ID | Label |
33
+ |---:|---|
34
+ | 0 | `NON_PATHOGENIC` |
35
+ | 1 | `PATHOGENIC` |
36
+
37
+ ## Performance
38
+
39
+ Held-out HVUE v2 test set, standard 1000-nt configuration:
40
+
41
+ | Metric | Score |
42
+ |---|---:|
43
+ | Accuracy | 92.39 |
44
+ | F1 | 91.32 |
45
+ | MCC | 83.10 |
46
+ | Precision | 93.03 |
47
+ | Recall | 90.12 |
48
+
49
+ ## Training Details
50
+
51
+ - **Fine-tuning method:** LoRA
52
+ - **LoRA rank:** 8
53
+ - **LoRA alpha:** 16
54
+ - **Target modules:** query and value projections across all 12 transformer layers
55
+ - **Approximate trainable LoRA parameters:** ~0.3M
56
+ - **Learning rate:** 3e-5
57
+ - **Maximum input length:** 250 BPE tokens (approximately 1000 nt)
58
+ - **Early stopping:** patience 3, monitored using validation F1
59
+ - **Hardware:** NVIDIA A40 GPU
60
+
61
+ The released repository contains the full task-specific model weights rather than only the LoRA adapter.
62
+
63
+ ## Usage
64
+
65
+ ```python
66
+ import torch
67
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
68
+
69
+ model_id = "duttaprat/HViLM-Patho"
70
+
71
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
72
+ model = AutoModelForSequenceClassification.from_pretrained(
73
+ model_id,
74
+ trust_remote_code=True,
75
+ )
76
+
77
+ sequence = "ATGCGTACGTTAGCCGATCGATTACGCGTACGTAGCTAGC"
78
+ inputs = tokenizer(
79
+ sequence,
80
+ return_tensors="pt",
81
+ truncation=True,
82
+ max_length=250,
83
+ )
84
+
85
+ with torch.no_grad():
86
+ logits = model(**inputs).logits
87
+
88
+ prediction_id = logits.argmax(dim=-1).item()
89
+ print(model.config.id2label[prediction_id])
90
+ ```
91
+
92
+ Possible outputs are `NON_PATHOGENIC` and `PATHOGENIC`.
93
+
94
+ ## Intended Use
95
+
96
+ 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.
97
+
98
+ ## Related Resources
99
+
100
+ - [HViLM-base](https://huggingface.co/duttaprat/HViLM-base)
101
+ - [HViLM-R0](https://huggingface.co/duttaprat/HViLM-R0)
102
+ - [HViLM-Tropism](https://huggingface.co/duttaprat/HViLM-Tropism)
103
+ - [HVUE-v2](https://huggingface.co/datasets/duttaprat/HVUE-v2)
104
+ - [HViLM GitHub repository](https://github.com/duttaprat/HViLM)
105
+
106
+ ## Citation
107
+
108
+ ```bibtex
109
+ @article{dutta2026hvilm,
110
+ title={HViLM: A foundation model for viral genomics enables multi-task prediction of pathogenicity, transmissibility, and host tropism},
111
+ 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},
112
+ journal={bioRxiv},
113
+ pages={2026--03},
114
+ year={2026},
115
+ publisher={Cold Spring Harbor Laboratory}
116
+ }
117
+ ```