Hi-TPH-PLMs

Paper: Machine Learning Dataset and Benchmark for Accurate T Cell Receptor–pHLA Binding Prediction

Github repo: https://github.com/Jiadong001/Hi-TpH


Input components

Level Directory Input components
I level1 Peptide + TCR CDR3Ξ²
II level2 Peptide + HLA + TCR CDR3Ξ²
III level3 Peptide + HLA + TCR CDR3Ξ± + TCR CDR3Ξ²
IV level4 Peptide + HLA + full TCR Ξ± and Ξ² variable-region sequences

Repository structure

Each level contains the same nine model subdirectories. Each model subdirectory contains a checkpoint (ckpt.pkl) and its configuration (config.json). The root-level config.json describes the input components for the four levels.

Hi-TPH-PLMs/
β”œβ”€β”€ README.md
β”œβ”€β”€ config.json
β”œβ”€β”€ level1/
β”‚   β”œβ”€β”€ esm2-8M/
β”‚   β”‚   β”œβ”€β”€ ckpt.pkl
β”‚   β”‚   └── config.json
β”‚   β”œβ”€β”€ esm2-35M/
β”‚   β”œβ”€β”€ esm2-150M/
β”‚   β”œβ”€β”€ esm2-35M/
β”‚   β”œβ”€β”€ AMPLIFY-120M-base/
β”‚   β”œβ”€β”€ AMPLIFY-120M/
β”‚   β”œβ”€β”€ AMPLIFY-350M/
β”‚   β”œβ”€β”€ protbert/
β”‚   └── tape/
β”œβ”€β”€ level2/                    # Same model subdirectories as level1
β”œβ”€β”€ level3/                    # Same model subdirectories as level1
└── level4/                    # Same model subdirectories as level1

Download checkpoints

Install the download library in your Python environment:

python -m pip install --upgrade huggingface_hub

Choose one of the following examples according to the checkpoints you need. Files are saved under ./Hi-TPH-PLMs with the repository's directory structure preserved.

Download a single model

For example, download the Level IV ESM2-35M checkpoint and its configuration:

from pathlib import Path
from huggingface_hub import snapshot_download

download_dir = snapshot_download(
    repo_id="Jiadong001/Hi-TPH-PLMs",
    allow_patterns=["level4/esm2-35M/*"],
    local_dir="./Hi-TPH-PLMs",
)

model_dir = Path(download_dir) / "level4" / "esm2-35M"
print("Checkpoint:", model_dir / "ckpt.pkl")
print("Configuration:", model_dir / "config.json")

Replace level4/esm2-35M with any level and model directory listed above, such as level1/esm2-8M or level3/AMPLIFY-120M.

Download all models for one level

For example, download all nine models for Level IV:

from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="Jiadong001/Hi-TPH-PLMs",
    allow_patterns=["level4/*"],
    local_dir="./Hi-TPH-PLMs",
)

Download all models

The complete collection contains 36 checkpoints across four levels (approximately 29.02 GiB of weights).

from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="Jiadong001/Hi-TPH-PLMs",
    local_dir="./Hi-TPH-PLMs",
)

These examples only download the checkpoint files. For model construction, input preprocessing, and checkpoint loading, refer to the Hi-TPH code repository.

For additional download options, see the Hugging Face download guide.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support