Rebrand AIDO.* -> GB.* (model card)
Browse files
README.md
CHANGED
|
@@ -8,17 +8,17 @@ tags:
|
|
| 8 |
license: other
|
| 9 |
---
|
| 10 |
|
| 11 |
-
#
|
| 12 |
|
| 13 |
[](https://github.com/genbio-ai/ModelGenerator/blob/main/LICENSE)
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
## Model Description
|
| 18 |
|
| 19 |

|
| 20 |
|
| 21 |
-
**
|
| 22 |
- Equivariant Encoder (6M): Encodes backbone structures into a latent space that maintains rotational and translational symmetries using the Equiformer architecture.
|
| 23 |
- Discrete Codebook: Maps continuous latent vectors into 512 discrete structural tokens.
|
| 24 |
- Invariant Decoder (300M): Reconstructs full 3D structures, including side chains, from the structural tokens using an architecture adapted from ESMFold.
|
|
@@ -27,30 +27,30 @@ This model strikes a balance between reconstruction fidelity and structural loca
|
|
| 27 |
|
| 28 |
### Key Features
|
| 29 |
|
| 30 |
-
- Encoding Structures into Tokens (See [genbio-ai/
|
| 31 |
- Decoding Tokens into Structures (See [below](#how-to-use))
|
| 32 |
-
- Reconstructing Structures (See [genbio-ai/
|
| 33 |
-
- Structure Prediction (See [this section](https://huggingface.co/genbio-ai/
|
| 34 |
|
| 35 |
|
| 36 |
## How to Use
|
| 37 |
-
Please see `experiments/
|
| 38 |
|
| 39 |
### Setup
|
| 40 |
Install [Model Generator](https://github.com/genbio-ai/modelgenerator)
|
| 41 |
|
| 42 |
-
### Decoding Structure Tokens from
|
| 43 |
|
| 44 |
-
If you have run the encoding task in [genbio-ai/
|
| 45 |
|
| 46 |
```bash
|
| 47 |
-
CUDA_VISIBLE_DEVICES=0 mgen predict --config=experiments/
|
| 48 |
```
|
| 49 |
|
| 50 |
### Decoding Customized Structure Tokens
|
| 51 |
To decode protein structures, you will need the structure tokens in `.pt` format and a corresponding codebook file (`codebook.pt`). For ease of use, we recommend preparing the structure tokens in TSV format and then converting them to `.pt` format using the provided script.
|
| 52 |
|
| 53 |
-
The TSV file should include the following columns (an example file is available at `experiments/
|
| 54 |
- `uid`: A unique identifier for the protein sequence.
|
| 55 |
- `sequences`: The amino acid sequence (e.g., "LRTPTT").
|
| 56 |
- `predictions`: The structure tokens to be decoded, provided as a list (e.g., "[164, 287, 119, ...]"). The list length must match the length of the amino acid sequence.
|
|
@@ -58,17 +58,17 @@ The TSV file should include the following columns (an example file is available
|
|
| 58 |
|
| 59 |
After preparing the TSV file, you need to convert the TSV file to the `.pt` format using the following command:
|
| 60 |
```bash
|
| 61 |
-
python experiments/
|
| 62 |
```
|
| 63 |
|
| 64 |
You also need to prepare a codebook file (`codebook.pt`) that contains the embedding of each token. The codebook could be extracted using this command:
|
| 65 |
```bash
|
| 66 |
-
python experiments/
|
| 67 |
```
|
| 68 |
|
| 69 |
Then you need to update the `struct_tokens_path` and `codebook_path` in the `decode.yaml` configuration file to point to your structure tokens and codebook file. Alternatively, you can override these parameters when running the command:
|
| 70 |
```bash
|
| 71 |
-
CUDA_VISIBLE_DEVICES=0 mgen predict --config experiments/
|
| 72 |
--data.init_args.config.struct_tokens_datasets_configs.name="your_dataset_name" \
|
| 73 |
--data.init_args.config.struct_tokens_datasets_configs.struct_tokens_path="your_structure_tokens.pt" \
|
| 74 |
--data.init_args.config.struct_tokens_datasets_configs.codebook_path="your_codebook.pt" \
|
|
@@ -90,7 +90,7 @@ CUDA_VISIBLE_DEVICES=0 mgen predict --config experiments/AIDO.StructureTokenizer
|
|
| 90 |
`struct_token_format_conversion.py` script to include the residue index in the TSV file (we may support this feature in the future), or you could provide the `.pt` file directly with the desired residue index.
|
| 91 |
|
| 92 |
# Citation
|
| 93 |
-
Please cite
|
| 94 |
```
|
| 95 |
@inproceedings{zhang_balancing_2024,
|
| 96 |
title = {Balancing Locality and Reconstruction in Protein Structure Tokenizer},
|
|
|
|
| 8 |
license: other
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# GB.StructureDecoder
|
| 12 |
|
| 13 |
[](https://github.com/genbio-ai/ModelGenerator/blob/main/LICENSE)
|
| 14 |
|
| 15 |
+
GB.StructureDecoder is the decoder-only component of [GB.StructureTokenizer](https://huggingface.co/genbio-ai/GB.StructureTokenizer) for tokenization of protein structures.
|
| 16 |
|
| 17 |
## Model Description
|
| 18 |
|
| 19 |

|
| 20 |
|
| 21 |
+
**GB.StructureTokenizer** is built on a Vector Quantized Variational Autoencoder (VQ-VAE) architecture with the following components:
|
| 22 |
- Equivariant Encoder (6M): Encodes backbone structures into a latent space that maintains rotational and translational symmetries using the Equiformer architecture.
|
| 23 |
- Discrete Codebook: Maps continuous latent vectors into 512 discrete structural tokens.
|
| 24 |
- Invariant Decoder (300M): Reconstructs full 3D structures, including side chains, from the structural tokens using an architecture adapted from ESMFold.
|
|
|
|
| 27 |
|
| 28 |
### Key Features
|
| 29 |
|
| 30 |
+
- Encoding Structures into Tokens (See [genbio-ai/GB.StructureEncoder](https://huggingface.co/genbio-ai/GB.StructureEncoder))
|
| 31 |
- Decoding Tokens into Structures (See [below](#how-to-use))
|
| 32 |
+
- Reconstructing Structures (See [genbio-ai/GB.StructureTokenizer](https://huggingface.co/genbio-ai/GB.StructureTokenizer))
|
| 33 |
+
- Structure Prediction (See [this section](https://huggingface.co/genbio-ai/GB.Protein2StructureToken-16B/blob/main/README.md#structure-prediction) in genbio-ai/GB.Protein2StructureToken-16B)
|
| 34 |
|
| 35 |
|
| 36 |
## How to Use
|
| 37 |
+
Please see `experiments/GB.StructureTokenizer` in [Model Generator](https://github.com/genbio-ai/modelgenerator) for more details.
|
| 38 |
|
| 39 |
### Setup
|
| 40 |
Install [Model Generator](https://github.com/genbio-ai/modelgenerator)
|
| 41 |
|
| 42 |
+
### Decoding Structure Tokens from GB.StructureEncoder
|
| 43 |
|
| 44 |
+
If you have run the encoding task in [genbio-ai/GB.StructureEncoder](https://huggingface.co/genbio-ai/GB.StructureEncoder) with the default `encode.yaml`, the default `decode.yaml` configuration file is already set up to decode the encoded tokens. You don't need to change anything in the configuration file. You can directly run the decoding task using the following command:
|
| 45 |
|
| 46 |
```bash
|
| 47 |
+
CUDA_VISIBLE_DEVICES=0 mgen predict --config=experiments/GB.StructureTokenizer/decode.yaml
|
| 48 |
```
|
| 49 |
|
| 50 |
### Decoding Customized Structure Tokens
|
| 51 |
To decode protein structures, you will need the structure tokens in `.pt` format and a corresponding codebook file (`codebook.pt`). For ease of use, we recommend preparing the structure tokens in TSV format and then converting them to `.pt` format using the provided script.
|
| 52 |
|
| 53 |
+
The TSV file should include the following columns (an example file is available at `experiments/GB.StructureTokenizer/decode_example_input.tsv`):
|
| 54 |
- `uid`: A unique identifier for the protein sequence.
|
| 55 |
- `sequences`: The amino acid sequence (e.g., "LRTPTT").
|
| 56 |
- `predictions`: The structure tokens to be decoded, provided as a list (e.g., "[164, 287, 119, ...]"). The list length must match the length of the amino acid sequence.
|
|
|
|
| 58 |
|
| 59 |
After preparing the TSV file, you need to convert the TSV file to the `.pt` format using the following command:
|
| 60 |
```bash
|
| 61 |
+
python experiments/GB.StructureTokenizer/struct_token_format_conversion.py your_tsv_file.tsv your_output_pt_file.pt
|
| 62 |
```
|
| 63 |
|
| 64 |
You also need to prepare a codebook file (`codebook.pt`) that contains the embedding of each token. The codebook could be extracted using this command:
|
| 65 |
```bash
|
| 66 |
+
python experiments/GB.StructureTokenizer/extract_structure_tokenizer_codebook.py --output_path your_output_codebook.pt
|
| 67 |
```
|
| 68 |
|
| 69 |
Then you need to update the `struct_tokens_path` and `codebook_path` in the `decode.yaml` configuration file to point to your structure tokens and codebook file. Alternatively, you can override these parameters when running the command:
|
| 70 |
```bash
|
| 71 |
+
CUDA_VISIBLE_DEVICES=0 mgen predict --config experiments/GB.StructureTokenizer/decode.yaml \
|
| 72 |
--data.init_args.config.struct_tokens_datasets_configs.name="your_dataset_name" \
|
| 73 |
--data.init_args.config.struct_tokens_datasets_configs.struct_tokens_path="your_structure_tokens.pt" \
|
| 74 |
--data.init_args.config.struct_tokens_datasets_configs.codebook_path="your_codebook.pt" \
|
|
|
|
| 90 |
`struct_token_format_conversion.py` script to include the residue index in the TSV file (we may support this feature in the future), or you could provide the `.pt` file directly with the desired residue index.
|
| 91 |
|
| 92 |
# Citation
|
| 93 |
+
Please cite GB.StructureTokenizer using the following BibTex code:
|
| 94 |
```
|
| 95 |
@inproceedings{zhang_balancing_2024,
|
| 96 |
title = {Balancing Locality and Reconstruction in Protein Structure Tokenizer},
|