======
Models
======

Browsing models
===============

Anaconda hosts a repository of open-source and partner models that you can explore and use to test and develop your applications.

.. tip::
    
    Use the search function to locate models by name.

        .. thumbnail:: /img/ai_nav_search_models.png
                :align: center

.. _model_type: 

Model types
-----------

Anaconda AI Navigator currently supports the following types of models:

``text-generation``: Designed to produce coherent and contextually relevant natural language based on user input. Common use cases for ``text-generation`` models are:
    
    * **Content Creation** - Drafting articles, outlines, summaries, or creative pieces
    * **Coding Assistance** - Generating or autocompleting code and troubleshooting issues
    * **Data Extraction** - Summarizing and interpreting large datasets to uncover insights
    * **Conversational AI** - Driving chatbots and virtual assistants to create "human-like" dialogue

``sentence-similarity``: Encodes text into a vector database (embedding) that captures semantic meaning. These embeddings enable efficient comparison and analysis of text based on contextual relationships. Common use cases for ``sentence-similarity`` models are: 

    * **Semantic Search** - Finding documents or items contextually similar to a query, beyond keyword matching
    * **Recommendation Systems** - Suggesting relevant items by comparing semantic similarity to user preferences
    * **Text Classification** - Categorizing text (e.g., spam detection, sentiment analysis) based on meaning
    * **Clustering Analysis** - Grouping similar text data to uncover patterns or organize information

`Contact us if you are interested in specific models or use cases <https://docs.google.com/forms/d/e/1FAIpQLSfOOUTjMJpMdIuEZddcTCht5MqI4t-FcfPDfRj671X0V8H-QQ/viewform?usp=sf_link>`_. 

Filtering models
================

You can apply filters to help you efficiently locate the models that you want to use. 

To apply a filter:

#. From the |brain| **Models** page, click |filter-list| **Filter**.
#. Open a filter dropdown and select a filter option. 
#. Repeat as necessary to filter down to only the models you want. 

Model filters:
    * **Purpose** - Filter models based on their associated :ref:`model type <model_type>`.
    * **Language** - Filter models by which spoken languages they can understand.
    * **License** - Filter models based on their usage permissions and restrictions, such as permissive, non-commercial, or specific distribution terms.
    * **Date Published** - Filter models based on the date they were published to AI Navigator. Click |refresh| **Refresh** to reset the currently applied date filter. 

Click the |circle-x| beside any filter to remove it, or click **Clear** in the |filter-list| **All Filters** panel to clear all filters at once. 

    .. thumbnail:: /img/ai_nav_model_filters.png
        :align: center

Downloading models
==================

Anaconda provides a variety of LLM models for you to work with, constructed at various levels of :ref:`quantization <glossary-quantization-method>`.  

To download a model:

#. Select |brain| **Models** from the left-hand navigation.
#. Locate a model you want to download. 
#. Open the **Quantization Method** dropdown and select a file quantization level, then click |down-arrow| **Download** to download the model locally.

    .. thumbnail:: /img/ai_nav_model_quant_method.png
        :align: center

    .. note:: 
        
        Models that show a **Downloaded** tag on their tile indicate that you have downloaded at least one file for that model.

Managing downloads
==================

**Pause**, **Resume**, or **Cancel** a download by using the buttons below the progress bar at the bottom of the model's tile, or by navigating to the |download| **Downloaded Models** page and using |pause| **pause**, |play| **play**, or |ban| **cancel** beside the progress bar.  

    .. thumbnail:: /img/ai_nav_tile_download_controls.png
        :align: center

    .. note:: 

        A download's status is displayed on the tile below the progress bar. Downloads automatically pause if you exit the application for any reason.

Viewing model details
=====================

Click on a model's tile to view its details. From here, you can read a brief description of the model and see important information about it, such as its file size at each quantization level, :ref:`parameter count <glossary-parameters>`, the quality you can expect from the model's output, how much resource usage can be expected by the model, and its intended purpose (for use in either development or production).

.. thumbnail:: /img/ai_nav_model_details.png
    :align: center

