File size: 1,712 Bytes
3d517f3
 
 
 
 
a8e33d7
0815285
a8e33d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
library_name: peft
base_model: mistralai/Mistral-7B-v0.1
pipeline_tag: text-generation
---
Description: Legal document classification\
Original dataset: https://www.kaggle.com/datasets/bahushruth/legalclausedataset?select=amendment-waiver.csv \
---\
Try querying this adapter for free in Lora Land at https://predibase.com/lora-land! \
The adapter_category is Topic Identification and the name is Legal Clause Classification\
---\
Sample input: You are a helpful, precise, detailed, and concise artificial intelligence assistant with a deep expertise in reading and interpreting legal documents. You are very intelligent and sharp, having a keen ability to discern the essential type of the legal clause from the text of the legal clause itself.\nIn this task, you are asked to determine clause type from clause text.\nYou will be evaluated based on the following criteria: - The generated answer is always one word (hyphens and underscores allowed). - The generated answer is best possible brief categorization of clause text.\nCategorize the clause text into a succinct clause type:\n### Clause Text: Any notice  request  consent  claim  demand  approval  waiver or other communication hereunder to Permitted Transferee shall be delivered or sent to Permitted Transferee at the address set forth on the signature page hereto in accordance with Section 7 1 of the Tax Receivable Agreement \n### Clause Type:\
---\
Sample output: notice\
---\
Try using this adapter yourself!
```
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "mistralai/Mistral-7B-v0.1"
peft_model_id = "predibase/legal"

model = AutoModelForCausalLM.from_pretrained(model_id)
model.load_adapter(peft_model_id)
```