File size: 4,707 Bytes
7493b45 902c773 00a3927 673f0bf 7493b45 902c773 7493b45 902c773 258ab9f 7493b45 902c773 12feafc 902c773 50eba8a fe0c426 50eba8a 902c773 258ab9f 902c773 258ab9f 902c773 258ab9f 902c773 258ab9f 902c773 50617d6 15e9bb0 50617d6 15e9bb0 50617d6 15e9bb0 50617d6 258ab9f 902c773 8d08313 902c773 673f0bf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
---
language:
- en
library_name: transformers
license: cc-by-nc-4.0
datasets:
- NebulaSense/Legal_Clause_Instructions
---
# Model Card for ContractAssist model
<!-- Provide a quick summary of what the model is/does. [Optional] -->
Instruction tuned FlanT5-XXL on Legal Clauses data generated via ChatGPT. The model is capable for generating and/or modifying the Legal Clauses.
# Model Details
## Model Description
<!-- Provide a longer summary of what this model is/does. -->
- **Developed by:** Jaykumar Kasundra, Shreyans Dhankhar
- **Model type:** Language model
- **Language(s) (NLP):** en
- **License:** other
- **Resources for more information:**
- [Associated Paper](<Add Link>) ----> Details to be added soon!!
# Uses
</details>
### Prompt
<details>
<summary> Click to expand </summary>
```python
{
"prompt_input": (
"Below is an instruction that describes a task, paired with an input that provides further context. "
"Write a response that appropriately completes the request.\n\n"
"### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:\n"
),
"prompt_no_input": (
"Below is an instruction that describes a task. "
"Write a response that appropriately completes the request.\n\n"
"### Instruction:\n{instruction}\n\n### Response:\n"
),
}
```
</details>
### Running the model on a GPU in 8bit
<details>
<summary> Click to expand </summary>
```python
# pip install accelerate peft bitsandbytes
import torch
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
from peft import PeftModel,PeftConfig
peft_model_id = 'NebulaSense/ContractAssist'
peft_config = PeftConfig.from_pretrained(peft_model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(peft_config.base_model_name_or_path, device_map="auto",load_in_8bit=True)
tokenizer = AutoTokenizer.from_pretrained(peft_config.base_model_name_or_path)
model = PeftModel.from_pretrained(model, peft_model_id)
model.eval()
```
</details>
### Example
<details>
<summary> Click to expand </summary>
```text
### Instruction:
Create a legal exhibit for the list of confidential information for Non-Disclosure Agreement (NDA) in Employment industry
### Input:
### Response:
Exhibit A: List of Confidential Information
The following information is considered confidential and proprietary to the Company:
1. Trade secrets, including but not limited to, formulas, patterns, compilations, programs, devices, methods, techniques, and processes, and any other information that is not generally known to the public.
2. Customer lists, including personal information, financial information, and other information related to the customer's business.
3. Marketing and sales strategies, including customer preferences, buying habits, and sales forecasts.
4. Financial information, including budgets, forecasts, and financial statements.
5. Intellectual property, including patents, trademarks, copyrights, trade names, and service marks.
6. Any other information designated as confidential by the Company in writing.
The Employee agrees to maintain the confidentiality of all such information and not to disclose it to any third party without the prior written consent of the Company.
The employee further agrees not to use any such information for any purpose other than as necessary to perform their duties for the Company, except as required by law.
This Exhibited List of Information is incorporated into and made a part of the Non-Disclosure Agreement between the Company and the Employee.
```
</details>
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
## Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
<!-- If the user enters content, print that. If not, but they enter a task in the list, use that. If neither, say "more info needed." -->
The model can directly be used to generate/modify legal clauses and help assist in drafting contracts. It likely works best on english language.
## Compute Infrastructure
Amazon SageMaker Training Job.
### Hardware
1 x 24GB NVIDIA A10G
### Software
Transformers, PEFT, BitsandBytes
# Citation
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
**BibTeX:** ---> Details to be added soon!!
# Model Card Authors
<!-- This section provides another layer of transparency and accountability. Whose views is this model card representing? How many voices were included in its construction? Etc. -->
Jaykumar Kasundra, Shreyans Dhankhar |