🦠 Flu Virus Foundation Model

This is a foundation model trained on influenza virus sequences for predicting viral evolution, functional constraints, and potential antigenic changes.
It is designed to support research in influenza biology, vaccine design, and immunology.


πŸ“– Model Details

  • Model type: Transformer-based language model
  • Architecture: GPT-2 style
  • Framework: πŸ€— Transformers (PyTorch)
  • Files included: model weights (model.safetensors), tokenizer, config files
  • Trained on: pretrained on GISAID and NCBI influenza A sequences; finetuning on Noncoding region sequence completion

πŸš€ Simple Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

# Model and tokenizer from Hugging Face Hub
model_name = "Yiquan2/Flu_Foundation"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)

# Example input sequence (DNA/protein)
sequence = "ATGAATCCAAACCAGAAAATAATAACCATTGGCTCTGTT"

# Tokenize input
inputs = tokenizer(sequence, return_tensors="pt")

# Generate output probabilities or predictions
with torch.no_grad():
    outputs = model(**inputs)
    logits = outputs.logits  # shape: [batch_size, seq_len, vocab_size]

# Optional: compute probabilities
probs = torch.softmax(logits, dim=-1)

print(probs)

πŸ§ͺ Example: Mutation Effect Prediction with Flu Foundation Model

python mutation_prediction.py \
    --csv DMS_NA_data/Mos99_fit.csv \
    --fasta Mos99_nucleotide.fasta \
    --model Yiquan2/Flu_Foundation \
    --output results.csv
Downloads last month
4
Safetensors
Model size
65.2M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support