{"id":2583,"date":"2026-06-15T16:57:49","date_gmt":"2026-06-15T14:57:49","guid":{"rendered":"https:\/\/wp.unil.ch\/iaunil\/local-ai-model-for-private-sensitive-and-confidential-data\/"},"modified":"2026-10-08T18:29:13","modified_gmt":"2026-10-08T16:29:13","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 October 2026)"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Why use local AI?<\/h3>\n\n<p class=\"wp-block-paragraph\">With <strong>LM Studio and a model downloaded to your computer<\/strong>, you can summarise, translate, rephrase a document or ask questions about its contents, offline. The application and these open-weight models are free, with no account required. Internet access is needed for installation, downloads and updates.<\/p>\n\n<p class=\"wp-block-paragraph\">At UNIL, sensitive data as defined under Swiss legislation, in particular the Vaud data protection act (LPrD) (health, opinions, etc.), must be processed with a local solution that is authorised and appropriate for that data. The <a href=\"https:\/\/ia.unil.ch\/AI_GO\" rel=\"noopener noreferrer\" target=\"_blank\">AI_GO<\/a> questionnaire helps you choose an authorised tool, alongside the <a href=\"https:\/\/www.unil.ch\/unil\/fr\/home\/menuinst\/universite\/intelligence-artificielle\/faq.html\" rel=\"noopener noreferrer\" target=\"_blank\">UNIL AI FAQ (in French)<\/a>; you must also follow the rules of your course, faculty or publisher. For information covered by official secrecy that does not include sensitive data, <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 your UNIL account and the UNIL [S\u00e9curis\u00e9] agent may be suitable, except for HR data or delicate personal data. For sensitive research data, first contact the DCSR, the research computing support unit, via helpdesk@unil.ch.<\/p>\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<h3 class=\"wp-block-heading\">Install LM Studio<\/h3>\n\n<p class=\"wp-block-paragraph\">Ideally, plan for <strong>16 GB of RAM<\/strong>, about <strong>6 to 8 GB of disk space per compressed model<\/strong>, plus the application. On Mac: an Apple Silicon chip (M1 or newer) and at least macOS 14; Intel Macs are not supported. On Windows: an AVX2-compatible Intel\/AMD processor or Snapdragon X Elite (<a href=\"https:\/\/lmstudio.ai\/docs\/app\/system-requirements\" rel=\"noopener noreferrer\" target=\"_blank\">official requirements<\/a>). A dedicated graphics card can speed up responses, but is not essential.<\/p>\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 the <strong>LM Studio<\/strong> section, below Bionic, and choose <strong>\u201cDownload LM Studio\u201d<\/strong>.<\/li>\n<li>Install then open the application. Labels vary depending on the language and version: look for the function described.<\/li>\n<\/ol>\n\n<h3 class=\"wp-block-heading\">Which model should you choose?<\/h3>\n\n<p class=\"wp-block-paragraph\"><strong>When in doubt, start with Qwen3.5 9B<\/strong>, the choice we made in our tests. On a modest computer, a long document can take more than ten minutes: this wait does not necessarily mean something has gone wrong.<\/p>\n\n<figure class=\"wp-block-table\"><table>\n<thead>\n<tr>\n<th>Model<\/th>\n<th>When should you choose it?<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Qwen3.5 9B<\/strong><\/td>\n<td>A good balance between quality and memory use to get started with documents; responses can be slow.<\/td>\n<\/tr>\n<tr>\n<td><strong>Gemma 4 E4B<\/strong><\/td>\n<td>To prioritise speed, with more limited capabilities and no guaranteed memory savings.<\/td>\n<\/tr>\n<tr>\n<td><strong>Gemma 4 12B<\/strong><\/td>\n<td>To prioritise overall quality: the highest score of the three in the <a href=\"https:\/\/artificialanalysis.ai\/models\/gemma-4-12b\" rel=\"noopener noreferrer\" target=\"_blank\">Artificial Analysis<\/a> index checked on 8 October 2026 (estimate). More memory-intensive, especially for long documents.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/figure>\n\n<p class=\"wp-block-paragraph\">File size is not the whole picture: the document and conversation also use memory. Check the memory estimate when loading and any warnings from LM Studio. You can keep several models installed if disk space allows. Our tests were run on a MacBook Air M1 with 16 GB of RAM, using LM Studio 0.4.16.<\/p>\n\n<h3 class=\"wp-block-heading\">Download the model<\/h3>\n\n<ol class=\"wp-block-list\">\n<li>Open the <strong>\u201cDiscover\u201d<\/strong> magnifying glass and search for the full name of your chosen model, for example <strong>qwen3.5 9b<\/strong>. Select the result with exactly that name.<\/li>\n<li>Download the default version if it is shown as compatible with your computer. For Qwen, if you need to choose: <strong>MLX 4bit<\/strong> on Apple Silicon Macs or <strong>GGUF Q4_K_M<\/strong> on Windows. For another model, choose a compatible <strong>4-bit<\/strong> version. These compressed versions take up less space, sometimes at the cost of quality.<\/li>\n<li>After downloading, click <strong>\u201cUse in New Chat\u201d<\/strong> to load the model and open a conversation.<\/li>\n<\/ol>\n\n<figure class=\"wp-block-image size-large\"><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=\"Searching for models in LM Studio, with Gemma 4 E4B selected.\" 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\" \/><figcaption class=\"wp-element-caption\">The screenshots show Gemma 4 E4B; for the recommended choice, select Qwen3.5 9B.<\/figcaption><\/figure>\n\n<h3 class=\"wp-block-heading\">Set the context for a document<\/h3>\n\n<p class=\"wp-block-paragraph\">The <strong>context<\/strong> is the amount of text the model can keep in view, including the document and conversation. It is measured in <em>tokens<\/em>, pieces of words. If the document is too long, LM Studio only passes on excerpts, so a summary may omit sections.<\/p>\n\n<ol class=\"wp-block-list\">\n<li>Click the <strong>cog to the left of the model name at the top<\/strong>. If needed, enable <strong>Settings \u2192 Developer<\/strong> to show the advanced settings.<\/li>\n<li>Try <strong>32,000<\/strong> in <strong>\u201cContext Length\u201d<\/strong>, if memory allows, then <strong>\u201cReload to apply changes\u201d<\/strong>. With Gemma 4 12B on 16 GB, start closer to <strong>16,000<\/strong>.<\/li>\n<li>If memory is insufficient, close demanding applications or lower this value and work in sections.<\/li>\n<\/ol>\n\n<figure class=\"wp-block-image size-large\"><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=\"Context Length set to 32,000 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\" \/><figcaption class=\"wp-element-caption\">The context setting and the button to reload the model.<\/figcaption><\/figure>\n\n<p class=\"wp-block-paragraph\"><strong>If the model says \u201cI cannot see any document\u201d<\/strong>, check that the file has loaded and try a larger context if memory allows. After this change, open a new conversation, attach the document and send the request again. <strong>32,000 does not guarantee a complete summary.<\/strong> For each request, check the processing details: \u201cinject-full-content\u201d means all extracted text is sent; \u201cretrieval\u201d means only a few excerpts are sent. For an overall summary, if \u201cretrieval\u201d appears, if these details are not visible or if sections are missing, copy and paste the text in sections, each in a new conversation. Ask \u201cSummarise this section\u201d, then combine the summaries and check that all sections are covered.<\/p>\n\n<h3 class=\"wp-block-heading\">Work on your document<\/h3>\n\n<p class=\"wp-block-paragraph\">For sensitive data, use an up-to-date computer with both the disk and backups encrypted, and lock your session when you are away. Choose a <strong>storage location authorised for this data<\/strong>, outside OneDrive, iCloud or an unauthorised cloud: Desktop and Documents are often synced. Use the downloaded local model, without web features or remote services; you can disconnect from the Internet after the downloads.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong>PDFs: watch out for ignored content.<\/strong> In this workflow, only extracted text is passed on, not images or charts. Scanned pages without selectable text may be ignored, leading to an incomplete or incorrect response. Prefer the original text file; do not send a sensitive document to an online converter.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong>Before sending<\/strong>, with Qwen and a long document, try turning off <strong>\u201cThink\u201d<\/strong>, below the message box. This may speed up the response, at the cost of less thorough reasoning. If reasoning continues or the wait becomes too long, work in sections.<\/p>\n\n<ol class=\"wp-block-list\">\n<li>Open a <strong>new conversation for each document<\/strong> and drag the <strong>.pdf, .docx or .txt<\/strong> file into it. Wait until it has finished loading.<\/li>\n<li>For example, type: <strong>\u201cSummarise this report in 5 points.\u201d<\/strong><\/li>\n<li>Check the response against the original document: figures, names and sections covered. Mention the use of AI if its contribution is significant.<\/li>\n<\/ol>\n\n<figure class=\"wp-block-image size-large\"><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=\"A conversation with an attached PDF, a summary request and a response from Gemma.\" 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\" \/><figcaption class=\"wp-element-caption\">Example with Gemma: the attached PDF, the request and the response.<\/figcaption><\/figure>\n\n<p class=\"wp-block-paragraph\"><strong>After use.<\/strong> Delete conversations you no longer need. Copies or excerpts may remain in LM Studio: ask Central IT Services (helpdesk@unil.ch) for help removing them. The summary retains the sensitivity of the source document: protect it in the same way.<\/p>\n\n<h3 class=\"wp-block-heading\">Alternatives<\/h3>\n\n<p class=\"wp-block-paragraph\">Ollama also lets you use local models. For an institutional solution, or if your computer is not powerful enough, contact Central IT Services (helpdesk@unil.ch).<\/p>\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":{"_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"","_seopress_redirections_param":"","_seopress_redirections_type":0,"_seopress_analysis_target_kw":"","_seopress_news_disabled":"","_seopress_video_disabled":"","_seopress_video":[],"_seopress_pro_schemas_manual":[],"_seopress_pro_rich_snippets_disable_all":"","_seopress_pro_rich_snippets_disable":[],"_seopress_pro_schemas":[],"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":4432,"href":"https:\/\/wp.unil.ch\/iaunil\/en\/wp-json\/wp\/v2\/posts\/2583\/revisions\/4432"}],"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}]}}