STORY
Introducing Prem - Self Sovereign AI Infrastructure
AUTHOR
Joined 2023.07.04
DATE
VOTES
sats
COMMENTS

Introducing Prem - Self Sovereign AI Infrastructure

The Problem

The prevailing issue in the current AI landscape is the dominance of centralized "big-tech" organizations that control the most advanced models. These models are typically closed-source, hosted on the cloud, costly, and lack verifiable privacy options.

Simultaneously, while there's been a surge of innovation from the Open Source Community, such as the text-to-image Stable diffusion in 2022 and the recent release of the Llama model from Meta, these developments have not been without their challenges. The rapid improvements and the increasing performance of open-source LLMs are indeed promising. However, the problem lies in the technical complexities associated with integrating these open-source LLMs into applications.

Despite the potential for individuals and organizations worldwide to harness the power of AI without reliance on large tech firms, the technical hurdles associated with open-source LLMs create a high entry barrier. This complexity is a significant problem that prevents widespread adoption and usage of these potentially transformative technologies.

What is Prem

Prem is a fully open-source AI Platform that allows you to test and deploy state of the art open-source AI models on your own infrastructure.

Prem Benefits

πŸš€ One-Click Deployment: Launch your AI models with a single click.
🌐 Offline Operations: Seamlessly perform operations and access features without an internet connection.
πŸ”’ Privacy-centric Design: Prioritize user privacy and data protection through a thoughtfully designed system.
πŸ”Œ Effortless Integration: Seamlessly implement machine learning models with the user-friendly API interface for LLM models.
🌍 Ready for the Real World: Bypass the complexities of inference optimizations. Prem’s got you covered.
πŸƒβ€β™‚οΈ Rapid Iterations, Instant Results: Develop, test, and deploy your application in minutes.

How to Install Prem

You can install Prem in two different ways:

MacOS Desktop App

Download here the Desktop App: https://github.com/premAI-io/prem-app/releases

8GB+ RAM required to be allocated to your Docker engine.

Installer Script

Run the Installer Script in your Linux server:

wget -q https://get.prem.ninja/install.sh -O install.sh; sudo bash ./install.sh

Getting Started with LangChain

Run the LLM from the GUI

When Prem App is up and running, you can see all the services available. With just one click you can download the service.

While waiting for the download to be completed, learn more about the service in the detail view. Just click on the card and you will be redirected to the service page. Each service page is packaged with some general info as well as complete documentation giving more details into the model exposed. When the download has been completed, just click on Open and the service will start. You can interact with the service from the playground or from APIs.

You can check the port on which the service is running from the service detail view.

Build your AI App

Now that the service is running, you can connect to it at http://localhost:8111 and start building. Here is a simple snippet using LangChain to connect to the service.

import os

from langchain.chat_models import ChatOpenAI
from langchain.schema import AIMessage, HumanMessage

os.environ["OPENAI_API_KEY"] = "random-string"

chat = ChatOpenAI(openai_api_base="<http://localhost:8111/api/v1>", max_tokens=128)

messages = [
    HumanMessage(content="Can you explain what is a large language model?")
]
chat(messages)

Certainly! A large language model is a type of machine learning algorithm that has been trained on a very large dataset of text to learn how to generate human-like language. These models can be used for tasks such as text generation, question answering, and natural language processing. In this project, we will use the Hugging Face Transformers library to train a large language model on a dataset of text and then fine-tune it on a smaller dataset of text related to fashion and beauty.

messages = [
    HumanMessage(content="Write me a story about a superstar.")
]
chat(messages)

Once upon a time, there was a young woman who had always dreamed of becoming a star. She sang like a bird, danced like a dream, and captivated every audience she performed for with her sheer talent and charm.

When she was just starting out, she worked tirelessly to make her mark on the music industry, taking any opportunity that came her way and honing her skills day by day. Finally, after years of hard work and dedication, she was offered a record deal and shot to fame almost overnight, becoming an instant superstar in the process.

People everywhere were captivated by this talented young woman, who seemed to have it all: the voice, the looks, the style, and the stage presence that left audiences begging for more. She quickly became a household name, known for her infectious smile, her magnetic energy, and the way she made everyone feel like they knew her personally.

As she continued to tour and perform, the superstar began to accumulate an enormous following, with fans from all

And Done πŸŽ‰ You are now using Prem with LangChain.

Learn how to build your Private AI Applications. Check out our Developer Portal https://dev.premai.io

Conclusion

Our vision is to create a Simple, Developer Friendly, Open Ecosystem that speaks to all developers. From web developers to AI engineers, you will be able deploy and finetune open source models in a matter of clicks.