scholarly360 commited on
Commit
851b40b
1 Parent(s): 048c677

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +227 -0
README.md ADDED
@@ -0,0 +1,227 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-sa-4.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - contracts
7
+ - legal
8
+ - document ai
9
+ ---
10
+ # Model Card for Model ID
11
+
12
+ <!-- Provide a quick summary of what the model is/does. -->
13
+
14
+ This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1).
15
+
16
+ ## Model Details
17
+
18
+ Instruction fine tuned Flan-T5 on Contracts
19
+
20
+ ### Model Description
21
+
22
+ <!-- Provide a longer summary of what this model is. -->
23
+
24
+ This model is fine-tuned using Alpaca like instructions. The base data for instruction fine-tuning is a legal corpus with fields like Titles , agreement date, party name, and addresses.
25
+
26
+ There are many type of models trained on above DataSet (DataSet will be released soon for the community)
27
+ An encoder-decoder architecture like Flan-T5 is used because the author found it to be better than a decoder only architecture given the same number of parameters.
28
+
29
+
30
+ - **Developed by:** [More Information Needed]
31
+ - **Shared by [optional]:** [More Information Needed]
32
+ - **Model type:** [More Information Needed]
33
+ - **Language(s) (NLP):** [More Information Needed]
34
+ - **License:** [More Information Needed]
35
+ - **Finetuned from model [optional]:** [More Information Needed]
36
+
37
+ ### Model Sources [optional]
38
+
39
+ <!-- Provide the basic links for the model. -->
40
+
41
+ - **Repository:** [More Information Needed]
42
+ - **Paper [optional]:** [More Information Needed]
43
+ - **Demo [optional]:** [More Information Needed]
44
+
45
+ ## Uses
46
+
47
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
48
+ Just like any ChatGPT equivalent model (For Contracts Domain)
49
+
50
+ ### Direct Use
51
+
52
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
53
+
54
+ ### Downstream Use [optional]
55
+
56
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
57
+
58
+
59
+ ### Out-of-Scope Use
60
+
61
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
62
+
63
+
64
+ ## Bias, Risks, and Limitations
65
+
66
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
67
+
68
+ ### Recommendations
69
+
70
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
71
+
72
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
73
+
74
+ ## How to Get Started with the Model
75
+
76
+ Use the code below to get started with the model.
77
+
78
+ ```python
79
+ >>> from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
80
+ >>> model_name = "scholarly360/contracts-extraction-flan-t5-large"
81
+ >>> model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
82
+ >>> tokenizer = AutoTokenizer.from_pretrained(model_name)
83
+ >>> ### Example 1
84
+ >>> prompt = """ what kind of clause is "Neither Party shall be liable to the other for any abatement of Charges, delay or non-performance of its obligations under the Services Agreement arising from any cause or causes beyond its reasonable control (a Force Majeure Event) including, without limitation """
85
+ >>> inputs = tokenizer(prompt, return_tensors="pt")
86
+ >>> outputs = model.generate(**inputs)
87
+ >>> print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
88
+ >>> ### Example 2
89
+ >>> prompt = """ what is agreement date in 'This COLLABORATION AGREEMENT (Agreement) dated November 14, 2002, is made by and between ZZZ, INC., a Delaware corporation' """"
90
+ >>> inputs = tokenizer(prompt, return_tensors="pt")
91
+ >>> outputs = model.generate(**inputs)
92
+ >>> print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
93
+ >>> ### Example 3
94
+ >>> prompt = """ ### Instruction: \n\n what is agreement date ### Input: \n\n This COLLABORATION AGREEMENT (Agreement) dated November 14, 2002, is made by and between ZZZ, INC., a Delaware corporation """"
95
+ >>> inputs = tokenizer(prompt, return_tensors="pt")
96
+ >>> outputs = model.generate(**inputs)
97
+ >>> print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
98
+ ```
99
+
100
+
101
+ [More Information Needed]
102
+
103
+ ## Training Details
104
+
105
+ ### Training Data
106
+
107
+ <!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
108
+ DataSet will be released soon for the community
109
+
110
+ ### Training Procedure
111
+
112
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
113
+
114
+ #### Preprocessing [optional]
115
+
116
+ [More Information Needed]
117
+
118
+
119
+ #### Training Hyperparameters
120
+
121
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
122
+
123
+ #### Speeds, Sizes, Times [optional]
124
+
125
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
126
+
127
+ [More Information Needed]
128
+
129
+ ## Evaluation
130
+
131
+ <!-- This section describes the evaluation protocols and provides the results. -->
132
+
133
+ ### Testing Data, Factors & Metrics
134
+
135
+ #### Testing Data
136
+
137
+ <!-- This should link to a Data Card if possible. -->
138
+
139
+ [More Information Needed]
140
+
141
+ #### Factors
142
+
143
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
144
+
145
+ [More Information Needed]
146
+
147
+ #### Metrics
148
+
149
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
150
+
151
+ [More Information Needed]
152
+
153
+ ### Results
154
+
155
+ [More Information Needed]
156
+
157
+ #### Summary
158
+
159
+
160
+
161
+ ## Model Examination [optional]
162
+
163
+ <!-- Relevant interpretability work for the model goes here -->
164
+
165
+ [More Information Needed]
166
+
167
+ ## Environmental Impact
168
+
169
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
170
+
171
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
172
+
173
+ - **Hardware Type:** [More Information Needed]
174
+ - **Hours used:** [More Information Needed]
175
+ - **Cloud Provider:** [More Information Needed]
176
+ - **Compute Region:** [More Information Needed]
177
+ - **Carbon Emitted:** [More Information Needed]
178
+
179
+ ## Technical Specifications [optional]
180
+
181
+ ### Model Architecture and Objective
182
+
183
+ [More Information Needed]
184
+
185
+ ### Compute Infrastructure
186
+
187
+ [More Information Needed]
188
+
189
+ #### Hardware
190
+
191
+ [More Information Needed]
192
+
193
+ #### Software
194
+
195
+ [More Information Needed]
196
+
197
+ ## Citation [optional]
198
+
199
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
200
+
201
+ **BibTeX:**
202
+
203
+ [More Information Needed]
204
+
205
+ **APA:**
206
+
207
+ [More Information Needed]
208
+
209
+ ## Glossary [optional]
210
+
211
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
212
+
213
+ [More Information Needed]
214
+
215
+ ## More Information [optional]
216
+
217
+ [More Information Needed]
218
+
219
+ ## Model Card Authors [optional]
220
+
221
+ [More Information Needed]
222
+
223
+ ## Model Card Contact
224
+
225
+ https://github.com/scholarly360
226
+
227
+