Official implementation of ProtTeX-CC: Activating In-Context Learning in Protein LLM via Two-Stage Instruction Compression
# Setup
conda env create -f prottex_joint_embed.yml
# Replace transformers with version in conda_env_transformers/
# Train
bash run_train.sh
# Inference
bash infer.sh
# Or use: infer_prottex_joint_embed.py (official transformers compatible)# Setup
conda env create -f save_embedding.yml
# Replace transformers with /compressed_vector_pool_construction/conda_env_transformers/ version
# Pipeline
bash run_save_embedding.sh # Save embeddings to H5
python calculate_h5_sim_gpu.py # Retrieve top-k similar embeddings
python make_sft_dataset_with_compressed_embedding_index.py # Build SFT dataset# Setup: prottex_cc.yml / prottex_cc_infer.yml (replace transformers accordingly)
bash run_sft.sh # Train
bash run_infer.sh # Inferencebash run_step1_build_demo_pool_ddp.sh # Build demo pool
bash run_step2_build_retrieval_ddp.sh # Retrieve similar vectors
bash run_step3_train_prefix_projector_ddp.sh # Train model
bash run_step4_generate_ddp.sh # Inference| Resource | Link |
|---|---|
| Full PFUD Dataset | Zenodo |
| Models (ProtTeX-CC) | HuggingFace |
@misc{fan2025prottexcc,
title={ProtTeX-CC: Activating In-Context Learning in Protein LLM via Two-Stage Instruction Compression},
author={Fan, Chuanliu and Ma, Zicheng and Gao, Jun and Yu, Nan and Zhang, Jun and Cao, Ziqiang and Gao, Yi Qin and Fu, Guohong},
year={2025},
eprint={2508.12212},
archivePrefix={arXiv}
}
@misc{ma2025prottex,
title={ProtTeX: Structure-In-Context Reasoning and Editing of Proteins with Large Language Models},
author={Ma, Zicheng and Fan, Chuanliu and Wang, Zhicong and Chen, Zhenyu and Lin, Xiaohan and Li, Yanheng and Feng, Shihao and Zhang, Jun and Cao, Ziqiang and Gao, Yi Qin},
year={2025},
eprint={2503.08179},
archivePrefix={arXiv}
}