.. tip:: 

    * Hover over a |circle-info| tooltip to view detailed information about the various aspects of a model. 
    * Click **Learn more** |arrow-up-right-from-square| to visit the Huggingface webpage of the organization that built the model. 

.. |ban| raw:: html

    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em"><path d="M385.1 419.1L92.9 126.9C64.8 162.3 48 207.2 48 256c0 114.9 93.1 208 208 208c48.8 0 93.7-16.8 129.1-44.9zm33.9-33.9C447.2 349.7 464 304.8 464 256c0-114.9-93.1-208-208-208c-48.8 0-93.7 16.8-129.1 44.9L419.1 385.1zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"/></svg> 

.. |download| raw:: html

    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em"><path d="M280 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V294.1l-95-95c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9L239 369c9.4 9.4 24.6 9.4 33.9 0L409 233c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-95 95V24zM128.8 304H64c-35.3 0-64 28.7-64 64v80c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V368c0-35.3-28.7-64-64-64H383.2l-48 48H448c8.8 0 16 7.2 16 16v80c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V368c0-8.8 7.2-16 16-16H176.8l-48-48zM432 408a24 24 0 1 0 -48 0 24 24 0 1 0 48 0z"/></svg>

.. |brain| raw:: html
    
    <svg class="inline" width="1em" height="1em" viewBox="0 0 20 21" xmlns="http://www.w3.org/2000/svg"><path d="M20 12.0625C20 13.2344 19.5312 14.3281 18.7109 15.1484L18.75 15.1875C18.75 17.0625 17.3828 18.5859 15.6641 18.8984C15 19.875 13.9062 20.5 12.6562 20.5C11.6016 20.5 10.625 20.0703 10 19.3281C9.33594 20.0703 8.35938 20.5 7.34375 20.5C6.05469 20.5 4.96094 19.875 4.29688 18.8984C2.57812 18.5859 1.25 17.0625 1.25 15.1875V15.1484C0.429688 14.3281 0 13.2344 0 12.0625C0 11.0078 0.351562 9.99219 1.01562 9.25C0.9375 8.9375 0.9375 8.625 0.9375 8.3125C0.9375 7.0625 1.5625 5.92969 2.53906 5.26562C2.69531 4.13281 3.35938 3.15625 4.33594 2.60938C4.84375 1.39844 6.05469 0.5 7.5 0.5C8.47656 0.5 9.33594 0.929688 10 1.59375C10.625 0.929688 11.4844 0.5 12.5 0.5C13.9062 0.5 15.1172 1.39844 15.625 2.60938C16.6016 3.15625 17.2656 4.13281 17.4219 5.26562C18.3984 5.92969 19.0625 7.0625 19.0625 8.3125C19.0625 8.625 19.0234 8.9375 18.9453 9.25C19.6094 9.99219 20 11.0078 20 12.0625ZM9.0625 6.125V3.9375C9.0625 3.07812 8.35938 2.375 7.5 2.375C6.60156 2.375 5.9375 3.07812 5.9375 3.9375C5.9375 3.97656 5.9375 3.97656 5.9375 3.97656C5.03906 4.13281 4.375 4.91406 4.375 5.8125C4.375 6.04688 4.41406 6.28125 4.49219 6.47656C3.51562 6.55469 2.8125 7.375 2.8125 8.3125C2.8125 8.89844 3.04688 9.40625 3.47656 9.75781C2.53906 10.1094 1.875 11.0078 1.875 12.0625C1.875 13.0781 2.46094 13.9375 3.32031 14.3672C3.20312 14.6016 3.125 14.9141 3.125 15.1875C3.125 16.2422 3.94531 17.0625 5 17.0625C5.19531 17.0625 5.42969 17.0234 5.625 16.9844C5.625 17.8828 6.40625 18.625 7.34375 18.625C8.28125 18.625 9.0625 17.8828 9.0625 16.9062V11.125H6.875C6.52344 11.125 6.25 11.4375 6.25 11.75V12.5312C6.79688 12.7656 7.1875 13.3125 7.1875 13.9375C7.1875 14.8359 6.48438 15.5 5.625 15.5C4.72656 15.5 4.0625 14.8359 4.0625 13.9375C4.0625 13.3125 4.41406 12.7656 5 12.5312V11.75C5 10.7344 5.82031 9.875 6.875 9.875H9.0625V7.375H8.28125C8.04688 7.96094 7.5 8.3125 6.875 8.3125C5.97656 8.3125 5.3125 7.64844 5.3125 6.75C5.3125 5.89062 5.97656 5.1875 6.875 5.1875C7.5 5.1875 8.04688 5.57812 8.28125 6.125H9.0625ZM7.5 6.75C7.5 6.4375 7.1875 6.125 6.875 6.125C6.52344 6.125 6.25 6.4375 6.25 6.75C6.25 7.10156 6.52344 7.375 6.875 7.375C7.1875 7.375 7.5 7.10156 7.5 6.75ZM6.25 13.9375C6.25 13.625 5.9375 13.3125 5.625 13.3125C5.27344 13.3125 5 13.625 5 13.9375C5 14.2891 5.27344 14.5625 5.625 14.5625C5.9375 14.5625 6.25 14.2891 6.25 13.9375ZM16.6406 14.3672C17.5 13.9375 18.125 13.0781 18.125 12.0625C18.125 11.0078 17.4219 10.1094 16.4844 9.75781C16.9141 9.40625 17.1875 8.89844 17.1875 8.3125C17.1875 7.375 16.4453 6.55469 15.4688 6.47656C15.5469 6.28125 15.625 6.04688 15.625 5.8125C15.625 4.91406 14.9219 4.13281 14.0234 3.97656C14.0234 3.97656 14.0625 3.97656 14.0625 3.9375C14.0625 3.07812 13.3594 2.375 12.5 2.375C11.6016 2.375 10.9375 3.07812 10.9375 3.9375V9.875H11.875C12.1875 9.875 12.5 9.60156 12.5 9.25V8.19531C11.9141 7.96094 11.5625 7.41406 11.5625 6.75C11.5625 5.89062 12.2266 5.1875 13.125 5.1875C13.9844 5.1875 14.6875 5.89062 14.6875 6.75C14.6875 7.41406 14.2969 7.96094 13.75 8.19531V9.25C13.75 10.3047 12.8906 11.125 11.875 11.125H10.9375V13.3125H12.3047C12.5391 12.7656 13.0859 12.375 13.75 12.375C14.6094 12.375 15.3125 13.0781 15.3125 13.9375C15.3125 14.8359 14.6094 15.5 13.75 15.5C13.0859 15.5 12.5391 15.1484 12.3047 14.5625H10.9375V16.9062C10.9375 17.8828 11.6797 18.625 12.6562 18.625C13.5547 18.625 14.3359 17.8828 14.3359 16.9844C14.5312 17.0234 14.7656 17.0625 15 17.0625C16.0156 17.0625 16.875 16.2422 16.875 15.1875C16.875 14.9141 16.7578 14.6016 16.6406 14.3672ZM13.125 13.9375C13.125 14.2891 13.3984 14.5625 13.75 14.5625C14.0625 14.5625 14.375 14.2891 14.375 13.9375C14.375 13.625 14.0625 13.3125 13.75 13.3125C13.3984 13.3125 13.125 13.625 13.125 13.9375ZM12.5 6.75C12.5 7.10156 12.7734 7.375 13.125 7.375C13.4375 7.375 13.75 7.10156 13.75 6.75C13.75 6.4375 13.4375 6.125 13.125 6.125C12.7734 6.125 12.5 6.4375 12.5 6.75Z"/></svg>

