scholarly360 commited on
Commit
8b40651
1 Parent(s): 675973c

First Commit

Browse files
Files changed (1) hide show
  1. README.md +235 -0
README.md ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ ### Model Description
19
+
20
+ <!-- Provide a longer summary of what this model is. -->
21
+
22
+ This model is fine-tuned using Alpaca like instructions. The base data for instruction fine-tuning was a legal corpus with fields like agreement date, party name, and addresses.
23
+
24
+ An encoder-decoder architecture like flag T5 is used because the author found it to be better than a decoder only architecture given the same number of parameters.
25
+
26
+
27
+ - **Developed by:** [More Information Needed]
28
+ - **Shared by [optional]:** [More Information Needed]
29
+ - **Model type:** [More Information Needed]
30
+ - **Language(s) (NLP):** [More Information Needed]
31
+ - **License:** [More Information Needed]
32
+ - **Finetuned from model [optional]:** [More Information Needed]
33
+
34
+ ### Model Sources [optional]
35
+
36
+ <!-- Provide the basic links for the model. -->
37
+
38
+ - **Repository:** [More Information Needed]
39
+ - **Paper [optional]:** [More Information Needed]
40
+ - **Demo [optional]:** [More Information Needed]
41
+
42
+ ## Uses
43
+
44
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
45
+
46
+ ### Direct Use
47
+
48
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Downstream Use [optional]
53
+
54
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
55
+
56
+ [More Information Needed]
57
+
58
+ ### Out-of-Scope Use
59
+
60
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ## Bias, Risks, and Limitations
65
+
66
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
67
+
68
+ [More Information Needed]
69
+
70
+ ### Recommendations
71
+
72
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
73
+
74
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
75
+
76
+ ## How to Get Started with the Model
77
+
78
+ Use the code below to get started with the model.
79
+
80
+ from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
81
+ model_name = "scholarly360/contracts-extraction-flan-t5-base"
82
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
83
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
84
+
85
+ ##1
86
+ prompt = """
87
+ 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"
88
+ """
89
+ inputs = tokenizer(prompt, return_tensors="pt")
90
+ outputs = model.generate(**inputs)
91
+ print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
92
+ ##2
93
+ prompt = """
94
+ what are the multiple parties in "This COLLABORATION AGREEMENT (“Agreement”) dated November 14, 2002, is made by and between ZZZ, INC., a Delaware corporation, and having its principal office at 901 Gateway Boulevard, South San Francisco, California 9999 (ZZZZ), and MAJJO GROUP LIMITED, a United Kingdom corporation, and having its principal office at Majjo House, Berkeley Avenue, Greenford, Middlesex, UB6 0NN, United Kingdom (MAJJ). Both may be referred to as a “Party” or together, the “Parties”."
95
+ """
96
+ inputs = tokenizer(prompt, return_tensors="pt")
97
+ outputs = model.generate(**inputs)
98
+ print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
99
+ ##3
100
+ prompt = """
101
+ what is agreement date in "This COLLABORATION AGREEMENT (“Agreement”) dated November 14, 2002, is made by and between ZZZ, INC., a Delaware corporation"
102
+ """
103
+
104
+ inputs = tokenizer(prompt, return_tensors="pt")
105
+ outputs = model.generate(**inputs)
106
+ print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
107
+
108
+ [More Information Needed]
109
+
110
+ ## Training Details
111
+
112
+ ### Training Data
113
+
114
+ <!-- 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. -->
115
+
116
+ [More Information Needed]
117
+
118
+ ### Training Procedure
119
+
120
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
121
+
122
+ #### Preprocessing [optional]
123
+
124
+ [More Information Needed]
125
+
126
+
127
+ #### Training Hyperparameters
128
+
129
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
130
+
131
+ #### Speeds, Sizes, Times [optional]
132
+
133
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
134
+
135
+ [More Information Needed]
136
+
137
+ ## Evaluation
138
+
139
+ <!-- This section describes the evaluation protocols and provides the results. -->
140
+
141
+ ### Testing Data, Factors & Metrics
142
+
143
+ #### Testing Data
144
+
145
+ <!-- This should link to a Data Card if possible. -->
146
+
147
+ [More Information Needed]
148
+
149
+ #### Factors
150
+
151
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
152
+
153
+ [More Information Needed]
154
+
155
+ #### Metrics
156
+
157
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
158
+
159
+ [More Information Needed]
160
+
161
+ ### Results
162
+
163
+ [More Information Needed]
164
+
165
+ #### Summary
166
+
167
+
168
+
169
+ ## Model Examination [optional]
170
+
171
+ <!-- Relevant interpretability work for the model goes here -->
172
+
173
+ [More Information Needed]
174
+
175
+ ## Environmental Impact
176
+
177
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
178
+
179
+ 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).
180
+
181
+ - **Hardware Type:** [More Information Needed]
182
+ - **Hours used:** [More Information Needed]
183
+ - **Cloud Provider:** [More Information Needed]
184
+ - **Compute Region:** [More Information Needed]
185
+ - **Carbon Emitted:** [More Information Needed]
186
+
187
+ ## Technical Specifications [optional]
188
+
189
+ ### Model Architecture and Objective
190
+
191
+ [More Information Needed]
192
+
193
+ ### Compute Infrastructure
194
+
195
+ [More Information Needed]
196
+
197
+ #### Hardware
198
+
199
+ [More Information Needed]
200
+
201
+ #### Software
202
+
203
+ [More Information Needed]
204
+
205
+ ## Citation [optional]
206
+
207
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
208
+
209
+ **BibTeX:**
210
+
211
+ [More Information Needed]
212
+
213
+ **APA:**
214
+
215
+ [More Information Needed]
216
+
217
+ ## Glossary [optional]
218
+
219
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
220
+
221
+ [More Information Needed]
222
+
223
+ ## More Information [optional]
224
+
225
+ [More Information Needed]
226
+
227
+ ## Model Card Authors [optional]
228
+
229
+ [More Information Needed]
230
+
231
+ ## Model Card Contact
232
+
233
+ https://github.com/scholarly360
234
+
235
+