Mattra-1 · in training
How we are building a legal model for each market
Mattra-1 is being fine-tuned now. It is not a general chatbot with a legal prompt: it is a family of models, one per market, trained on local law and served from our own GPU servers. This page shows how we are building it, where we are and what it takes to run.
How Mattra-1 will answer
Every answer will pass five stations. The model will never answer from memory alone.
Question
In English, Thai or Arabic, with or without a document.
Retrieval
The current text of the relevant laws and rulings is pulled from our index.
Mattra-1
The market model writes the answer from those passages only.
Verifier
A separate model checks that each cited article exists, is in force and supports the claim.
Answer
Delivered with citations. Anything unconfirmed is removed or flagged.
Where we are
We started from an open-weight model we can host ourselves and are teaching it the law of one market at a time. Thailand and the UAE come first.
- 01Done
Choose an open-weight base
We chose a multilingual model of about 70 billion parameters for its Thai and Arabic. Open weights mean it runs entirely on our hardware.
- 02In progress
Build the legal corpus
We are collecting codes, acts, decrees, gazettes and court decisions for Thailand and the UAE, cleaned and versioned by amendment date.
- 03In progress
Continued pre-training
The base model is reading the corpus to learn legal language in Thai and Arabic: how statutes are drafted and how courts reason.
- 04In progress
Fine-tuning with lawyers
We are preparing question-and-answer examples with practising lawyers. They teach the answer format: conclusion, article cited, and "no rule found" when nothing fits.
- 05Next
One base, one adapter per market
Market knowledge will live in lightweight adapters (LoRA) on a shared base. Adding Malaysia will mean training a new adapter, not a new model.
- 06Next
Evaluation before every release
Before the pilot opens wider, each version will sit an exam of real questions per market, scored by lawyers, plus citation-accuracy tests.
Why fine-tuning and retrieval together
Each technique fixes a different failure. Only the combination fixes all four.
| Approach | Local legal language | Current law | Checked citations | Data stays private |
|---|---|---|---|---|
| General chatbot with a legal prompt | Partly | No | No | No |
| Retrieval on a public model | Partly | Yes | No | No |
| Mattra-1: fine-tuned, grounded, verified | Yes | Yes | Yes | Yes |
What it takes: memory, compute, power
A legal model is heavy because legal documents are long. These are the engineering estimates we are planning around for a 70B-class model.
Where GPU memory goes on one server
A long session is a 32,000-token context, about 50 pages of contract. Weights are stored in FP8. Working memory per token for a 70B model with grouped-query attention:
2 × 80 layers × 8 KV heads × 128 × 2 bytes ≈ 0.33 MB/token → × 32,000 tokens ≈ 10 GB
Target speed
for a typical answer with retrieval and citation checks
Adapter size
per market, so several markets share one server
Power
per server with cooling, about 96,000 kWh a year
Training jobs: plan and status
| Job | Data | Hardware | Estimated time | Status |
|---|---|---|---|---|
| Continued pre-training, per market | ~2B tokens | Rented cluster, 64× H100 | ~10 hours (~600 GPU-hours) | In progress |
| Fine-tuning a market adapter | ~50M tokens | Own server, 8× H200 | ~2 hours per run | In progress |
| Refresh after law changes | ~10M tokens | Own server, 8× H200 | Under 1 hour | Next |
| Updating the legal index | New gazette texts | Own server | Minutes, daily | Next |
Full pre-training needs more memory than one server holds, so it runs on a rented cluster with public legal texts only. Everything that will touch client data runs on our own servers.
Private by architecture
Weights on our hardware
The model and its adapters will run on servers we own, in a closed environment.
No outbound AI calls
Questions and documents never leave the environment for a third-party model.
Client data never trains the model
Training uses public law and lawyer-written examples only.
Encrypted and deletable
Documents are encrypted at rest and deleted on request.
Join the Mattra-1 pilot
We are opening the pilot to a small group of law firms and businesses in Thailand and the UAE. Leave your work email to test early versions on your own documents.
We reply within one business day.