onyx



Onyx: a 70B model that reads the document before you sign it

Legal documents are not hard to read by accident. Denial letters, indemnification clauses, and CPT-coded medical bills are written to be technically correct and practically unreadable, and the gap between those two things is where people lose money.

Onyx closes that gap. Paste in the document, get back what it actually says.

It reads the document, not keywords

Onyx is a 70-billion-parameter model fine-tuned on legal text. Give it a contract, a court opinion, an insurance denial, or a hospital bill and it will:

  • Identify the document type, the key clauses, and what you're actually obligated to do

  • Flag risks, ambiguities, and terms written in the other party's favor

  • Cite the statutes that apply — USC, CFR, ECHR, ICD-10, CPT

  • Recommend concrete next steps

  • Summarize the whole thing in plain English

And when it doesn't recognize something, it says so instead of inventing an answer. That was a training objective, not an afterthought.

Screenshot: a contract clause pasted in, with the risk flags and statute citations returned

What you can throw at it

Category Examples Court records SCOTUS opinions, federal decisions, case holdings Contracts Employment, NDA, license, merger, supply, indemnification Medical bills CPT/ICD-10 coded bills, EOBs, dispute letters Insurance Policy analysis, denial letters, coverage disputes, appeals Human rights ECtHR cases, ECHR article analysis EU regulation EurLex directives, compliance questions Legislation US Congressional bills, federal regulations Privacy / ToS GDPR and CCPA compliance, terms-of-service red flags

Trained on real documents, not just synthetic ones

Most legal AI demos are a general-purpose model with a clever prompt. Onyx is an actual fine-tune, done in two phases.

Phase one was synthetic: legal Q&A covering contract disputes, billing errors, insurance denials, court procedure, and regulatory compliance, with realistic statute and medical code references throughout.

Phase two was 4,600 real documents — 1,800 Supreme Court opinions and 1,500 SEC-filed contract clauses from LexGLUE, 500 European Court of Human Rights cases, 300 EU regulatory documents, 300 insurance Q&A pairs, and 200 real CMS medical billing disputes.

The result: 83.2% task accuracy, 0.7236 eval loss. Trained on a GH200 96GB in 2 epochs over 260 steps.

Screenshot: the training run / eval results

Open weights. Run it yourself.

Onyx ships as a LoRA adapter on top of Llama 3.3 70B Instruct, published openly on Hugging Face. Rank 64, alpha 128, all attention and MLP projections targeted, 4-bit NF4 quantization. See the example code snippet

At 4-bit you need 40GB of VRAM — an A100 40GB, two A40s, or a GH200. With CPU offload it will run on 24GB, slower. Nothing proprietary, nothing phoning home. Your documents stay on your machine.

What's next

v2 is a 33,500-example dataset — CUAD, CourtListener, MultiLexSum, BillSum, ContractNLI — targeting 90%+ accuracy. After that, fine-tuning on your own case documents, and a merged GGUF export so it runs under llama.cpp.

One thing to be clear about

Onyx is not a lawyer and does not give legal advice. It's a document analysis tool. 83.2% is strong for reading comprehension and weak for anything you'd bet a case on, so verify critical findings independently. Statutes and case law change; the training data has a cutoff. Coverage is strongest on US federal law and EU regulation, and thin on state law and other jurisdictions.

For anything that matters, talk to a licensed attorney. Onyx is there to make sure you know what to ask them.

Get it

The adapter is free and open on Hugging Face under the Llama 3.3 Community License.

Download Onyx → huggingface.co/advaitshewale/onyx-legal-70b-adapter

Want it hosted, or fine-tuned on your own documents? Contact us.

Previous
Previous

dispatched-code

Next
Next

Bricklayer Editor