sagawa commited on
Commit
fa647ba
1 Parent(s): 75d39b9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +79 -2
README.md CHANGED
@@ -1,6 +1,83 @@
1
  ---
 
 
2
  license: mit
 
 
 
 
 
 
 
 
3
  ---
4
- # ZINC-t5-productpredicition
5
 
6
- We finetuned [ZINC-t5](https://huggingface.co/sagawa/ZINC-t5) to predict products, and you can use the demo [here](https://huggingface.co/spaces/sagawa/predictproduct-t5).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
  license: mit
5
+ tags:
6
+ - chemistry
7
+ - SMILES
8
+ - product
9
+ datasets:
10
+ - ORD
11
+ metrics:
12
+ - accuracy
13
  ---
 
14
 
15
+ # Model Card for ReactionT5-product-prediction
16
+
17
+ This is a ReactionT5 pre-trained to predict the products of reactions. You can use the demo [here](https://huggingface.co/spaces/sagawa/predictproduct-t5).
18
+
19
+ ## Model Details
20
+
21
+ <!-- Provide a longer summary of what this model is. -->
22
+
23
+
24
+ ### Model Sources
25
+
26
+ <!-- Provide the basic links for the model. -->
27
+
28
+ - **Repository:** https://github.com/sagawatatsuya/ReactionT5
29
+ - **Paper:** {{ paper | default("[More Information Needed]", true)}}
30
+ - **Demo:** https://huggingface.co/spaces/sagawa/predictproduct-t5
31
+
32
+ ## Uses
33
+
34
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
35
+
36
+ ## How to Get Started with the Model
37
+
38
+ Download files and use the code below to get started with the model.
39
+
40
+ ```python
41
+ from transformers import AutoTokenizer, T5ForConditionalGeneration
42
+
43
+ tokenizer = AutoTokenizer.from_pretrained('sagawa/ReactionT5-product-prediction')
44
+ inp = tokenizer('REACTANT:COC(=O)C1=CCCN(C)C1.O.[Al+3].[H-].[Li+].[Na+].[OH-]REAGENT:C1CCOC1', return_tensors='pt')
45
+ model = T5ForConditionalGeneration.from_pretrained('sagawa/ReactionT5-product-prediction')
46
+ output = model.generate(**inp, min_length=6, max_length=109, num_beams=1, num_return_sequences=1, return_dict_in_generate=True, output_scores=True)
47
+ output = tokenizer.decode(output['sequences'][0], skip_special_tokens=True).replace(' ', '').rstrip('.')
48
+ output # 'O=S(=O)([O-])[O-].O=S(=O)([O-])[O-].O=S(=O)([O-])[O-].[Cr+3].[Cr+3]'
49
+ ```
50
+
51
+ ## Training Details
52
+
53
+ ### Training Procedure
54
+
55
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
56
+ We used Open Reaction Database (ORD) dataset for model training.
57
+ Following is the command used for training. For more information, please refer to the paper and GitHub repository.
58
+
59
+ ```python
60
+ python train.py \
61
+ --epochs=100 \
62
+ --batch_size=32 \
63
+ --data_path='../data/all_ord_reaction_uniq_with_attr_v3.csv' \
64
+ --use_reconstructed_data \
65
+ --pretrained_model_name_or_path='sagawa/CompoundT5'
66
+ ```
67
+
68
+ ### Results
69
+
70
+
71
+
72
+ ## Citation [optional]
73
+
74
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
75
+
76
+
77
+ ## Model Card Authors [optional]
78
+
79
+ {{ model_card_authors | default("[More Information Needed]", true)}}
80
+
81
+ ## Model Card Contact
82
+
83
+ {{ model_card_contact | default("[More Information Needed]", true)}}