Nhoodie/omni-dna-hgt-lora-step1500
010
Omni-DNA-Multitask-1B HGT Detection LoRA (Step 1500)
Model Description
QLoRA adapter for Omni-DNA-Multitask-1B fine-tuned for Horizontal Gene Transfer (HGT) detection.
Task: Binary classification - detect genomic islands (horizontally transferred genes).
- Training data: IslandViewer 4 (11,182 train / 2,796 eval, balanced)
- Format: DNAsequence + HGTdetection_token + label (0 or 1)
- Novel token: Token 4117 (HGT_detection) added to vocabulary
Training Configuration
Best Performance (Step 1300, Epoch 3.72)
AUC Trajectory
Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
base = AutoModelForCausalLM.from_pretrained('yahmaachi/omni-dna-multitask-1b')
tokenizer = AutoTokenizer.from_pretrained('yahmaachi/omni-dna-multitask-1b')
tokenizer.add_tokens(['HGT_detection'])
base.resize_token_embeddings(len(tokenizer))
model = PeftModel.from_pretrained(base, 'Nhoodie/omni-dna-hgt-lora-best')
model.eval()
dna = 'ATGCGATCGATCGATCGATC...' # your sequence
inputs = tokenizer(dna + 'HGT_detection', return_tensors='pt')
with torch.no_grad():
logits = model(**inputs).logits[:, -1, :]
prob = torch.softmax(logits, dim=-1)
# token 4097 = 1 (HGT), token 4096 = 0 (not HGT)
hgt_prob = prob[0, 4097].item()
print(f'HGT probability: {hgt_prob:.4f}')Training Notes
The training exhibited an interesting collapse-recovery pattern: after initial overfitting around epoch 2-3.4, the novel token (HGT_detection, #4117) underwent a representational reorganization, leading to a new best AUC of 0.8736 at step 1300.
Steps 1300 and 1500 are sibling models - different representational equilibria rather than descendant relationships. Step 1300 optimizes ranking (AUC), step 1500 optimizes classification (F1).
License
MIT