.. |circle-info| raw:: html

    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em"><path d="M256 32a224 224 0 1 1 0 448 224 224 0 1 1 0-448zm0 480A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM208 352c-8.8 0-16 7.2-16 16s7.2 16 16 16h96c8.8 0 16-7.2 16-16s-7.2-16-16-16H272V240c0-8.8-7.2-16-16-16H216c-8.8 0-16 7.2-16 16s7.2 16 16 16h24v96H208zm48-168a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"/></svg>

.. |arrow-up-right-from-square| raw:: html 
    
    <svg class="inline" width="1em" height="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M336 0c-8.8 0-16 7.2-16 16s7.2 16 16 16H457.4L212.7 276.7c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L480 54.6V176c0 8.8 7.2 16 16 16s16-7.2 16-16V16c0-8.8-7.2-16-16-16H336zM64 32C28.7 32 0 60.7 0 96V448c0 35.3 28.7 64 64 64H416c35.3 0 64-28.7 64-64V304c0-8.8-7.2-16-16-16s-16 7.2-16 16V448c0 17.7-14.3 32-32 32H64c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32H208c8.8 0 16-7.2 16-16s-7.2-16-16-16H64z"/></svg>

.. |filter-list| raw:: html 

    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em"><path d="M27.6 64C12.4 64 0 76.4 0 91.6c0 6.7 2.4 13.2 6.8 18.2L112 230V360c0 10 4.7 19.5 12.7 25.5l76.2 57.5c4.2 3.2 9.4 4.9 14.7 4.9c13.5 0 24.4-10.9 24.4-24.4V230L345.2 109.8c4.4-5 6.8-11.5 6.8-18.2C352 76.4 339.6 64 324.4 64H27.6zM140 213.5L37.3 96H314.7L212 213.5c-2.6 2.9-4 6.7-4 10.5V408.3L144 360V224c0-3.9-1.4-7.6-4-10.5zM336 400c-8.8 0-16 7.2-16 16s7.2 16 16 16H496c8.8 0 16-7.2 16-16s-7.2-16-16-16H336zM320 256c0 8.8 7.2 16 16 16H496c8.8 0 16-7.2 16-16s-7.2-16-16-16H336c-8.8 0-16 7.2-16 16zM400 80c-8.8 0-16 7.2-16 16s7.2 16 16 16h96c8.8 0 16-7.2 16-16s-7.2-16-16-16H400z"/></svg>

