safetensors license:mit region:us
---
license: mit
---
# About Model:

This model is sequential classification model that will take string content and categorize the content as what kind of Lean Contract is. This is a proof-of-concept and is constantly getting updated to improve the accuracy.

## Model Details :

This is a research model, intended to show that we can use AI models to identify whether Lean principles are embedded in a contract or not

### Model Description :

This model is LoRA-finetuned on Roberta-Large sequential classifier. The training data is created from a subject matter SMEs from Civil Engineering Domain.

Label Info : {'Lean': 0,
'Misuse_by_one_party': 1,
'No_Damages_Provision_Liability_undefined': 2,
'No_timelines_Waiting': 3,
'Non_compliance_Unaddressed': 4 }

### Getting Started :

from transformers import AutoModelForSequenceClassification, AutoTokenizer

import torch

!pip install peft

from peft import PeftModel


Model_id = 'roberta-large'

model = AutoModelForSequenceClassification.from_pretrained(Model_id)

adapters_name="RameshBal/LeanContractV2"


model = PeftModel.from_pretrained(model, adapters_name)

model = model.merge_and_unload()

tokenizer = AutoTokenizer.from_pretrained(Model_id)


inputs = tokenizer("All disagreements between the contracting parties, with the exception of those explicitly denoted as finally and absolutely binding by the Contract, shall, following written notification by one party to the other, be resolved through arbitration. The arbitration process will be administered by an Engineer officer designated by the authority detailed in the tender documents.", return_tensors="pt")


with torch.no_grad(): logits = model(**inputs).logits


predicted_class_id = logits.argmax().item()


print("The Label output is : ", model.config.id2label[predicted_class_id])
