Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TamGen model onboarding #3733

Merged
merged 5 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions assets/models/system/TamGen/MLmodel
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
flavors:
python_function:
artifacts:
checkpoint:
path: artifacts/checkpoint_best.pt
uri: checkpoints/crossdock_pdb_A10/checkpoint_best.pt
gpt_dir:
path: artifacts/gpt_model
uri: gpt_model
cloudpickle_version: 3.1.0
code: null
env:
conda: conda.yaml
virtualenv: python_env.yaml
loader_module: mlflow.pyfunc.model
python_model: python_model.pkl
python_version: 3.9.21
streamable: false
mlflow_version: 2.19.0
model_size_bytes: 2369527704
model_uuid: 385934d395d944cf851a81002a1c8be4
utc_time_created: '2025-01-08 12:54:23.079748'
4 changes: 4 additions & 0 deletions assets/models/system/TamGen/asset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
extra_config: model.yaml
spec: spec.yaml
type: model
categories: ["Foundation Models"]
50 changes: 50 additions & 0 deletions assets/models/system/TamGen/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Responsible AI Transparency Notes of TamGen Model

## Model description

The TamGen is a 100 million-parameter model that can generate compounds based on the input protein information. TamGen is pre-trained on 10 million compounds from PubChem and fine-tuned on CrossDocked and PDB datasets. We evaluate TamGen on existing benchmarks and achieve top performance. Furthermore, TamGen has successfully identified novel inhibitors for Tuberculosis, which have been subsequently validated through wet-lab experiments.

To use TamGen, please follow the responsible AI policy:
- Do not use TamGen to generate any harmful/toxic compounds.
- Only use TamGen for legitimate purposes and in compliance with all applicable laws and regulations.
- Implement proper safety protocols and ethical review processes before synthesizing or testing any compounds generated by TamGen.

## Uses

TamGen has two main functions:
1. Generate compounds based on the input protein information.
2. Optimise a previous compound to a better one based on the input protein.

### Direct intended uses

The TamGen framework is composed of three integral components:
- **Protein encoder**: Converts the three-dimensional structure of a protein into a hidden vector representation.
- **Molecule decoder**: Extensively trained on a dataset of 10 million SMILES (Simplified Molecular Input Line Entry System) strings, excels in constructing chemically valid SMILES strings for new molecules.
- **Contextual encoder**: Integrates the information from both the protein and the compound, paving the way for targeted compound optimisation.

To generate a compound based on the input protein information:
1. Gather the relevant protein data.
2. Input it into the protein encoder.
3. Retrieve the corresponding SMILES string from the decoder.

To optimise an existing compound relative to a specific protein:
1. Input the protein information into the protein encoder.
2. Process the protein and the initial compound information with the contextual encoder.
3. Channel the output into the decoder to generate an optimised SMILES string for the compound.

## Limitations

- Prior knowledge of protein structures is required.
- Currently, compounds are not generated in 3D spaces, representing a potential area for future enhancement.
- Users need to leverage wet-lab experiments to verify the generated compounds and design pipelines to determine which compound to synthesise (e.g., using molecular docking to pick up compounds with potentially good binding affinity).

## Risks and mitigations

The release of TamGen is relatively low-risk, as real-world compound design is a very complex pipeline:
- Compound design is an intricate process that extends far beyond initial generation (i.e., what TamGen works on). After a compound is generated, it undergoes rigorous filtering and selection processes to identify suitable drug candidates (e.g., enzymatic test, cellular activity test, animal test, etc.).
- TamGen incorporates an additional filter to eliminate compounds with undesired properties.
- Currently, there are already compound generation methods released, like Pocket2Mol and MoLeR. The lack of malicious outcomes stemming from the existence of these models suggests that either the synthesis knowledge firewall is sufficient to deter untoward use or that the design of compound generation is not a useful tool for malicious outcomes.

## Condition to use

The TamGen is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. The TamGen is aimed to facilitate drug discovery research and is not suitable for any other use, including clinical applications. Compounds generated by TamGen shall be subject to a rigorous filtering and selection process to identify suitable drug candidates. Users shall independently assess and test the risks of the TamGen in generating specific compounds, ensure the responsible use of AI technology, including but not limited to the development and integration risk mitigation measures, and comply with all applicable laws and regulations in all applicable jurisdictions. Users shall assume all liability under any theory of liability, whether in contract, torts, regulatory, negligence, products liability, or otherwise, associated with the use of the TamGen and any inputs and outputs thereof. The TamGen output may contain inaccuracies, and users are responsible for determining the accuracy of any outputs generated by TamGen in relation to its intended use.
8 changes: 8 additions & 0 deletions assets/models/system/TamGen/model.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
path:
container_name: models
container_path: microsoft/TamGen/1736144331/mlflow_model_folder
storage_name: automlcesdkdataresources
type: azureblob
publish:
description: description.md
type: mlflow_model
33 changes: 33 additions & 0 deletions assets/models/system/TamGen/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json

name: TamGen
path: ./

properties:
inference-min-sku-spec: 6|1|112|64
inference-recommended-sku: Standard_NC6s_v3, Standard_NC12s_v3, Standard_NC24s_v3, Standard_NC24ads_A100_v4, Standard_NC48ads_A100_v4, Standard_NC96ads_A100_v4, Standard_ND96asr_v4, Standard_ND96amsr_A100_v4, Standard_ND40rs_v2
languages: en
SharedComputeCapacityEnabled: true

tags:
task: protein-design
industry: health-and-life-sciences
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we have decided to go without industry tags

Preview: ""
inference_supported_envs:
license: mit
author: Microsoft
hiddenlayerscanned: "true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add disable-batch too

SharedComputeCapacityEnabled: ""
inference_compute_allow_list:
[
Standard_NC6s_v3,
Standard_NC12s_v3,
Standard_NC24s_v3,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have we tested these skus?

Standard_NC24ads_A100_v4,
Standard_NC48ads_A100_v4,
Standard_NC96ads_A100_v4,
Standard_ND96asr_v4,
Standard_ND96amsr_A100_v4,
Standard_ND40rs_v2,
]
version: 1
Loading