offline ai
Local and Offline AI for Confidential Contracts (Ollama, LM Studio)
If a contract is genuinely confidential, privileged, or under an NDA that names "third parties," the safest AI setup is one where the document never leaves your own computer. That is what running an AI model locally means: no upload, no account, no server on the other end. This guide is published by Adira, which sells contract management software, so we have a commercial reason to want you comfortable with AI-assisted contract work generally. Nothing below needs Adira. Everything runs with free, open-source tools on a laptop you already own.
The tools that make this possible are Ollama, LM Studio, and GPT4All. Each lets you download an open-weight model, Llama, Mistral, or Qwen, and run it entirely on your own hardware. Once the model is downloaded, you can disconnect from the internet completely and it still works, and later on there is a test you can run yourself to prove it.
Why "the document never leaves your machine" actually matters here
Two legal ideas are at stake here, and they are easy to confuse.
The first is legal professional privilege, protecting communications between a lawyer and client. Section 132 of the Bharatiya Sakshya Adhiniyam, 2023 (BSA), which replaced the Indian Evidence Act, 1872 on 1 July 2024, states:
"No advocate shall at any time be permitted, unless with his client's express consent, to disclose any communication made to him in the course and for the purpose of his service as such advocate, by or on behalf of his client, or to state the contents or condition of any document with which he has become acquainted in the course and for the purpose of his professional service, or to disclose any advice given by him to his client in the course and for the purpose of such service." Source: Section 132, Bharatiya Sakshya Adhiniyam, 2023 (Indian Kanoon)
This is narrow. It protects what you tell your advocate, not every contract your business handles. A commercial NDA reviewed by an in-house team, with no advocate involved, generally is not privileged at all under this section.
The second, broader idea is ordinary contractual and trade-secret confidentiality, which covers far more of what actually crosses your desk. Most NDAs and MSAs define "Confidential Information" and restrict disclosure "to any third party." Whether pasting a clause into a cloud AI tool counts as disclosing it to a third party is genuinely unsettled; most NDAs were drafted before generative AI existed and few say so either way. Indian courts have also been narrow about what counts as protectable confidential or trade-secret information in the first place. In American Express Bank Ltd v Ms Priya Puri, decided by the Delhi High Court on 24 May 2006 (CS(OS) No. 1442 of 2005), the court refused to treat customer contact details as a trade secret and held that information already accessible or not genuinely secret does not get that protection merely because a contract calls it confidential. The lesson that carries over: once information sits on a third-party server, that fact alone can weaken an argument that you treated it as secret in the first place, whatever the AI vendor's privacy policy promises to do with it afterward.
A locally run model sidesteps both problems at once. Nothing is disclosed to anyone, so there is no third party to argue about, and no server-side copy exists to explain away later.
Step by step: setting up a local AI model
You do not need to be technical to do this. Pick one of the three tools below based on how much you want to see under the hood.
Ollama, best if you want the most control. Download the installer for Windows, Mac, or Linux from ollama.com. Open a terminal and pull a model: ollama pull llama3.1:8b or ollama pull mistral:7b for general use, ollama pull qwen2.5:14b for denser text if your machine can handle it. Start a chat with ollama run llama3.1:8b, then paste the contract text into the prompt along with your instructions.
LM Studio, best for a visual chat window with no terminal. Download LM Studio for Windows, Mac, or Linux from lmstudio.ai. Use its built-in model search to download a GGUF build of Llama 3.1 8B Instruct, Mistral 7B Instruct, or Qwen2.5 14B Instruct, load it in the Chat tab, then paste the contract text into the chat box (or use the document-attach option, if your version has one) and add your prompt.
GPT4All, the simplest single installer, with a "chat with your documents" feature. Download it from nomic.ai/gpt4all. Development on this project has slowed noticeably since early 2025, so treat it as a fallback if Ollama or LM Studio do not suit your machine. Download a model from the in-app list, Llama or Mistral both work, then use the LocalDocs feature to add your contract as a PDF or Word file and ask questions that reference it directly, with citations back to the source text.
A prompt that works on all three. Be specific: "Review this contract clause by clause. For each clause, state what it says in plain English, and quote the exact sentence you are referring to. Flag anything unusual for this contract type. If a clause you would expect (governing law, termination, liability cap) is missing, say so; do not invent one." Local models hallucinate at least as readily as cloud ones, so demanding exact quotes matters just as much here as with ChatGPT or Claude.
Which model, and what hardware you actually need
Llama (Meta), Mistral, and Qwen (Alibaba) are the three open-weight model families worth using here, all free to download and run without an account. For a quantised (compressed) build, the kind Ollama and LM Studio use by default: an 8B model (Llama 3.1 8B, Mistral 7B) needs about 8 to 10 GB of RAM on CPU alone and runs fine on most laptops from the last five years; a 14B model (Qwen2.5 14B) wants 16 GB or more and holds onto detail across a long document noticeably better; anything above 30B needs a dedicated GPU with 24 GB or more of VRAM to run at a usable speed. Bigger is not always better: a well-prompted 8B model is often enough for a first structural pass, summarising, flagging missing clauses, on ordinary hardware.
The comparison
| Option | Fully offline? | Hardware needed | Model quality vs GPT-4-class | Setup difficulty | Best for |
|---|---|---|---|---|---|
| Ollama + Llama 3.1 8B / Mistral 7B | Yes, once downloaded | 8-10 GB RAM, any recent laptop | Noticeably below; solid for summarising and flagging | Low-medium; one terminal command | Comfortable with a command line |
| Ollama / LM Studio + Qwen2.5 14B | Yes, once downloaded | 16 GB+ RAM or a mid-range GPU | Closer, still behind on drafting judgement | Medium | Longer or denser contracts |
| LM Studio (GUI, any model above) | Yes, once downloaded | Same as the model chosen | Same as the model chosen | Low; point-and-click | Non-technical users, want a chat window |
| GPT4All + LocalDocs | Yes, once downloaded | 8-16 GB RAM depending on model | Below GPT-4-class; project has slowed since early 2025 | Low; single installer | Chatting with a folder of contracts by citation |
| ChatGPT / Claude (cloud, for contrast) | No; text reaches the vendor's servers | None; runs in a browser | Reference point; this is "GPT-4-class" | Lowest; no install | Non-sensitive documents only |
The honest trade-off
Open-weight models you run locally are not fine-tuned on legal text the way a specialised legal-AI product might be, and they are meaningfully behind frontier cloud models like GPT-4-class or Claude on nuanced legal reasoning: catching a subtly one-sided indemnity clause, or correctly applying an Indian statutory override it was not specifically told about. They are good at the structural, mechanical parts of a first pass: summarising in plain English, listing every clause present, flagging that a clause you would expect (governing law, a liability cap, a termination notice period) appears to be missing. Treat a local model's output the way you would a free cloud tool's: a lead to check against the actual clause text, not a conclusion to act on. The privacy win is real. The intelligence gap, for now, is also real, and pretending otherwise helps no one.
The verification test: prove it is actually offline
Do not take an app's "runs locally" claim on faith. After you have downloaded a model in Ollama, LM Studio, or GPT4All, turn on airplane mode or physically disconnect your Wi-Fi and ethernet, then start a new chat and ask it a question about a test document. If it answers normally with the network off, the inference is genuinely happening on your machine, nothing was silently sent out first. If it errors out, times out, or refuses to respond, something in that setup depends on a live connection, and you should not trust it with a confidential document until you find out what.
Red flags in a tool that claims to be "local"
| Normal | Red flag | Why it matters |
|---|---|---|
| Works normally with Wi-Fi and ethernet fully disconnected, once the model is downloaded | Requires an active internet connection for every chat, even after download | If it needs the network to answer, your document's content may be part of what is sent |
| No account or sign-in needed to start chatting | Forces account creation or login before you can use it | A server-side account is often paired with server-side logging of what you send |
| A named, checkable open-weight model (Llama, Mistral, Qwen) with a published license | An unnamed "proprietary" or "enhanced" model bundled into a free app | You cannot verify what it is, where it runs, or what it does with your input |
| The interface talks about loading or opening a file | The interface still says "upload" for a tool marketed as offline | "Upload" language for a genuinely local tool is a wording bug at best, a hint at worst |
| Your network monitor shows no outbound traffic during a chat | You see outbound spikes each time you send a message | Real, measurable traffic while "offline" processing is happening is the clearest tell of all |
| Vendor documentation states plainly that inference happens on-device | Privacy policy is silent on where processing actually happens | Silence on this specific point is common when a "local" label is really a caching layer over a cloud call |
A confidentiality clause that should name AI tools, and mostly does not
Bad: "The Receiving Party shall not disclose the Confidential Information to any third party without the Disclosing Party's prior written consent."
This is the clause in almost every NDA and MSA signed before 2023, and it does not say whether pasting a clause into ChatGPT counts as disclosure to a third party. Read strictly, sending text to a cloud AI vendor's servers plainly fits "disclose to a third party." Read loosely, some will argue that a tool used for your own internal review is not really a disclosure "to" anyone. That ambiguity is exactly the kind of gap a court or counterparty will exploit if something goes wrong.
Better: "The Receiving Party shall not disclose the Confidential Information to any third party without the Disclosing Party's prior written consent, and, for the avoidance of doubt, shall not input, upload, or otherwise transmit the Confidential Information to any cloud-based or third-party-hosted artificial intelligence or machine learning tool for any purpose, including internal drafting, review, or analysis, without such consent. Nothing in this clause restricts the Receiving Party's use of an AI tool that runs entirely on the Receiving Party's own devices or infrastructure and does not transmit the Confidential Information to any external server."
What changed: the clause now says explicitly that a cloud AI tool counts as a third party, closing the ambiguity above, and it carves out a named exception for on-device tools, so a receiving party is not stuck choosing between using AI at all and honouring the NDA. This interacts with your confidentiality and NDA clause generally, and with your Data Processing Agreement clauses where the document contains personal data.
Where this fits if you are not ready to install anything
If setting up a local model feels like more than a single contract is worth, you can still avoid uploading it anywhere at all. Weave, Adira's free browser tool, lets you mark up and flag a contract clause by clause yourself, nothing leaves your browser and no account is needed, it just does not generate an AI narrative the way a local model does. For the fuller picture of what happens to a contract's text on every major option, see Is It Safe to Upload a Contract to AI? and Best Free AI Contract Review Tools.
US and global contrast
US law firms have moved faster on this than most Indian ones, largely because American Bar Association guidance (Formal Opinion 512, 2024) puts the burden on the lawyer to understand where client data goes before using any generative AI tool, as an extension of existing competence and confidentiality duties. Several large US firms now run private, self-hosted or local model deployments specifically to keep privileged material off third-party servers, the same logic this guide walks through for individuals. India has no equivalent formal bar guidance yet on AI and confidentiality; the obligations here come from general law, BSA Section 132 for privilege, ordinary contract and trade-secret principles for everything else, not a dedicated professional-conduct rule.
FAQ
Is a local model like Llama or Mistral as good as ChatGPT for reviewing a contract? Not yet, on nuanced legal reasoning. It is genuinely useful for a first structural pass, summarising, listing clauses, flagging what is missing, run entirely on your own machine. For subtle drafting judgement calls, the gap to a frontier cloud model is real.
Which model should I pick: Llama, Mistral, or Qwen? Start with Llama 3.1 8B or Mistral 7B if your laptop has 8 to 10 GB of free RAM. Move to Qwen2.5 14B if you have 16 GB or more and want better detail retention across a longer contract.
Do I need an expensive GPU to do this? No. An 8B model runs acceptably on CPU alone on most laptops from the last five years. A GPU speeds things up and lets you run bigger models, but it is not required to get started.
How do I confirm my "offline" AI tool is not secretly sending my contract somewhere? Disconnect your internet entirely, airplane mode or unplugging the cable, after the model is downloaded, then start a fresh chat. If it still answers normally, the processing is genuinely local. If it fails or times out, treat that as a warning sign.
Is it illegal in India to paste a privileged or confidential contract into a cloud AI tool? Not automatically illegal, but it carries real risk. Doing so with a client's privileged communication could undercut your own basis for claiming privilege later, and doing so with a contract's confidential information can weaken an argument that the information was genuinely kept secret, the way the court read the facts in American Express Bank Ltd v Priya Puri. Whether a specific NDA's "third party" wording already covers a cloud AI vendor depends on that document's exact text.
Is GPT4All still worth using given it has slowed down? It still works, and its LocalDocs feature is convenient for chatting with a folder of contracts by citation. Development has visibly slowed since early 2025, so if you are setting up local AI for the first time, try Ollama or LM Studio first and treat GPT4All as a fallback.
This guide gets you to a genuinely private, working local AI setup, and a way to verify it is actually offline before you trust it with something confidential. It does not tell you whether your NDA's confidentiality wording already covers AI tools, whether a specific privileged document is safe to process this way at all, or how a court would weigh what you did if a dispute turned on it. That depends on your contract's exact wording and facts a guide cannot see, and none of the above is legal advice. Have a lawyer review the actual confidentiality and AI-use language in any contract that carries real risk.
Frequently asked questions
- Is a local model like Llama or Mistral as good as ChatGPT for reviewing a contract?
- Not yet, on nuanced legal reasoning. It is genuinely useful for a first structural pass, summarising, listing clauses, flagging what is missing, run entirely on your own machine. For subtle drafting judgement calls, the gap to a frontier cloud model is real.
- Which model should I pick: Llama, Mistral, or Qwen?
- Start with Llama 3.1 8B or Mistral 7B if your laptop has 8 to 10 GB of free RAM. Move to Qwen2.5 14B if you have 16 GB or more and want better detail retention across a longer contract.
- Do I need an expensive GPU to do this?
- No. An 8B model runs acceptably on CPU alone on most laptops from the last five years. A GPU speeds things up and lets you run bigger models, but it is not required to get started.
- How do I confirm my offline AI tool is not secretly sending my contract somewhere?
- Disconnect your internet entirely, airplane mode or unplugging the cable, after the model is downloaded, then start a fresh chat. If it still answers normally, the processing is genuinely local. If it fails or times out, treat that as a warning sign.
- Is it illegal in India to paste a privileged or confidential contract into a cloud AI tool?
- Not automatically illegal, but it carries real risk. Doing so with a client's privileged communication could undercut your own basis for claiming privilege later, and doing so with a contract's confidential information can weaken an argument that the information was genuinely kept secret, the way the court read the facts in American Express Bank Ltd v Priya Puri. Whether a specific NDA's third party wording already covers a cloud AI vendor depends on that document's exact text.
- Is GPT4All still worth using given it has slowed down?
- It still works, and its LocalDocs feature is convenient for chatting with a folder of contracts by citation. Development has visibly slowed since early 2025, so if you are setting up local AI for the first time, try Ollama or LM Studio first and treat GPT4All as a fallback.
Sources
- Section 132, Bharatiya Sakshya Adhiniyam, 2023 (Professional communications) - Indian Kanoon
- Section 126, Indian Evidence Act, 1872 (predecessor provision, Professional communications) - Indian Kanoon
- American Express Bank Ltd. v. Ms. Priya Puri, Delhi High Court, 24 May 2006, CS(OS) No. 1442 of 2005 - Indian Kanoon
- Ollama - download and run open-weight models locally
- LM Studio - discover, download, and run local LLMs
- GPT4All (Nomic AI) - run LLMs locally on your device
- Section 8, Digital Personal Data Protection Act, 2023, full text - Ministry of Electronics and IT
See how Adira drafts in your voice and reads contracts from your side.
Explore the showroomWorking through a contract like this? Weave is Adira’s free tool to read, mark up, and connect any contract in your browser — no account needed.
Try Weave — free