.. |pause| raw:: html 

    <i class="fa-solid fa-pause"></i>

.. |play| raw:: html 

    <i class="fa-solid fa-play"></i>

.. |circle-x| raw:: html 

    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM186.3 136.5L256 218.8l69.7-82.3c8.6-10.1 23.7-11.4 33.8-2.8s11.4 23.7 2.8 33.8L287.4 256l74.9 88.5c8.6 10.1 7.3 25.3-2.8 33.8s-25.3 7.3-33.8-2.8L256 293.2l-69.7 82.3c-8.6 10.1-23.7 11.4-33.8 2.8s-11.4-23.7-2.8-33.8L224.6 256l-74.9-88.5c-8.6-10.1-7.3-25.3 2.8-33.8s25.3-7.3 33.8 2.8z"/></svg>

.. |refresh| raw:: html

    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em"><path d="M496 200c0 13.3-10.7 24-24 24h0H360 328c-13.3 0-24-10.7-24-24s10.7-24 24-24h32 54.1l-52.1-52.1C333.8 95.8 295.7 80 256 80c-72.7 0-135.2 44.1-162 107.1c-5.2 12.2-19.3 17.9-31.5 12.7s-17.9-19.3-12.7-31.5C83.9 88.2 163.4 32 256 32c52.5 0 102.8 20.8 139.9 57.9L448 142.1V88l0-.4V56c0-13.3 10.7-24 24-24s24 10.7 24 24V200zM40 288H152c13.3 0 24 10.7 24 24s-10.7 24-24 24H97.9l52.1 52.1C178.2 416.2 216.3 432 256 432c72.6 0 135-43.9 161.9-106.8c5.2-12.2 19.3-17.8 31.5-12.6s17.8 19.3 12.6 31.5C427.8 424 348.5 480 256 480c-52.5 0-102.8-20.8-139.9-57.9L64 369.9V424c0 13.3-10.7 24-24 24s-24-10.7-24-24V312c0-13.3 10.7-24 24-24z"/></svg>

.. |down-arrow| raw:: html

    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em"><path d="M32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32H352c17.7 0 32 14.3 32 32s-14.3 32-32 32H32zM214.6 342.6c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 242.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V242.7l73.4-73.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-128 128z"/></svg>