ZJU-Fangyin commited on
Commit
5060c28
1 Parent(s): 1f48e4e

Upload 2 files

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. README.md +128 -0
  3. logo.png +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ logo.png filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,131 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ tags:
4
+ - chemistry
5
+ - biology
6
+ - molecule
7
+ - instructions
8
  ---
9
+
10
+
11
+ This repo contains a low-rank adapter for [LLaMA-7b](https://huggingface.co/decapoda-research/llama-7b-hf), trained on the 🔬 **molecule-oriented instructions** from the 🧪 [Mol-Instructions](https://huggingface.co/datasets/zjunlp/Mol-Instructions) dataset.
12
+
13
+
14
+ Instructions for running it can be found at https://github.com/zjunlp/Mol-Instructions.
15
+
16
+ > Please refer to our [paper](https://arxiv.org/abs/2306.08018) for more details.
17
+
18
+
19
+ ![image.png](logo.png)
20
+
21
+ <h3> 🔬 Tasks</h3>
22
+
23
+
24
+ <details>
25
+ <summary><b>Molecule description generation</b></summary>
26
+
27
+ - *Please give me some details about this molecule:*
28
+ [C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][=Branch1][C][=O][O][C@H1][Branch2][Ring1][=Branch1][C][O][C][=Branch1][C][=O][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][O][P][=Branch1][C][=O][Branch1][C][O][O][C][C@@H1][Branch1][=Branch1][C][=Branch1][C][=O][O][N]
29
+
30
+ ```
31
+ The molecule is a 3-sn-phosphatidyl-L-serine in which the phosphatidyl acyl groups at positions 1 and 2 are specified as stearoyl and arachidonoyl respectively.
32
+ It is functionally related to an arachidonic acid and an octadecanoic acid.
33
+ ```
34
+ </details>
35
+
36
+ <details>
37
+ <summary><b>Description-guided molecule design</b></summary>
38
+
39
+ - *Create a molecule with the structure as the one described:*
40
+ The molecule is a primary arylamine in which an amino functional group is substituted for one of the benzene hydrogens. It is a primary arylamine and a member of anilines.
41
+
42
+ ```
43
+ [N][C][=C][C][=C][C][=C][Ring1][=Branch1]
44
+ ```
45
+ </details>
46
+
47
+ <details>
48
+ <summary><b>Forward reaction prediction</b></summary>
49
+
50
+ - *With the provided reactants and reagents, propose a potential product:*
51
+ [O][=N+1][Branch1][C][O-1][C][=C][N][=C][Branch1][C][Cl][C][Branch1][C][I][=C][Ring1][Branch2].[Fe]
52
+
53
+ ```
54
+ [N][C][=C][N][=C][Branch1][C][Cl][C][Branch1][C][I][=C][Ring1][Branch2]
55
+ ```
56
+ </details>
57
+
58
+ <details>
59
+ <summary><b>Retrosynthesis</b></summary>
60
+
61
+ - *Please suggest potential reactants used in the synthesis of the provided product:*
62
+ [C][=C][C][C][N][C][=Branch1][C][=O][O][C][Branch1][C][C][Branch1][C][C][C]
63
+
64
+ ```
65
+ [C][=C][C][C][N].[C][C][Branch1][C][C][Branch1][C][C][O][C][=Branch1][C][=O][O][C][=Branch1][C][=O][O][C][Branch1][C][C][Branch1][C][C][C]
66
+ ```
67
+ </details>
68
+
69
+
70
+ <details>
71
+ <summary><b>Reagent prediction</b></summary>
72
+
73
+ - *Please provide possible reagents based on the following chemical reaction:*
74
+ [C][C][=C][C][=C][Branch1][C][N][C][=N][Ring1][#Branch1].[O][=C][Branch1][C][Cl][C][Cl]>>[C][C][=C][C][=C][Branch1][Branch2][N][C][=Branch1][C][=O][C][Cl][C][=N][Ring1][O]
75
+
76
+ ```
77
+ [C][C][C][O][C][Ring1][Branch1].[C][C][N][Branch1][Ring1][C][C][C][C].[O]
78
+ ```
79
+ </details>
80
+
81
+ <details>
82
+ <summary><b>Property prediction</b></summary>
83
+
84
+ - *Please provide the HOMO energy value for this molecule:*
85
+ [C][C][O][C][C][Branch1][C][C][C][Branch1][C][C][C]
86
+
87
+ ```
88
+ -0.2482
89
+ ```
90
+ </details>
91
+
92
+
93
+ <h3> 📝 Demo</h3>
94
+
95
+ As illustrated in [our repository](https://github.com/zjunlp/Mol-Instructions/tree/main/demo), we provide an example to perform generation.
96
+
97
+ ```shell
98
+ >> python generate.py \
99
+ --CLI True \
100
+ --protein False\
101
+ --load_8bit \
102
+ --base_model $BASE_MODEL_PATH \
103
+ --lora_weights $FINETUNED_MODEL_PATH \
104
+ ```
105
+
106
+ Please download [llama-7b-hf](https://huggingface.co/decapoda-research/llama-7b-hf/tree/main) to obtain the pre-training weights of LLaMA-7B, refine the `--base_model` to point towards the location where the model weights are saved.
107
+
108
+ For model fine-tuned on **molecule-oriented** instructions, set `$FINETUNED_MODEL_PATH` to `'zjunlp/llama-molinst-molecule-7b'`.
109
+
110
+
111
+
112
+
113
+ <h3> 🚨 Limitations</h3>
114
+
115
+ The current state of the model, obtained via instruction tuning, is a preliminary demonstration. Its capacity to handle real-world, production-grade tasks remains limited.
116
+
117
+ <h3> 📚 References</h3>
118
+ If you use our repository, please cite the following related paper:
119
+
120
+ ```
121
+ @article{molinst,
122
+ title={Mol-Instructions: A Large-Scale Biomolecular Instruction Dataset for Large Language Models},
123
+ author={Fang, Yin and Liang, Xiaozhuan and Zhang, Ningyu and Liu, Kangwei and Huang, Rui and Chen, Zhuo and Fan, Xiaohui and Chen, Huajun},
124
+ journal={arXiv preprint arXiv:2306.08018},
125
+ year={2023}
126
+ }
127
+ ```
128
+
129
+ <h3> 🫱🏻‍🫲🏾 Acknowledgements</h3>
130
+
131
+ We appreciate [LLaMA](https://github.com/facebookresearch/llama), [Huggingface Transformers Llama](https://github.com/huggingface/transformers/tree/main/src/transformers/models/llama), [Alpaca](https://crfm.stanford.edu/2023/03/13/alpaca.html), [Alpaca-LoRA](https://github.com/tloen/alpaca-lora), [Chatbot Service](https://github.com/deep-diver/LLM-As-Chatbot) and many other related works for their open-source contributions.
logo.png ADDED

Git LFS Details

  • SHA256: 176864dbd6919239f63340c17cf2e683175d290a0ab6faf713e09d968d534691
  • Pointer size: 132 Bytes
  • Size of remote file: 1.28 MB