{"id":1408,"date":"2024-11-07T07:55:01","date_gmt":"2024-11-07T07:55:01","guid":{"rendered":"https:\/\/zahiralam.com\/blog\/?p=1408"},"modified":"2024-11-07T08:33:49","modified_gmt":"2024-11-07T08:33:49","slug":"step-by-step-install-llama-3-2-vision-on-mac-m1-m2-m3-in-minutes","status":"publish","type":"post","link":"https:\/\/zahiralam.com\/blog\/step-by-step-install-llama-3-2-vision-on-mac-m1-m2-m3-in-minutes\/","title":{"rendered":"Step-by-Step: Install Llama 3.2 Vision on Mac M1, M2, M3 in Minutes"},"content":{"rendered":"\n<p>Llama 3.2 Vision is a collection of advanced, instruction-tuned, multimodal large language models (LLMs) optimized for image reasoning, image captioning, and more. This guide will walk you through the steps to install and use Llama 3.2 Vision on your Mac M1, M2, or M3.\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Before installing Llama 3.2 Vision, make sure <strong>Ollama<\/strong> is installed on your Mac. If you haven&#8217;t installed it, refer to this guide: <a href=\"https:\/\/zahiralam.com\/blog\/step-by-step-guide-to-installing-ollama-on-mac\/\">Step-by-Step Guide to Installing Ollama on Mac<\/a>.\n\n\n\n<h2 class=\"wp-block-heading\">Installation Steps<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Open Terminal<\/h3>\n\n\n\n<p>Press <code>Command + Space<\/code>, type <code>Terminal<\/code>, and hit <code>Enter<\/code> to open the Terminal.\n\n\n\n<h3 class=\"wp-block-heading\">2. Install the 11B Version<\/h3>\n\n\n\n<p>Run this command to download the 11B model (7.9GB):\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-1\">ollama run llama3.2-vision<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#ollama%20run%20llama3.2-vision\">\n                            <button class=\"copy-button\" data-label=\"ollama run llama3.2-vision\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"3132\" height=\"356\" src=\"https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/image.png\" alt=\"Install the 11B Version Llama 3.2 Vision\" class=\"wp-image-1411\" srcset=\"https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/image.png 3132w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/image-300x34.png 300w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/image-1024x116.png 1024w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/image-768x87.png 768w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/image-1536x175.png 1536w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/image-2048x233.png 2048w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/image-1800x205.png 1800w\" sizes=\"auto, (max-width: 3132px) 100vw, 3132px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">3. Install the 90B Version<\/h3>\n\n\n\n<p>To install the 90B model (55GB), use this command:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-2\">ollama run llama3.2-vision:90b<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#ollama%20run%20llama3.2-vision%3A90b\">\n                            <button class=\"copy-button\" data-label=\"ollama run llama3.2-vision:90b\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"3382\" height=\"134\" src=\"https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/llama-vision-90b.png\" alt=\"Install the 90B Version Llama 3.2 Vision\" class=\"wp-image-1413\" srcset=\"https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/llama-vision-90b.png 3382w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/llama-vision-90b-300x12.png 300w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/llama-vision-90b-1024x41.png 1024w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/llama-vision-90b-768x30.png 768w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/llama-vision-90b-1536x61.png 1536w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/llama-vision-90b-2048x81.png 2048w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/11\/llama-vision-90b-1800x71.png 1800w\" sizes=\"auto, (max-width: 3382px) 100vw, 3382px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">4. Verify the Installation<\/h3>\n\n\n\n<p>Once the installation is complete, you will see the&nbsp;<code>&gt;&gt;&gt;<\/code>&nbsp;prompt. This indicates that the model is ready for interaction.\n\n\n\n<p><strong>What to Do:<\/strong>\n\n\n\n<ul class=\"wp-block-list\">\n<li>At the&nbsp;<code>&gt;&gt;&gt;<\/code>&nbsp;prompt, type a question or a command to verify that the model is functioning properly.<\/li>\n\n\n\n<li><strong>Example Interaction<\/strong>:<\/li>\n<\/ul>\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-3\">Describe the contents of this image: \/path\/to\/your\/image.jpg.<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#Describe%20the%20contents%20of%20this%20image%3A%20%2Fpath%2Fto%2Fyour%2Fimage.jpg.\">\n                            <button class=\"copy-button\" data-label=\"Describe the contents of this image: \/path\/to\/your\/image.jpg.\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Supported Languages<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>For <strong>text-only tasks<\/strong>, Llama 3.2 Vision supports: <strong>English<\/strong>, <strong>German<\/strong>, <strong>French<\/strong>, <strong>Italian<\/strong>, <strong>Portuguese<\/strong>, <strong>Hindi<\/strong>, <strong>Spanish<\/strong>, and <strong>Thai<\/strong>.<\/li>\n\n\n\n<li>For <strong>image+text applications<\/strong>, only <strong>English<\/strong> is supported.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Use Cases of Llama 3.2 Vision<\/h2>\n\n\n\n<p>Here are some practical applications of Llama 3.2 Vision:\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>Image Captioning<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Generate descriptive text for images, which is helpful for accessibility and content management.<\/li>\n\n\n\n<li><strong>Example Use:<\/strong> Automatically caption photos for a photography blog.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>Image Question Answering<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Answer questions about images for educational or analytical purposes.<\/li>\n\n\n\n<li><strong>Example Use:<\/strong> Answering \u201cHow many people are in this picture?\u201d for an event analysis.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>Visual Reasoning<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Understand and analyze the relationships between objects in images.<\/li>\n\n\n\n<li><strong>Example Use:<\/strong> Determining if there is enough space to park a car in an image.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong>Object Recognition<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Identify and classify objects within an image.<\/li>\n\n\n\n<li><strong>Example Use:<\/strong> Detecting various items in a supermarket shelf image for inventory tracking.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">5. <strong>Scene Understanding<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Provide contextual information about a scene, such as whether it\u2019s indoors or outdoors.<\/li>\n\n\n\n<li><strong>Example Use:<\/strong> Identifying a living room setting in a smart home system.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Example Code for Using Llama 3.2 Vision<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Python Example<\/h3>\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-4\">import ollama\n\nresponse = ollama.chat(\n    model=&#039;llama3.2-vision&#039;,\n    messages=[{\n        &#039;role&#039;: &#039;user&#039;,\n        &#039;content&#039;: &#039;How many animals are in this image?&#039;,\n        &#039;images&#039;: [&#039;path\/to\/your\/image.jpg&#039;]  # Replace with your image path\n    }]\n)\n\nprint(response)<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#import%20ollama%0A%0Aresponse%20%3D%20ollama.chat%28%0A%20%20%20%20model%3D%27llama3.2-vision%27%2C%0A%20%20%20%20messages%3D%5B%7B%0A%20%20%20%20%20%20%20%20%27role%27%3A%20%27user%27%2C%0A%20%20%20%20%20%20%20%20%27content%27%3A%20%27How%20many%20animals%20are%20in%20this%20image%3F%27%2C%0A%20%20%20%20%20%20%20%20%27images%27%3A%20%5B%27path%2Fto%2Fyour%2Fimage.jpg%27%5D%20%20%23%20Replace%20with%20your%20image%20path%0A%20%20%20%20%7D%5D%0A%29%0A%0Aprint%28response%29\">\n                            <button class=\"copy-button\" data-label=\"import ollama\n\nresponse = ollama.chat(\n    model=&#039;llama3.2-vision&#039;,\n    messages=[{\n        &#039;role&#039;: &#039;user&#039;,\n        &#039;content&#039;: &#039;How many animals are in this image?&#039;,\n        &#039;images&#039;: [&#039;path\/to\/your\/image.jpg&#039;]  # Replace with your image path\n    }]\n)\n\nprint(response)\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2. JavaScript Example<\/h3>\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-5\">import ollama from &#039;ollama&#039;;\n\nconst response = await ollama.chat({\n    model: &#039;llama3.2-vision&#039;,\n    messages: [{\n        role: &#039;user&#039;,\n        content: &#039;What is the person in this image doing?&#039;,\n        images: [&#039;path\/to\/your\/image.jpg&#039;]  \/\/ Replace with your image path\n    }]\n});\n\nconsole.log(response);<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#import%20ollama%20from%20%27ollama%27%3B%0A%0Aconst%20response%20%3D%20await%20ollama.chat%28%7B%0A%20%20%20%20model%3A%20%27llama3.2-vision%27%2C%0A%20%20%20%20messages%3A%20%5B%7B%0A%20%20%20%20%20%20%20%20role%3A%20%27user%27%2C%0A%20%20%20%20%20%20%20%20content%3A%20%27What%20is%20the%20person%20in%20this%20image%20doing%3F%27%2C%0A%20%20%20%20%20%20%20%20images%3A%20%5B%27path%2Fto%2Fyour%2Fimage.jpg%27%5D%20%20%2F%2F%20Replace%20with%20your%20image%20path%0A%20%20%20%20%7D%5D%0A%7D%29%3B%0A%0Aconsole.log%28response%29%3B\">\n                            <button class=\"copy-button\" data-label=\"import ollama from &#039;ollama&#039;;\n\nconst response = await ollama.chat({\n    model: &#039;llama3.2-vision&#039;,\n    messages: [{\n        role: &#039;user&#039;,\n        content: &#039;What is the person in this image doing?&#039;,\n        images: [&#039;path\/to\/your\/image.jpg&#039;]  \/\/ Replace with your image path\n    }]\n});\n\nconsole.log(response);\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<h3 class=\"wp-block-heading\">3. cURL Example<\/h3>\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-6\">curl http:\/\/localhost:11434\/api\/chat -d &#039;{\n    &quot;model&quot;: &quot;llama3.2-vision&quot;,\n    &quot;messages&quot;: [\n        {\n            &quot;role&quot;: &quot;user&quot;,\n            &quot;content&quot;: &quot;What is in this image?&quot;,\n            &quot;images&quot;: [&quot;&lt;base64-encoded image data&gt;&quot;]\n        }\n    ]\n}&#039;<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#curl%20http%3A%2F%2Flocalhost%3A11434%2Fapi%2Fchat%20-d%20%27%7B%0A%20%20%20%20%22model%22%3A%20%22llama3.2-vision%22%2C%0A%20%20%20%20%22messages%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22role%22%3A%20%22user%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22content%22%3A%20%22What%20is%20in%20this%20image%3F%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22images%22%3A%20%5B%22%3Cbase64-encoded%20image%20data%3E%22%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D%27\">\n                            <button class=\"copy-button\" data-label=\"curl http:\/\/localhost:11434\/api\/chat -d &#039;{\n    &quot;model&quot;: &quot;llama3.2-vision&quot;,\n    &quot;messages&quot;: [\n        {\n            &quot;role&quot;: &quot;user&quot;,\n            &quot;content&quot;: &quot;What is in this image?&quot;,\n            &quot;images&quot;: [&quot;&lt;base64-encoded image data&gt;&quot;]\n        }\n    ]\n}&#039;\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<p><strong>Note:<\/strong> For the cURL example, replace <code>\"&lt;base64-encoded image data&gt;\"<\/code> with the actual base64-encoded string of your image.\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>This tutorial should help you get Llama 3.2 Vision up and running on your Mac, and you can start exploring its diverse capabilities across image and text tasks. Happy experimenting!\n","protected":false},"excerpt":{"rendered":"<p>Llama 3.2 Vision is a collection of advanced, instruction-tuned, multimodal large language models (LLMs) optimized for image reasoning, image captioning, and more. This guide will [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":1417,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[252,17,21],"class_list":["post-1408","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-artificial-intelligence","tag-llama-3-2-vision","tag-mac-m1-m2-m3","tag-ollama"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/posts\/1408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/comments?post=1408"}],"version-history":[{"count":5,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/posts\/1408\/revisions"}],"predecessor-version":[{"id":1418,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/posts\/1408\/revisions\/1418"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/media\/1417"}],"wp:attachment":[{"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/media?parent=1408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/categories?post=1408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/tags?post=1408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}