
https://github.com/baaihealth/opi
OPI: An Open Instruction Dataset for Adapting Large Language Models to Protein-Related Tasks has been accepted by NeurIPS 2024 Workshop: Foundation Models for Science: Progress, Opportunities, and Challenges.
Dataset size:
- Thera are 1.64M samples, including training (1,615,661) and testing (26,607) sets, in OPI dataset, covering 9 protein-related tasks.
We are excited to announce the release of the Open Protein Instructions (OPI) dataset, a curated collection of instructions covering 9 tasks for adapting LLMs to protein biology. The dataset is designed to advance LLM-driven research in the field of protein biology. We welcome contributions and enhancements to this dataset from the community.
OPI is the initial part of Open Biology Instructions(OBI) project, together with the subsequent Open Molecule Instructions(OMI), Open DNA Instructions(ODI), Open RNA Instructions(ORI) and Open Single-cell Instructions (OSCI). OBI is a project which aims to fully leverage the potential ability of Large Language Models(LLMs), especially the scientific LLMs like Galactica, to facilitate research in AI for Life Science community. While OBI is still in an early stage, we hope to provide a starting point for the community to bridge LLMs and biological domain knowledge.
The previous version of OPI dataset is based on the release 2022_01 of UniProtKB/Swiss-Prot protein knowledgebase. At current, OPI is updated to contain the latest release 2023_05, which can be accessed via the dataset file OPI_updated_160k.json.
Reference:
The OPI dataset is curated on our own by extracting key information from Swiss-Prot database. The following figure shows the general construction process.

