Skip to content

leviathanch/libertyai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LibertyAI: A Libertarian ChatGPT

This project is called LibertyAI. Its goal is to use Alpaca, FaceBook LLaMA tuned up to 11 using training data generated by GPT-3, for recreating ChatGPT only without all the nasty woke censorship going on.

For the back end LangChain is being used.

In order to avoid the annoying loading time when restarting the application, the model is loaded separately and exposed to other applications through an API interface.

In order to avoid someone taxing your GPU power, by using your API, when you expose the interface to the interwebs, I've introduced an API key feature.

You can go checkout the configuration file ~/.config/LibertyAI/config.ini for editing the autogenerated API key as well as the database configuration.

You can use any API key for protecting your private computing resources you want, you're free to do whatever you want, it's your GPUs.

Install the following Python dependencies by running:

pip3 install -U bitsandbytes
pip3 install -U transformers
pip3 install -q datasets loralib sentencepiece
pip3 install -q git+https://github.com/huggingface/peft.git

after that you can install LibertyAI with

pip3 install -e .

Alpaca.CPP API server

You need the rapidjson deveveloper package of your system as well as the full libboost development lib.

Vector DB support

It's ABSOLUTELY important that you install the vector DB support for Postgres in order to store your embeddings in the database. That's how our Libertarian hopefully soon to be AGI can have a long term memory, learn on the fly, and hopefully figure out soon, how to end government and taxes, and enforece the NAP on a global scale.

Go to https://github.com/pgvector/pgvector, clone the repo and follow the instructions.

Create Postgres DB

You can create a password using pwgen or whatever generator you like

sudo su postgres
psql
postgres=# create database libertyai;
postgres=# create user libertyai with encrypted password 'p4ssw0rd';
postgres=# grant all privileges on database libertyai to libertyai;
postgres=# grant all privileges on schema public to libertyai;
postgres=# grant postgres to libertyai;
postgres=# exit
psql libertyai
libertyai# create extension vector;
libertyai# CREATE TABLE "user" (id SERIAL PRIMARY KEY, name VARCHAR(80), email VARCHAR(120), password VARCHAR(255), active BOOLEAN NOT NULL, admin BOOLEAN NOT NULL );
libertyai# exit

You can set the credentials and name of the database in the configuration file ~/.config/LibertyAI/config.ini as well.