- 27 Oct 2024
- Print
- DarkLight
- PDF
Models
- Updated On 27 Oct 2024
- Print
- DarkLight
- PDF
Overview
AI models are computer programs that can perform tasks that typically require human intelligence. These models are trained on data to learn and can be used for various tasks, from making predictions to understanding language or recognizing patterns in images.
The Marketplace's Models tab showcases foundation model architectures, encompassing organization and project scope-level models. These foundational models serve as the basis for initiating model management, installing models, versioning, and training with diverse datasets.
These models can then be trained using your data to facilitate pre-annotations of your labels. Choose from these public model architectures to establish the initial model version.
In the card view, the following details about each model are presented:
- Model Image
- Model Name
- Model Category (for example, Provider, Media Type, License)
- Trainable or Non-Trainable Models
- Last Updated Timestamp
Utilize the filter, search, and sort features to easily locate a specific model based on your requirements.
Additionally, upon selecting a model card from the list, a detailed information panel will appear on the right side.
- Auto Update option
- Available Actions
- The Model Description and a GitHub location link.
- Details, such as:
- Status
- Privacy: Public, Project, or Organization
- Created, Installed, and Updated Date
- Email ID of the user who installed it.
- Content information, such as:
- Component Name
- Installation Status
- Model Names
- A link to view models page.
Model's Search and Filters
The search and filter feature allows you to efficiently locate and select specific AI models from models' library of Dataloop platform.
The available filter options are:
- [Filter Models by Categories]
- [Filter Models by Installation Status]
- [Filter Models by Privacy Level]
- [Filter Models by Trainability Status]
- [Filter Models by Model Type]
Search a Model
Use the Search a Model field to type in the name of the model to search it.
Filter Models by Category
Marketplace allows you to filter models using categories. In the left-side panel, search models using the following categories. Select one or more categories to refine the list of models according to your choice. To remove the filter, simply click on the selected filter category once more.
- Provider: Filter models based on the organizations or companies that develop, train, host, and distribute AI technologies. Examples include Dataloop, Google, Meta, AWS, etc.
- Deployed By: Narrow down models by filtering for organizations and companies that have deployed their applications or models within the Dataloop marketplace.
- Media Type: Select models based on the type of data they handle, such as Audio, Image, Text, Video, etc. Each media type corresponds to specific AI models and techniques designed to process, generate, or enhance that form of data.
- Computer Vision: Focus on models that specialize in analyzing visual data like images and videos to extract meaningful information. Examples include Object Detection, Classification, Semantic Segmentation, etc.
- NLP (Natural Language Processing): Filter models that are designed to understand, interpret, and generate human language. Examples include Text Classification, Token Classification, Translation, etc.
- Audio: Choose models based on their ability to process and analyze audio data. This includes models for tasks like Text to Speech, Audio Classification, Automatic Speech Recognition, and Embeddings.
- Gen AI: Filter models based on their classification as Large Language Models (LLM) or Large Multimodal Models (LMM) within the broader category of General AI. This helps identify models with advanced capabilities in language and multimodal tasks.
- License: Select models according to their licensing agreements, ensuring that the chosen model aligns with your legal, project, and ethical requirements. Examples include End User License Agreement (EULA), MIT License, Apache License 2.0, etc.
Filter Models by Trainability Status
Marketplace allows you to filter models by whether they are Trainable or Non-Trainable. This sorting helps manage and select models based on whether they can be adapted to new data or are to be used in a fixed state. In the top-right-side, filter models using the trainability status.
- Trainable: These models can be updated or fine-tuned with new data, allowing them to improve or adapt over time.
- Non-Trainable: These models cannot be further trained. They are used as-is, suitable for situations where the model's behavior should remain consistent over time.
Filter Models by Model Type
When managing machine learning models in a platform or Marketplace, you can enhance your workflow by filtering models based on their Model Type. This allows you to quickly identify and select models that align with your specific use case. The available model types are:
- Predictive: Primarily used to forecast outcomes or classify data based on historical or input data. These models learn from existing data to make informed predictions about new, unseen data. Common Use Cases are Classification, Regression, Anomaly Detection, etc.
- Generative (Gen AI): Generative models, also known as Generative AI, are designed to create new data instances that resemble a given dataset. These models learn the underlying distribution of the data and generate new samples that follow this learned distribution. Common Use Cases are Text Generation, Image Generation, Data Augmentation, Content Creation, etc.
- Embeddings: Embeddings models are used to convert complex data, like text, images, or other types, into fixed-size numerical vectors (embeddings) that capture the essential features of the data. These embeddings can then be used for various downstream tasks. Common Use Cases are Similarity Search, Clustering, Data Curation, Retrieval-Augmented Generation (RAG), etc.
Add Your Own Model
Connect your own models to the Dataloop's platform by placing them in a GIT repository and allowing Dataloop to access it.
To train your model in the Dataloop system, it should have a Train function that facilitates the training process you wish to facilitate.
You can upload your own model to Dataloop by using SDK.
Model Adaptor
The Model Adaptor is a python class to create a single API between Dataloop’s platform and your Model. By inheriting from a Dataloop class dl.BaseModelAdapter
that facilitates all the necessary functions, all that is left is to create these 4 methods:
- Train
- Predict
- Load (to load model weights)
- Save (to save model weights)
For example, your model adaptor can be:
import dtlpy as dl
import torch
import os
class SimpleModelAdapter(dl.BaseModelAdapter):
def load(self, local_path, **kwargs):
print('loading a model')
self.model = torch.load(os.path.join(local_path, 'model.pth'))
def save(self, local_path, **kwargs):
print('saving a model to {}'.format(local_path))
torch.save(self.model, os.path.join(local_path, 'model.pth'))
def train(self, data_path, output_path, **kwargs):
print('running a training session')
def predict(self, batch, **kwargs):
print('predicting batch of size: {}'.format(len(batch)))
preds = self.model(batch)
return preds
The following sections will help you understand the model in detail.
Actions Based on Installation Status and Usage Scope
You can perform actions that are available on each model based on the scope and installation status of the model. To learn more, refer to the Actions's Availability Based on Use Cases section.
How to Install a Dataloop's Model to the Model Management?
- Open the Marketplace -> Dataloop Hub from the left-side menu.
- In the Models tab, select the model that you want to install.
- Click Install from the right-side panel. The Install Model popup window is displayed, and it lists all the models available in the DPK with a description and indicate if the selected model is trainable or not.
- Select the model variations from the list and click Install Model. A confirmation message is displayed, and click on the View Model to view it under the Model Management → Versions tab.
Once you install a model, there is a green tick icon is visible on the models that are installed.
How to Add Models after Installing the DPK?
After the Model DPK installation, you can add another models for this DPK, based on the DPK model components.
- Open the Marketplace -> Dataloop Hub from the left-side menu.
- In the Models tab, select the model that you want to add.
- Click Add Model from the right-side panel. An Add Model(s) popup window is displayed, and it lists all the models available in the DPK with a description and indicate, if the selected model is trainable or not.
- Select the model variations from the list and click Add Model. A confirmation message is displayed, and click on the View Model to view it under the Model Management → Versions tab.
Once you install a model, there is a green tick icon is visible on the models that are installed.
For other actions, refer to the following:
- How to Activate or Deactivate an Application?
- How to Copy Installation ID?
- How to Copy Application ID?
- How to View Audit Logs?
- How to Uninstall an Application?
- How to Delete an Application?