aitrainingdatabroker's picture
Add README.md
76afb8e verified
|
Raw History Blame Contribute Delete
3.43 kB
metadata
license: apache-2.0
language:
  - en
library_name: transformers
pipeline_tag: text-classification
base_model: distilroberta-base
datasets:
  - aitrainingdatabroker/synthetic-contract-clauses-by-type-and-risk
tags:
  - contracts
  - legal-nlp
  - clause-classification
  - data-licensing
  - synthetic

Contract Clause Type Classifier

Reads one data license clause and names its type out of eight: exclusivity, term and renewal, payment, confidentiality, IP and ownership, indemnity, audit and deletion, or termination.

Every name, number and sentence it was trained on is made up. Nothing comes from a real person, customer or business.

Related tool: contract-clause-watchlist (a Space that runs in your browser).

Why it exists

A data license is easier to review when each clause is filed under its type. This model files clauses so a person can compare, say, every indemnity across offers.

Use it

from transformers import pipeline

classify = pipeline("text-classification", model="aitrainingdatabroker/contract-clause-type-classifier", top_k=3)
print(classify("The Licensee may keep the Dataset after the term and need not delete it."))

How it was trained

Fine-tuned from distilroberta-base for 6 epochs on one RTX 3070. Training data: 376 rows from synthetic-contract-clauses-by-type-and-risk, all invented, with test rows built from templates the model never saw in training. The scripts that built the data and trained the model are in source/; the full scores are in scores.json.

Test scores

On 186 held-out rows: accuracy 0.726, macro F1 0.711.

Label F1 Count
audit_and_deletion 0.533 24
confidentiality 1.0 22
exclusivity 0.683 23
indemnity 0.96 24
ip_and_ownership 0.9 22
payment 0.657 24
term_and_renewal 0.957 24
termination 0.0 23

Limits

  • Trained only on invented text from templates, with test sentences built from templates it never saw. Real text varies far more.
  • Real clauses are longer and mix topics; a clause with two ideas gets one label.
  • This model is not legal advice and not a certification. A person should review its output before anything is shared or decided, and your counsel decides what a rule requires.

Read more

License and credit

Apache 2.0. Please credit AI Training Data Broker and link to https://aitrainingdatabroker.com/ when you share or build on it.

About

AI Training Data Broker is a broker and technical advisor for companies that sell or license their data to AI labs. It guides the technical side, including export, format, de-identification and compliance, and publishes free guides, checklists and tools.