The OPI dataset is organized into the three subfoldersβAP, KM, and SUβby in the OPI_DATA directory within this repository, where you can find a subset for each specific task as well as the full dataset file: OPI_full_1.61M_train.json.
./OPI_DATA/
βββ SU
β βββ EC_number
β β βββ test
β β β βββ CLEAN_EC_number_new_test.jsonl
β β β βββ CLEAN_EC_number_price_test.jsonl
β β βββ train
β β βββ CLEAN_EC_number_train.json
β βββ Fold_type
β β βββ test
β β β βββ fold_type_test.jsonl
β β βββ train
β β βββ fold_type_train.json
β βββ Subcellular_localization
β βββ test
β β βββ subcell_loc_test.jsonl
β βββ train
βββ subcell_loc_train.json
βββ AP
β βββ Keywords
β β βββ test
β β β βββ CASPSimilarSeq_keywords_test.jsonl
β β β βββ IDFilterSeq_keywords_test.jsonl
β β β βββ UniProtSeq_keywords_test.jsonl
β β βββ train
β β βββ keywords_train.json
β βββ GO
β β βββ test
β β β βββ CASPSimilarSeq_go_terms_test.jsonl
β β β βββ IDFilterSeq_go_terms_test.jsonl
β β β βββ UniProtSeq_go_terms_test.jsonl
β β βββ train
β β βββ go_terms_train.json
β βββ Function
β βββ test
β β βββ CASPSimilarSeq_function_test.jsonl
β β βββ IDFilterSeq_function_test.jsonl
β β βββ UniProtSeq_function_test.jsonl
β βββ train
β βββ function_train.json
βββ KM
βββ gSymbol2Tissue
β βββ test
β β βββ gene_symbol_to_tissue_test.jsonl
β βββ train
β βββ gene_symbol_to_tissue_train.json
βββ gSymbol2Cancer
β βββ test
β β βββ gene_symbol_to_cancer_test.jsonl
β βββ train
β βββ gene_symbol_to_cancer_train.json
βββ gName2Cancer
βββ test
β βββ gene_name_to_cancer_test.jsonl
βββ train
βββ gene_name_to_cancer_train.json
An example of OPI training data:
instruction:
What is the EC classification of the input protein sequence based on its biological function?
input:
MGLVSSKKPDKEKPIKEKDKGQWSPLKVSAQDKDAPPLPPLVVFNHLTPPPPDEHLDEDKHFVVALYDYTAMNDRDLQMLKGEKLQVLKGTGDWWLARS
LVTGREGYVPSNFVARVESLEMERWFFRSQGRKEAERQLLAPINKAGSFLIRESETNKGAFSLSVKDVTTQGELIKHYKIRCLDEGGYYISPRITFPSL
QALVQHYSKKGDGLCQRLTLPCVRPAPQNPWAQDEWEIPRQSLRLVRKLGSGQFGEVWMGYYKNNMKVAIKTLKEGTMSPEAFLGEANVMKALQHERLV
RLYAVVTKEPIYIVTEYMARGCLLDFLKTDEGSRLSLPRLIDMSAQIAEGMAYIERMNSIHRDLRAANILVSEALCCKIADFGLARIIDSEYTAQEGAK
FPIKWTAPEAIHFGVFTIKADVWSFGVLLMEVVTYGRVPYPGMSNPEVIRNLERGYRMPRPDTCPPELYRGVIAECWRSRPEERPTFEFLQSVLEDFYT
ATERQYELQP
output:
2.7.10.2
An example of OPI testing data:
{"id": "seed_task_0", "name": "EC number of price dataset from CLEAN", "instruction":
"Return the EC number of the protein sequence.", "instances": [{"input":
"MAIPPYPDFRSAAFLRQHLRATMAFYDPVATDASGGQFHFFLDDGTVYNTHTRHLVSATRFVVTHAMLYRTTGEARYQVGMRHALEFLRTAFLDPATGGY
AWLIDWQDGRATVQDTTRHCYGMAFVMLAYARAYEAGVPEARVWLAEAFDTAEQHFWQPAAGLYADEASPDWQLTSYRGQNANMHACEAMISAFRATGERR
YIERAEQLAQGICQRQAALSDRTHAPAAEGWVWEHFHADWSVDWDYNRHDRSNIFRPWGYQVGHQTEWAKLLLQLDALLPADWHLPCAQRLFDTAVERGWD
AEHGGLYYGMAPDGSICDDGKYHWVQAESMAAAAVLAVRTGDARYWQWYDRIWAYCWAHFVDHEHGAWFRILHRDNRNTTREKSNAGKVDYHNMGACYDVL
LWALDAPGFSKESRSAALGRP", "output": "5.3.1.7"}], "is_classification": false}
To assess the effectiveness of instruction tuning with the OPI dataset, we developed OPEval, which comprises three categories of evaluation tasks. Each category includes three specific tasks. The table below outlines the task types, names, and the corresponding sizes of the training and testing sets.
| Task Type | Type Abbr. | Task Name | Task Abbr. | Training set size | Testing set size |
|---|---|---|---|---|---|
| Sequence Understanding | SU | EC Number Prediction | EC_number | 227,362 | 392 (NEW-392), 149 (Price-149) |
| Fold Type Prediction | Fold_type | 12,312 | 718 (Fold), 1254 (Superfamily), 1272 (Family) | ||
| Subcellular Localization Prediction | Subcellular_localization | 11,230 | 2,772 | ||
| Annotation Prediction | AP | Function Keywords Prediction | Keywords | 451,618 | 184 (CASPSimilarSeq), 1,112 (IDFilterSeq), 4562 (UniprotSeq) |
| Gene Ontology(GO) Terms Prediction | GO | 451,618 | 184 (CASPSimilarSeq), 1,112 (IDFilterSeq), 4562 (UniprotSeq) | ||
| Function Description Prediction | Function | 451,618 | 184 (CASPSimilarSeq), 1,112 (IDFilterSeq), 4562 (UniprotSeq) | ||
| Knowledge Mining | KM | Tissue Location Prediction from Gene Symbol | gSymbol2Tissue | 8,723 | 2,181 |
| Cancer Prediction from Gene Symbol | gSymbol2Cancer | 590 | 148 | ||
| Cancer Prediction from Gene Name | gName2Cancer | 590 | 148 |
The dataset is licensed under a Creative Commons Attribution Non Commercial 4.0 License. The use of this dataset should also abide by the original License & Disclaimer and Privacy Notice of UniProt.

https://github.com/baaihealth/opi
OPI: An Open Instruction Dataset for Adapting Large Language Models to Protein-Related Tasks has been accepted by NeurIPS 2024 Workshop: Foundation Models for Science: Progress, Opportunities, and Challenges.
Dataset size:
- Thera are 1.64M samples, including training (1,615,661) and testing (26,607) sets, in OPI dataset, covering 9 protein-related tasks.
We are excited to announce the release of the Open Protein Instructions (OPI) dataset, a curated collection of instructions covering 9 tasks for adapting LLMs to protein biology. The dataset is designed to advance LLM-driven research in the field of protein biology. We welcome contributions and enhancements to this dataset from the community.
OPI is the initial part of Open Biology Instructions(OBI) project, together with the subsequent Open Molecule Instructions(OMI), Open DNA Instructions(ODI), Open RNA Instructions(ORI) and Open Single-cell Instructions (OSCI). OBI is a project which aims to fully leverage the potential ability of Large Language Models(LLMs), especially the scientific LLMs like Galactica, to facilitate research in AI for Life Science community. While OBI is still in an early stage, we hope to provide a starting point for the community to bridge LLMs and biological domain knowledge.
The previous version of OPI dataset is based on the release 2022_01 of UniProtKB/Swiss-Prot protein knowledgebase. At current, OPI is updated to contain the latest release 2023_05, which can be accessed via the dataset file OPI_updated_160k.json.
Reference:
The OPI dataset is curated on our own by extracting key information from Swiss-Prot database. The following figure shows the general construction process.

The OPI dataset is organized into the three subfoldersβAP, KM, and SUβby in the OPI_DATA directory within this repository, where you can find a subset for each specific task as well as the full dataset file: OPI_full_1.61M_train.json.
./OPI_DATA/
βββ SU
β βββ EC_number
β β βββ test
β β β βββ CLEAN_EC_number_new_test.jsonl
β β β βββ CLEAN_EC_number_price_test.jsonl
β β βββ train
β β βββ CLEAN_EC_number_train.json
β βββ Fold_type
β β βββ test
β β β βββ fold_type_test.jsonl
β β βββ train
β β βββ fold_type_train.json
β βββ Subcellular_localization
β βββ test
β β βββ subcell_loc_test.jsonl
β βββ train
βββ subcell_loc_train.json
βββ AP
β βββ Keywords
β β βββ test
β β β βββ CASPSimilarSeq_keywords_test.jsonl
β β β βββ IDFilterSeq_keywords_test.jsonl
β β β βββ UniProtSeq_keywords_test.jsonl
β β βββ train
β β βββ keywords_train.json
β βββ GO
β β βββ test
β β β βββ CASPSimilarSeq_go_terms_test.jsonl
β β β βββ IDFilterSeq_go_terms_test.jsonl
β β β βββ UniProtSeq_go_terms_test.jsonl
β β βββ train
β β βββ go_terms_train.json
β βββ Function
β βββ test
β β βββ CASPSimilarSeq_function_test.jsonl
β β βββ IDFilterSeq_function_test.jsonl
β β βββ UniProtSeq_function_test.jsonl
β βββ train
β βββ function_train.json
βββ KM
βββ gSymbol2Tissue
β βββ test
β β βββ gene_symbol_to_tissue_test.jsonl
β βββ train
β βββ gene_symbol_to_tissue_train.json
βββ gSymbol2Cancer
β βββ test
β β βββ gene_symbol_to_cancer_test.jsonl
β βββ train
β βββ gene_symbol_to_cancer_train.json
βββ gName2Cancer
βββ test
β βββ gene_name_to_cancer_test.jsonl
βββ train
βββ gene_name_to_cancer_train.json
An example of OPI training data:
instruction:
What is the EC classification of the input protein sequence based on its biological function?
input:
MGLVSSKKPDKEKPIKEKDKGQWSPLKVSAQDKDAPPLPPLVVFNHLTPPPPDEHLDEDKHFVVALYDYTAMNDRDLQMLKGEKLQVLKGTGDWWLARS
LVTGREGYVPSNFVARVESLEMERWFFRSQGRKEAERQLLAPINKAGSFLIRESETNKGAFSLSVKDVTTQGELIKHYKIRCLDEGGYYISPRITFPSL
QALVQHYSKKGDGLCQRLTLPCVRPAPQNPWAQDEWEIPRQSLRLVRKLGSGQFGEVWMGYYKNNMKVAIKTLKEGTMSPEAFLGEANVMKALQHERLV
RLYAVVTKEPIYIVTEYMARGCLLDFLKTDEGSRLSLPRLIDMSAQIAEGMAYIERMNSIHRDLRAANILVSEALCCKIADFGLARIIDSEYTAQEGAK
FPIKWTAPEAIHFGVFTIKADVWSFGVLLMEVVTYGRVPYPGMSNPEVIRNLERGYRMPRPDTCPPELYRGVIAECWRSRPEERPTFEFLQSVLEDFYT
ATERQYELQP
output:
2.7.10.2
An example of OPI testing data:
{"id": "seed_task_0", "name": "EC number of price dataset from CLEAN", "instruction":
"Return the EC number of the protein sequence.", "instances": [{"input":
"MAIPPYPDFRSAAFLRQHLRATMAFYDPVATDASGGQFHFFLDDGTVYNTHTRHLVSATRFVVTHAMLYRTTGEARYQVGMRHALEFLRTAFLDPATGGY
AWLIDWQDGRATVQDTTRHCYGMAFVMLAYARAYEAGVPEARVWLAEAFDTAEQHFWQPAAGLYADEASPDWQLTSYRGQNANMHACEAMISAFRATGERR
YIERAEQLAQGICQRQAALSDRTHAPAAEGWVWEHFHADWSVDWDYNRHDRSNIFRPWGYQVGHQTEWAKLLLQLDALLPADWHLPCAQRLFDTAVERGWD
AEHGGLYYGMAPDGSICDDGKYHWVQAESMAAAAVLAVRTGDARYWQWYDRIWAYCWAHFVDHEHGAWFRILHRDNRNTTREKSNAGKVDYHNMGACYDVL
LWALDAPGFSKESRSAALGRP", "output": "5.3.1.7"}], "is_classification": false}
To assess the effectiveness of instruction tuning with the OPI dataset, we developed OPEval, which comprises three categories of evaluation tasks. Each category includes three specific tasks. The table below outlines the task types, names, and the corresponding sizes of the training and testing sets.
| Task Type | Type Abbr. | Task Name | Task Abbr. | Training set size | Testing set size |
|---|---|---|---|---|---|
| Sequence Understanding | SU | EC Number Prediction | EC_number | 227,362 | 392 (NEW-392), 149 (Price-149) |
| Fold Type Prediction | Fold_type | 12,312 | 718 (Fold), 1254 (Superfamily), 1272 (Family) | ||
| Subcellular Localization Prediction | Subcellular_localization | 11,230 | 2,772 | ||
| Annotation Prediction | AP | Function Keywords Prediction | Keywords | 451,618 | 184 (CASPSimilarSeq), 1,112 (IDFilterSeq), 4562 (UniprotSeq) |
| Gene Ontology(GO) Terms Prediction | GO | 451,618 | 184 (CASPSimilarSeq), 1,112 (IDFilterSeq), 4562 (UniprotSeq) | ||
| Function Description Prediction | Function | 451,618 | 184 (CASPSimilarSeq), 1,112 (IDFilterSeq), 4562 (UniprotSeq) | ||
| Knowledge Mining | KM | Tissue Location Prediction from Gene Symbol | gSymbol2Tissue | 8,723 | 2,181 |
| Cancer Prediction from Gene Symbol | gSymbol2Cancer | 590 | 148 | ||
| Cancer Prediction from Gene Name | gName2Cancer | 590 | 148 |
The dataset is licensed under a Creative Commons Attribution Non Commercial 4.0 License. The use of this dataset should also abide by the original License & Disclaimer and Privacy Notice of UniProt.