vshirasuna commited on
Commit
158f727
·
verified ·
1 Parent(s): 649c7ca

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +84 -3
README.md CHANGED
@@ -1,3 +1,84 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - chemistry
5
+ - foundation models
6
+ - AI4Science
7
+ - materials
8
+ - molecules
9
+ - safetensors
10
+ - pytorch
11
+ - mixture-of-experts
12
+ - moe
13
+ ---
14
+
15
+ # MoL-MoE: Multi-view Mixture-of-Experts framework
16
+
17
+ This repository provides PyTorch source code of the framework MoL-MoE.
18
+
19
+ For more information contact: [email protected] or [email protected].
20
+
21
+ ![mol-moe](mol_moe/images/mol-moe.png)
22
+
23
+ ## Introduction
24
+
25
+ We present MoL-MoE, a Multi-view Mixture-of-Experts framework designed to predict molecular properties by integrating latent spaces derived from SMILES, SELFIES, and molecular graphs. Our approach leverages the complementary strengths of these representations to enhance predictive accuracy. Here, we evaluate the performance of MoL-MoE with a total of 12 experts, organized into 4 experts for each modality (SMILES, SELFIES, and molecular graphs).
26
+
27
+ ## Table of Contents
28
+
29
+ 1. [Getting Started](#getting-started)
30
+ 1. [Replicating Conda Environment](#replicating-conda-environment)
31
+ 2. [Demos](#demos)
32
+
33
+ ## Getting Started
34
+
35
+ **This code and environment have been tested on Nvidia V100s**
36
+
37
+ ### Replicating Conda Environment
38
+
39
+ Follow these steps to replicate our Conda environment and install the necessary libraries:
40
+
41
+ #### Create and Activate Conda Environment
42
+
43
+ ```
44
+ conda create --name mol-moe-env python=3.10
45
+ conda activate mol-moe-env
46
+ ```
47
+
48
+ #### Install Packages with Conda
49
+
50
+ ```
51
+ conda install pytorch=2.1.0 pytorch-cuda=11.8 -c pytorch -c nvidia
52
+ ```
53
+
54
+ #### Install Packages with Pip
55
+
56
+ ```
57
+ pip install -r requirements.txt
58
+ ```
59
+
60
+ ## Demos
61
+
62
+ Use the following notebooks depending of the number of activated experts `k=4` or `k=6` located at:
63
+
64
+ ```
65
+ notebooks/
66
+ ├── MoE_FM_Multi_output_BBBP_k=4.ipynb
67
+ └── MoE_FM_Multi_output_BBBP_k=6.ipynb
68
+ ```
69
+
70
+ All used datasets can be found at `data/moleculenet/`. To change the dataset, just edit in the notebook the path with the name of the dataset:
71
+
72
+ ```python
73
+ train_df = pd.read_csv("../data/moleculenet/bace/train.csv")
74
+ valid_df = pd.read_csv("../data/moleculenet/bace/valid.csv")
75
+ test_df = pd.read_csv("../data/moleculenet/bace/test.csv")
76
+ ```
77
+
78
+ For single task regression datasets, one may have to change the output dimension `output_dim` of the predictor to `1`:
79
+
80
+ ```python
81
+ net = Net(smiles_embed_dim=2048, dropout=0.2, output_dim=1)
82
+ ```
83
+
84
+ For multi-task datasets, the `output_dim` argument can be edited to the desired number of output predictions.