{"id":2583,"date":"2026-11-11T17:34:58","date_gmt":"2026-11-11T16:34:58","guid":{"rendered":"https:\/\/wp.unil.ch\/iaunil\/local-ai-model-for-private-sensitive-and-confidential-data\/"},"modified":"2026-11-11T17:38:02","modified_gmt":"2026-11-11T16:38:02","slug":"local-ai-model-for-private-sensitive-and-confidential-data","status":"publish","type":"post","link":"https:\/\/wp.unil.ch\/iaunil\/en\/local-ai-model-for-private-sensitive-and-confidential-data\/","title":{"rendered":"Installing a local AI model for private and sensitive data (updated November 2026)"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">What you will do<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This step-by-step guide, which requires no technical knowledge, explains how to install <strong>LM Studio<\/strong> and a <strong>model<\/strong> (the AI itself), both free and with no account. The model then runs on your computer, offline: it summarises a document or answers your questions without sending anything online. Internet access is only needed for downloads and updates.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Let us be honest.<\/strong> These small models can make mistakes and remain less capable than the best online models. Their main benefit is confidentiality, with no guarantee of energy savings.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Which tool for which data?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The full rules are in the <a href=\"https:\/\/www.unil.ch\/unil\/en\/home\/menuinst\/universite\/intelligence-artificielle\/faq.html\" rel=\"noopener noreferrer\" target=\"_blank\">UNIL AI FAQ<\/a>. If in doubt, the <a href=\"https:\/\/ia.unil.ch\/AI_GO\" rel=\"noopener noreferrer\" target=\"_blank\">AI_GO<\/a> questionnaire guides you (choose EN at the top of its page).<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Sensitive data<\/strong> as defined under Swiss legislation, in particular the Vaud data protection act (LPrD) (health, opinions, etc.): only a local AI, on a secure computer.<\/li>\n<li><strong>Personal data or official secrecy, without sensitive data<\/strong>: a local AI, or <a href=\"https:\/\/wp.unil.ch\/iaunil\/en\/microsoft-copilot-a-secure-ai-language-model-available-at-unil\/\" rel=\"noopener noreferrer\" target=\"_blank\">UNIL\u2019s institutional Copilot<\/a> with the UNIL [S\u00e9curis\u00e9] agent (not for HR data or delicate personal data).<\/li>\n<li><strong>Manuscript under review<\/strong>: never in any AI tool, even a local one; AI must not decide an evaluation either.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You must also follow the rules of your course, faculty or publisher.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: check your computer<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ideally, plan for <strong>16 GB of RAM<\/strong> and <strong>10 GB of free disk space<\/strong> (about 7 GB per model, plus the application).<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Mac<\/strong>: an Apple Silicon chip (M1 or newer) and macOS 14 or newer (Apple menu, \u201cAbout This Mac\u201d). Intel Macs are not supported.<\/li>\n<li><strong>Windows<\/strong>: an AVX2-compatible processor or a Snapdragon X Elite chip (<a href=\"https:\/\/lmstudio.ai\/docs\/app\/system-requirements\" rel=\"noopener noreferrer\" target=\"_blank\">official requirements<\/a>). RAM is shown in Settings \u2192 System \u2192 About.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">With less than 16 GB, if you are unsure about the processor or if installation is blocked, ask your IT support for advice.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: install LM Studio<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>On <a href=\"https:\/\/lmstudio.ai\/download\" rel=\"noopener noreferrer\" target=\"_blank\">lmstudio.ai\/download<\/a>, scroll down to <strong>\u201cDownload LM Studio\u201d<\/strong>. Do not install <strong>Bionic<\/strong>, offered at the top of the page, and do not use it for this guide. It is a different application that can also use online models and the web.<\/li>\n<li>Install the application (on Mac, drag it into the Applications folder) and open it. On first launch, skip the suggested model download (\u201cSkip for now\u201d).<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Labels vary depending on the version and language: look for the function described.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: download the recommended model<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">We recommend <strong>Qwen3.5 9B<\/strong>, chosen in our tests (MacBook Air M1 with 16 GB, LM Studio 0.4.16) for its balance between quality and memory.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In <strong>\u201cDiscover\u201d<\/strong> (the magnifying glass, on the left), type <strong>qwen3.5 9b<\/strong> and choose the result named exactly <strong>Qwen3.5 9B<\/strong>.<\/li>\n<li>Download the version offered by default (if you need to choose: \u201c4bit\u201d or \u201cQ4_K_M\u201d). If LM Studio considers it too large (\u201cLikely too large\u201d), ask your IT support for advice.<\/li>\n<li>Once the model has downloaded, click <strong>\u201cUse in New Chat\u201d<\/strong> to load it and open a conversation.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-12.03.16.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-12.03.16-1024x640.jpg\" alt=\"Model search in LM Studio: list of models, Gemma 4 E4B selected and the Use in New Chat button.\" class=\"wp-image-4099\" srcset=\"https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-12.03.16-1024x640.jpg 1024w, https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-12.03.16-300x188.jpg 300w, https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-12.03.16-768x480.jpg 768w, https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-12.03.16-1536x960.jpg 1536w, https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-12.03.16.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">The screenshot shows Gemma 4 E4B; search for Qwen3.5 9B instead.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: set the context<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>context<\/strong> is the amount of text the model reads at once. If it is too small, which is common by default, LM Studio sends only excerpts of the document.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click the <strong>cog<\/strong> to the left of the model name, near the message box (at the top in Developer mode, as in the screenshot).<\/li>\n<li>In <strong>\u201cContext Length\u201d<\/strong>, type <strong>32000<\/strong>, then click <strong>\u201cReload to apply changes\u201d<\/strong>.<\/li>\n<li>If memory is short, close other applications; if that is not enough, switch to 16000 and work in sections (see below).<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-17.58.09-scaled.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-17.58.09-1024x640.jpg\" alt=\"Model settings in LM Studio: Context Length at 32000 and the Reload to apply changes button.\" class=\"wp-image-4101\" srcset=\"https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-17.58.09-1024x640.jpg 1024w, https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-17.58.09-300x188.jpg 300w, https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-17.58.09-768x480.jpg 768w, https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-17.58.09-1536x960.jpg 1536w, https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-17.58.09-2048x1280.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">The \u201cContext Length\u201d setting.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">With 32,000, a document of about 20 to 35 pages (fewer if it is dense) can be sent in full, in a new conversation. This does not guarantee a complete summary. Next time, choose Qwen3.5 9B again near the message box if needed, then check this setting.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: try it out<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Start with a document that contains no confidential data; before any sensitive document, read the next section.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Drag the file (<strong>.docx, .txt or .pdf<\/strong>) into the conversation and wait until it has finished loading. For each further document, open a <strong>new conversation<\/strong> (icon at the top of the conversation list). In a PDF, only the text is read: no images or charts, and sometimes no scanned pages.<\/li>\n<li>With a long document, turn off reasoning. The light bulb on the <strong>\u201cThink\u201d<\/strong> button, below the message box, should be crossed out. Click it only if it is not.<\/li>\n<li>Ask, for example, <strong>\u201cSummarise this document in 5 points.\u201d<\/strong> The response can take more than ten minutes, which does not necessarily mean something has gone wrong.<\/li>\n<li>Above the first response, LM Studio shows <strong>\u201cinject-full-content\u201d<\/strong> (all the extracted text) or <strong>\u201cretrieval\u201d<\/strong> (only a few excerpts). If \u201cretrieval\u201d appears or this note is missing, see below.<\/li>\n<li>Check the response against the document (figures, names, parts covered): even with \u201cinject-full-content\u201d, the model may leave out passages or make mistakes. Acknowledge the use of AI if its contribution is significant.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-20.06.45.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-20.06.45-1024x640.jpg\" alt=\"Conversation in LM Studio: attached PDF, summary request, inject-full-content note, Thought for line and the model\u2019s response.\" class=\"wp-image-4104\" srcset=\"https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-20.06.45-1024x640.jpg 1024w, https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-20.06.45-300x188.jpg 300w, https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-20.06.45-768x480.jpg 768w, https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-20.06.45-1536x960.jpg 1536w, https:\/\/wp.unil.ch\/iaunil\/files\/2025\/07\/capture-decran-2026-06-15-a-20.06.45.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Example with Gemma: the \u201cinject-full-content\u201d note above the response.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Protect your sensitive data<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before using sensitive or confidential data, check these points; if you do not know how, ask your IT support.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Secure computer<\/strong>: up-to-date system, encrypted disk (FileVault on Mac, BitLocker on Windows), encrypted backups, session locked when you are away, clipboard not shared with other devices.<\/li>\n<li><strong>File in the right place<\/strong>: a location authorised for this data. For sensitive data: outside OneDrive, iCloud or any other unauthorised cloud (the Desktop and Documents folders are often synchronised).<\/li>\n<li><strong>Nothing online<\/strong>: only the downloaded model, without web features, remote services or signing in to an account; you can disconnect from the internet. Never use an online converter or translator.<\/li>\n<li><strong>After use<\/strong>: delete conversations you no longer need and empty the Trash or Recycle Bin. Copies or excerpts of files may remain in the .lmstudio folder and in your backups, which must stay in an authorised location. LM Studio is used without institutional support.<\/li>\n<li><strong>Results<\/strong>: a summary is as sensitive as the document; protect it in the same way.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">If something goes wrong<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u201cI cannot see any document\u201d, \u201cretrieval\u201d or no note.<\/strong> Check that the file has loaded and the \u201cContext Length\u201d value (step 4), then attach the document again in a new conversation.<\/li>\n<li><strong>The problem persists, or parts are missing.<\/strong> The document may be too long, or the model may have left out passages (scanned pages: see below). Paste the text in sections of about ten pages, one conversation per section, with the request \u201cSummarise this section\u201d. Pasted text shows no note. Then check that everything is covered.<\/li>\n<li><strong>It is very slow.<\/strong> Check that \u201cThink\u201d is off and work in shorter sections. You can also try Gemma 4 E4B, sometimes faster, but less capable and no lighter (repeat steps 3 and 4 with it; about 7 GB more disk space).<\/li>\n<li><strong>Empty, incomplete or incorrect response on a PDF.<\/strong> Its pages may be scanned: use the original file (Word or text) instead. Otherwise, ask your IT support for advice, never an online service.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Other options<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ollama also lets you use local models; do not use its \u201ccloud\u201d models, which run online.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Local AIs are increasingly powerful and attractive, all while keeping your sensitive data on your own computer rather than on remote servers.<\/p>\n","protected":false},"author":1002618,"featured_media":2211,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-2583","post","type-post","status-publish","format-standard","has-post-thumbnail","category-resources"],"_links":{"self":[{"href":"https:\/\/wp.unil.ch\/iaunil\/en\/wp-json\/wp\/v2\/posts\/2583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.unil.ch\/iaunil\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.unil.ch\/iaunil\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.unil.ch\/iaunil\/en\/wp-json\/wp\/v2\/users\/1002618"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.unil.ch\/iaunil\/en\/wp-json\/wp\/v2\/comments?post=2583"}],"version-history":[{"count":5,"href":"https:\/\/wp.unil.ch\/iaunil\/en\/wp-json\/wp\/v2\/posts\/2583\/revisions"}],"predecessor-version":[{"id":4503,"href":"https:\/\/wp.unil.ch\/iaunil\/en\/wp-json\/wp\/v2\/posts\/2583\/revisions\/4503"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wp.unil.ch\/iaunil\/en\/wp-json\/wp\/v2\/media\/2211"}],"wp:attachment":[{"href":"https:\/\/wp.unil.ch\/iaunil\/en\/wp-json\/wp\/v2\/media?parent=2583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.unil.ch\/iaunil\/en\/wp-json\/wp\/v2\/categories?post=2583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.unil.ch\/iaunil\/en\/wp-json\/wp\/v2\/tags?post=2583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}