{"id":12707,"date":"2023-12-19T08:32:19","date_gmt":"2023-12-19T07:32:19","guid":{"rendered":"https:\/\/flaven.fr\/?p=12707"},"modified":"2026-09-16T11:45:22","modified_gmt":"2026-09-16T09:45:22","slug":"empower-your-workflow-harnessing-the-power-of-lm-studio-and-ollama-for-seamless-local-llm-execution","status":"publish","type":"post","link":"https:\/\/flaven.fr\/2023\/12\/empower-your-workflow-harnessing-the-power-of-lm-studio-and-ollama-for-seamless-local-llm-execution\/","title":{"rendered":"Empower Your Workflow: Harnessing the Power of LM Studio and Ollama for Seamless Local LLM Execution"},"content":{"rendered":"<p>Exploring Hugging Face, finding LLMs and packaging the LLMs into a &#8220;quick and dirty&#8221; API with FastAPI was my last sprint goal. It just ended on Monday this week.<\/p>\n<p><i>Again the title was made with AI, check the word &#8220;Harnessing<\/i><\/p>\n<p><b>For this post, you can find all files for each project on my GitHub account. See <a href=\"https:\/\/github.com\/bflaven\/ia_usages\/tree\/main\/ia_using_other_llm\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/bflaven\/ia_usages\/tree\/main\/ia_using_other_llm<\/a><\/b><\/p>\n<p>Indeed, newly appointed AI coordinator, I am working to structure my work as I would on any project.<\/p>\n<p>I am now starting the second Sprint with a hybrid objective:<\/p>\n<ol>\n<li>I want to find a way to locally test other LLMs in a more confidential and secure way than on &#8220;classical&#8221; websites such as ChatGPT (<a href=\"https:\/\/chat.openai.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/chat.openai.com\/<\/a>) or the Microsoft&#8217;s copilot (<a href=\"https:\/\/copilot.microsoft.com\" target=\"_blank\" rel=\"noopener\">https:\/\/copilot.microsoft.com<\/a>). Especially, if I start to work with more personal data. <\/li>\n<li>I had to prepare training documents for teenagers on the discovery of the Python language, but the emergence of generative AI completely demonetizes reading a book on programming or even attending training. <\/li>\n<p><i>By the way, you can find a set of resources from Books, Exercises, Notebooks to discover and learn Python. It exists both in French and in English on my GitHub at <a href=\"https:\/\/github.com\/bflaven\/learning_python_for_all\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/bflaven\/learning_python_for_all<\/a><\/i><\/p>\n<\/ol>\n<p><b>Consequently, it seemed much more opportunistic to me to provide a Jupyter Notebook or a Google Collab. Indeed, the learner can learn and practice at the same time. Even better, coupled with a tool like Ollama or Lmstudio, the learner can obtain the information via prompts to complete his\/her instruction. So, it&#8217;s two birds with one stone, learning Python self-guided by the art of the prompt.<\/b><\/p>\n<p><i>I made a french version only for kids: <a href=\"https:\/\/github.com\/bflaven\/learning_python_for_all\/blob\/main\/003_code_for_family_lesson\/001_notebook_python_code_for_family_lessons.ipynb\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/bflaven\/learning_python_for_all\/blob\/main\/003_code_for_family_lesson\/001_notebook_python_code_for_family_lessons.ipynb<\/a><\/i><\/p>\n<p>Without even mentioning the fact that the provision of different LMMs makes it possible to:<\/p>\n<ol>\n<li>Compare the performance of each of them.<\/li>\n<li>To practice the art of prompting either personally or professionally using more &#8220;sensitive&#8221; data such as statistical data, generating real Jira tickets if you are a PO or producing Cypress Code for UAT testing if you are QA, produce python code if you are a devlopper&#8230; etc.<\/li>\n<\/ol>\n<p>But, in addition to the immediate and unconstrained use of LLMs, a question remains: should we rejoice in these facilities offered by AI? All of this, at the same time, totally devalues work and therefore will inevitably \u201ckill\u201d an astronomical number of jobs. The hunt, like the question, remains open.<\/p>\n<h2>Loading LLM with ollama.ai or lmstudio.ai<\/h2>\n<p>I found 2 great tools to query LLMs confidentially and securely. The only remark the only remark that this calls for is that lmstudio is much more UX friendly than ollama.<\/p>\n<ol>\n<li><a href=\"https:\/\/ollama.ai\/\" target=\"_blank\" rel=\"noopener\">https:\/\/ollama.ai\/<\/a><\/li>\n<li><a href=\"https:\/\/lmstudio.ai\/\" target=\"_blank\" rel=\"noopener\">https:\/\/lmstudio.ai\/<\/a><\/li>\n<\/ol>\n<p><b>Baseline for lmstudio.ai<\/b><br \/>\nIt says what it does&#8230;<\/p>\n<pre>\r\nWith LM Studio, you can ...\r\n&#x1f916; - Run LLMs on your laptop, entirely offline\r\n&#x1f47e; - Use models through the in-app Chat UI or an OpenAI compatible local server\r\n&#x1f4c2; - Download any compatible model files from HuggingFace &#x1f917; repositories\r\n&#x1f52d; - Discover new & noteworthy LLMs in the app's home page\r\n<\/pre>\n<p><b>Using ollama commands<\/b><\/p>\n<p>You can find other info at <a href=\"https:\/\/github.com\/jmorganca\/ollama\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/jmorganca\/ollama<\/a><\/p>\n<pre>\r\n# COMMANDS\r\n\r\n# To run and chat with Llama 2\r\nollama run llama2\r\nollama run orca-mini\r\nollama run mistral:text\r\nollama run falcon:7b\r\n\r\n\r\n# To run and chat with orca-mini\r\nollama pull llama2\r\nollama pull orca-mini\r\n\r\n# remove a model\r\nollama rm llama2\r\nollama rm orca-mini\r\nollama rm mistral\r\nollama rm falcon:7b\r\nollama rm mistral:text\r\n\r\n\r\n# list the model\r\nollama list\r\n\r\n\r\n# when you are in the model you can use\r\n>>> \/?\r\n>>> \/list\r\n>>> \/set verbose\r\n\r\n# to get out from the model\r\n\/exit\r\n\r\n# create a custom prompt\r\n# you need to create a file for your model named \"hotwater\". It look like a file\r\nollama create hotwater - .\/hotwater\r\n\r\n# ollama create [modelFileName] - .\/[modelFileName]\r\n\r\n<\/pre>\n<p><b>Conclusion:<\/b><br \/>\n<b>With such tools, you can load any LLM at no cost, then you have unlimited access to LLMs, a great sandbox for experimentation and a pretty good Privacy. You join the band wagon of the IA revolution for better and for worse. As you may discover that your job has changed or even worse does not exist anymore. So, you can consider retraining and start a new career of &#8220;Amazon-Book-Faker&#8221;, using IA to write fake books on any subject \ud83d\ude42 2024 will be the Post-Anything (Truth, Work, Books, Training&#8230;) Era or will not be.<\/b><\/p>\n<h2>Videos to tackle this post<\/h2>\n<p>Video #1 Using LLM in Ollama or LM Studio: Discover LLMs potential (orca-mini) help through Ollama for daily tasks in a safe and confidential way.<br \/>\n<iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/tjpj41yrgro\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>Video #2 Using LLM in Ollama or LM Studio: Discover LLMs (Mistral) potential help through LM Studio for daily tasks in a safe and confidential way.<br \/>\n<iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/LULqXhM5guk\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p><H2>More infos<\/H2><\/p>\n<ul>\n<p> <H3>Ollama and LM Studio<\/H3><\/p>\n<li>LM Studio<br \/><a href=\"https:\/\/lmstudio.ai\/\" target=\"_blank\" rel=\"noopener\">https:\/\/lmstudio.ai\/<\/a><\/li>\n<li>Ollama<br \/><a href=\"https:\/\/ollama.ai\/\" target=\"_blank\" rel=\"noopener\">https:\/\/ollama.ai\/<\/a><\/li>\n<li>Running LLM\u2019s Locally Using LM Studio<br \/><a href=\"https:\/\/medium.com\/@genebernardin\/running-llms-locally-using-lm-studio-38070f286413\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/@genebernardin\/running-llms-locally-using-lm-studio-38070f286413<\/a><\/li>\n<li>AI Anytime, Anywhere: Getting started with LLMs on your Laptop Now (DockerCon 2023)<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=kd-u_07otFw\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/watch?v=kd-u_07otFw<\/a><\/li>\n<li>This repo brings numerous use cases from the Open Source Ollama<br \/><a href=\"https:\/\/github.com\/PromptEngineer48\/Ollama\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/PromptEngineer48\/Ollama<\/a><\/li>\n<li>langchain-tutorials &#8211; ollama basics by Sam Witteveen<br \/><a href=\"https:\/\/github.com\/samwit\/langchain-tutorials\/tree\/382e8db4dc5e01fc400bee8d4146cb1a2e9c3150\/ollama\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/samwit\/langchain-tutorials\/tree\/382e8db4dc5e01fc400bee8d4146cb1a2e9c3150\/ollama<\/a><\/li>\n<li>LLMs Locally &#038; Quanitzed<br \/><a href=\"https:\/\/www.youtube.com\/playlist?list=PL8motc6AQftkWtR16gGQWSVrH4bvbEETo\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/playlist?list=PL8motc6AQftkWtR16gGQWSVrH4bvbEETo<\/a><\/li>\n<li>Coding with AI<br \/><a href=\"https:\/\/www.youtube.com\/playlist?list=PLZcXz5XmqQTWsLhNJ0o4yvfHQSRXCCy-O\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/playlist?list=PLZcXz5XmqQTWsLhNJ0o4yvfHQSRXCCy-O<\/a><\/li>\n<li>ollama on go.dev<br \/><a href=\"https:\/\/pkg.go.dev\/github.com\/jmorganca\/ollama#readme-macos\" target=\"_blank\" rel=\"noopener\">https:\/\/pkg.go.dev\/github.com\/jmorganca\/ollama#readme-macos<\/a><\/li>\n<li>Ollama &#8211; Local Models on your machine<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=Ox8hhpgrUi0\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/watch?v=Ox8hhpgrUi0<\/a><\/li>\n<li>Ollama &#8211; Loading Custom Models<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=3BnnsQCmgLo\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/watch?v=3BnnsQCmgLo<\/a><\/li>\n<li>Ollama &#8211; More examples on ollama<br \/><a href=\"https:\/\/github.com\/jmorganca\/ollama\/tree\/main\/examples\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/jmorganca\/ollama\/tree\/main\/examples<\/a><\/li>\n<li>Ollama Is INSANE: Building Open-Source ChatGPT From Scratch (FULLY Local Tutorial)<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=rIRkxZSn-A8\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/watch?v=rIRkxZSn-A8<\/a><\/li>\n<li>RAG &#8211; Retrieval Augmented Generation<br \/><a href=\"https:\/\/www.youtube.com\/playlist?list=PL8motc6AQftn-X1HkaGG9KjmKtWImCKJS\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/playlist?list=PL8motc6AQftn-X1HkaGG9KjmKtWImCKJS<\/a><\/li>\n<li>A Complete LangChain Guide<br \/><a href=\"https:\/\/nanonets.com\/blog\/langchain\/\" target=\"_blank\" rel=\"noopener\">https:\/\/nanonets.com\/blog\/langchain\/<\/a><\/li>\n<li>Chat with your PDF files using Mistral-7B and Langchain<br \/><a href=\"https:\/\/medium.com\/@nimritakoul01\/chat-with-your-pdf-files-using-mistral-7b-and-langchain-f3be9363301c\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/@nimritakoul01\/chat-with-your-pdf-files-using-mistral-7b-and-langchain-f3be9363301c<\/a><\/li>\n<p><H3>Another concern<\/H3><\/p>\n<li>A New AI-Led World Order Needs to Rewrite the Rules of Data Capitalism<br \/><a href=\"https:\/\/botpopuli.net\/artificial-intelligence-ai-world-order-rules-of-data-capitalism\/\" target=\"_blank\" rel=\"noopener\">https:\/\/botpopuli.net\/artificial-intelligence-ai-world-order-rules-of-data-capitalism\/<\/a><\/li>\n<li>Artificial Intelligence: The Good, Bad and Ugly<br \/><a href=\"https:\/\/botpopuli.net\/artificial-intelligence-the-good-the-bad-the-ugly\/\" target=\"_blank\" rel=\"noopener\">https:\/\/botpopuli.net\/artificial-intelligence-the-good-the-bad-the-ugly\/<\/a><\/li>\n<li>L\u2019\u00e9conomie de l\u2019intelligence artificielle<br \/><a href=\"https:\/\/www.cairn.info\/revue-d-economie-financiere-2019-3-page-257.htm\" target=\"_blank\" rel=\"noopener\">https:\/\/www.cairn.info\/revue-d-economie-financiere-2019-3-page-257.htm<\/a><\/li>\n<li>YVES PAG\u00c8S \u2013 IL \u00c9TAIT UNE FOIS SUR CENT<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=QmaDLwfqvOo\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/watch?v=QmaDLwfqvOo<\/a><\/li>\n<li>Liquidit\u00e9, capital, souverainet\u00e9 ?<br \/><a href=\"https:\/\/www.cairn.info\/revue-lignes-2005-1-page-60.htm\" target=\"_blank\" rel=\"noopener\">https:\/\/www.cairn.info\/revue-lignes-2005-1-page-60.htm<\/a><\/li>\n<li>La \u00ab plateformisation \u00bb comme d\u00e9ploiement d\u2019une logique organisatrice : propositions th\u00e9oriques et \u00e9l\u00e9ments de m\u00e9thode<br \/><a href=\"https:\/\/www.cairn.info\/revue-effeuillage-2021-1-page-30.htm\" target=\"_blank\" rel=\"noopener\">https:\/\/www.cairn.info\/revue-effeuillage-2021-1-page-30.htm<\/a><\/li>\n<li>[Dossier] D\u00e9cryptage de la plateformisation du travail : management algorithmique, asym\u00e9trie d&#8217;information, \u00e9conomie de la notation et de la r\u00e9putation<br \/><a href=\"https:\/\/labo.societenumerique.gouv.fr\/fr\/articles\/dossier-d%C3%A9cryptage-de-la-plateformisation-du-travail-management-algorithmique-asym%C3%A9trie-dinformation-%C3%A9conomie-de-la-notation-et-de-la-r%C3%A9putation\/\" target=\"_blank\" rel=\"noopener\">https:\/\/labo.societenumerique.gouv.fr\/fr\/articles\/dossier-d%C3%A9cryptage-de-la-plateformisation-du-travail-management-algorithmique-asym%C3%A9trie-dinformation-%C3%A9conomie-de-la-notation-et-de-la-r%C3%A9putation\/<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Exploring Hugging Face, finding LLMs and packaging the LLMs into a &#8220;quick and dirty&#8221; API with FastAPI was my last sprint goal. It just ended&hellip; <\/p>\n<p class=\"text-center\"><a href=\"https:\/\/flaven.fr\/2023\/12\/empower-your-workflow-harnessing-the-power-of-lm-studio-and-ollama-for-seamless-local-llm-execution\/\" class=\"more-link\">Continue reading &rarr; <span class=\"screen-reader-text\">Empower Your Workflow: Harnessing the Power of LM Studio and Ollama for Seamless Local LLM Execution<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":12709,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"bf_ai_meta_description":"Empower workflows with LM Studio and Ollama for secure local LLM execution. Tools and outcomes detailed.","bf_ai_og_title":"Empower Workflow with LM Studio","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3438,3437,3444,3447,3448,3449,3450,3435],"tags":[2547,3493,3067,3064,3065,2434,3085,3086,3506,3500,3087,3076,3082,141,2776,3089,3090,3516,3083,3088,2387],"class_list":["post-12707","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-machine-learning","category-business-case-studies","category-programming-databases","category-technology-trends","category-tools-productivity","category-tutorials-how-to","category-ux-product-design","category-web-development","tag-ai","tag-clip","tag-deployment","tag-design-thinking-process","tag-devops-lifecycle","tag-docker","tag-falcon","tag-hugging-face","tag-jira","tag-jupyter","tag-llama2","tag-llm","tag-lm-studio","tag-local","tag-machine-learning","tag-mistral","tag-mixtral","tag-mms","tag-ollama","tag-orca-mini","tag-poc"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3Vuhl-3iX","jetpack_featured_media_url":"https:\/\/flaven.fr\/wp-content\/uploads\/2023\/12\/ia_using_other_llm_b.jpg","_links":{"self":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/12707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/comments?post=12707"}],"version-history":[{"count":10,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/12707\/revisions"}],"predecessor-version":[{"id":12725,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/12707\/revisions\/12725"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/media\/12709"}],"wp:attachment":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/media?parent=12707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/categories?post=12707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/tags?post=12707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}