Skip to main content

Package for training and deploying doctrinally correct LLMs.

Project description

AI for the Church

Modern LLMs are rooted in secular value systems that are often misaligned with religious organisations. This PyPI package allows anyone to train and deploying doctrinally correct LLMs based on Llama2. Effectively, we are aligning models to a set of values.

from aiforthechurch import align_llama2
doctrinal_dataset = "/path/to/csv"
align_llama2(doctrinal_dataset)

aiforthechurch is integrated with HuggingFace shuch that the aligned model will be automatically pushed to your HuggingFace repo of choice at the end of the training.

At aiforthechurch.org we provide tools for generating doctrinal datasets, a few examples are available at huggingface.co/AiForTheChurch.

Model Training requirements

If you wish to train your models using this repo you will need access to a machine with over 16GB of GPU memory and 30GB RAM. The full model weights for Llama2-7B amount to almost 30GB, but we use parameter-efficient fine-tuning (PEFT) LoRA to save memory and avoid any catastrophic forgetting during the fine-tuning procedure.

References

We leaned heavily on open-source libraries like transformers, peft, and bitsandbytes for this project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiforthechurch-0.4.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

aiforthechurch-0.4-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file aiforthechurch-0.4.tar.gz.

File metadata

  • Download URL: aiforthechurch-0.4.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for aiforthechurch-0.4.tar.gz
Algorithm Hash digest
SHA256 c59cdb6fac50047a2aa63ff20901979c9517ca8b337bbdd9710ca7fa0fd29354
MD5 cb7a6e171ac6a9710110f037081ae88d
BLAKE2b-256 4b498f34c8d026a800fedf7a63cda99f47776865aa83a309e63e253feda3c27a

See more details on using hashes here.

Provenance

File details

Details for the file aiforthechurch-0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for aiforthechurch-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bd416783e25dfd69f252c4faa375c64f7e2ebeb8450d4e8ef9ff57d0363ed926
MD5 270e13aff7b54b9630d5153a57f30883
BLAKE2b-256 4ab13672d4ddf7aab034b8a9183c17fcee9aabe44872eef2562418a9771a3aae

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page