Introduction to Sagify
Sagify is a project designed to simplify and streamline the process of managing machine learning workflows on AWS SageMaker. Its primary focus is to take the complexity out of building machine learning models by allowing developers to concentrate on model development rather than the intricacies of infrastructure management. With Sagify’s modular architecture, users can leverage both open-source and proprietary large language models through a unified interface, courtesy of its LLM Gateway module.
Key Features
Simplified Deployment
Sagify helps users to deploy machine learning models on AWS SageMaker with ease. This includes a no-code option for deploying large language models (LLMs) such as the Stable Diffusion model. The deployment process is designed to be straightforward, requiring users to configure their AWS account and run a command to get started.
Modular Architecture
The project includes an LLM Gateway, which is an API that provides access to various large language models. This modular design enables the integration of different models into existing workflows seamlessly, facilitating a versatile approach to machine learning tasks.
Backend Platforms
Sagify supports both OpenAI and open-source models for different types of tasks such as chat completions, image creations, and embeddings.
-
OpenAI Models: Sagify provides access to models like GPT-4 for chat completions, DALL-E for image creation, and text embeddings. Users can retrieve a list of these supported models using specific commands within the Sagify interface.
-
Open-Source Models: The project supports models including Llama-2 for chat completions and Stability AI’s Stable Diffusion for image creations, among others. These models are seamlessly integrated with AWS SageMaker.
Installation
To install Sagify, the following prerequisites are necessary:
- Python version 3.7 or higher
- Docker installed and operational
- AWS CLI configured properly
Once these are set up, Sagify can be installed using the Python package installer with the command: pip install sagify
.
Deploying LLM Gateway
Sagify allows both local and cloud-based deployment options for the FastAPI LLM Gateway. Locally, the gateway is deployed using Docker, and for AWS cloud deployments, users can utilize AWS Fargate.
Local Deployment
For local deployment, environment variables must be configured to connect either to AWS SageMaker or OpenAI. Once configured, users can deploy the gateway using a simple command, and the running Docker container can be managed with standard Docker commands.
Cloud Deployment
Cloud deployment involves creating a Docker image of the FastAPI LLM Gateway and pushing it to Amazon ECR. AWS Fargate manages the containerized application through a task definition detailing how the container should be run. Essential configuration settings are stored within this task definition along with specified environment variables.
API Usage
Once deployed, the Sagify LLM Gateway provides an API to interact with different large language models. The API can handle tasks like chat completions, generating embeddings, and creating images. Examples and documentation are accessible through the gateway, offering detailed instructions on executing these functions.
Why Sagify?
Sagify was created from the realization that no single large language model could cater to all needs. Therefore, it provides a flexible and accessible solution that integrates various models within a unified platform, simplifying the workflow for developers and machine learning practitioners.
Sagify is here to make LLMs and ML accessible and manageable through intuitive interfaces and streamlined processes. It is perfectly suited for those looking to engage with advanced machine learning techniques without the heavy lifting associated with infrastructure management.