• Stars
    star
    250
  • Rank 161,487 (Top 4 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 1 year ago
  • Updated 23 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Production-ready Generative AI for local, cloud native, airgap, and edge deployments.

LeapfrogAI Logo

Table of Contents

  1. Project Goal
  2. Why Host Your Own LLM?
  3. Features
  4. Getting Started
  5. Usage
  6. License
  7. Community

Project Goal

LeapfrogAI is designed to provide AI-as-a-service in egress limited environments. This project aims to bridge the gap between resource-constrained environments and the growing demand for sophisticated AI solutions, by enabling the hosting of APIs that provide AI-related services.

Our services include vector databases, completions with models like Large Language Models (LLMs), and the creation of embeddings. These AI capabilities can be easily accessed and integrated with your existing infrastructure, ensuring the power of AI can be harnessed irrespective of your environment's limitations.

Why Host Your Own LLM?

Large Language Models (LLMs) are a powerful resource for AI-driven decision making, content generation, and more. However, the use of cloud-based LLMs can introduce limitations such as:

  • Data Privacy and Security: Sending sensitive information to a third-party service may not be suitable or permissible for all types of data or organizations. By hosting your own LLM, you retain full control over your data.

  • Cost: Pay-as-you-go AI services can become expensive, especially when large volumes of data are involved. Running your own LLM can often be a more cost-effective solution in the long run.

  • Customization and Control: By hosting your own LLM, you have the ability to customize the model's parameters, training data, and more, tailoring the AI to your specific needs.

  • Latency: If your application requires real-time or near-real-time responses, hosting the model locally can significantly reduce latency compared to making a round trip to a remote API.

Features

  • LeapfrogAI provides an API that closely matches that of OpenAI's. This feature allows tools that have been built with OpenAI/ChatGPT to function seamlessly with LeapfrogAI as a backend. This compatibility greatly simplifies the transition process for developers familiar with OpenAI's API, and facilitates easy integration with existing systems.

  • Vector Databases: Our vector database service allows you to perform efficient similarity searches on large scale databases. This feature can be utilized to augment prompts with responses from VectorDBs, enhancing the contextual awareness of the model.

  • Fine-Tuning Models: One of the key strengths of LeapfrogAI is its ability to leverage customer specific data. We provide capabilities to fine-tune models with your data, enabling the AI to better understand your domain and provide more accurate and contextually relevant outputs.

  • Embeddings Creation: Embeddings are fundamental to the working of many AI algorithms. LeapfrogAI provides services to generate embeddings which can be used for a variety of tasks such as semantic similarity, clustering, and more.

Architecture

Leapfrog exposes both Weaviate and LLM and embedding generative capabilities over HTTP. However, internal communications are a combination of gRPC and HTTP connections as described below:

graph LR;
    A[User] --HTTP--> L[LeapfrogAI]
    L ---->|HTTP| B(API)
    B ----> |gRPC| C(StableLM)
    B ----> |gRPC| D(WhisperAI)
    B ----> |gRPC| E(all-MiniLM-L6-v2)

    L ---->|HTTP| W[Weaviate]
    W --/embeddings-->B

Getting Started

Setting up the Kubernetes Cluster

LeapfrogAI's API server and weaviate's vector database don't require GPUs, however some models will not function without GPUs. If using a CPU based platform, see the ctransformers folder for working with GGML architectures.

K3d w/ GPU support

If developing on a node that has a GPU, there's a Zarf package that deploys a k3d cluster with GPU support here. To deploy the zarf package simply:

zarf package deploy oci://ghcr.io/runyontr/zarf-package-k3d/k3d-local:v1.26.0-amd64

on a node with at least 1 GPU

Initialize Cluster

The supported install method uses zarf to initialize the cluster and then deploy Big Bang on top:

zarf init -a amd64
zarf package deploy oci://ghcr.io/defenseunicorns/packages/dubbd-k3d:0.4.2-amd64

Deploy

To build and deploy Leapfrg

zarf package create .
zarf package deploy zarf-package-leapfrogai-*.zst --confirm

Configure DNS

Ensure that the DNS record for *.bigbang.dev points to the load balancer for Istio. By default this DNS record points at localhost, so for the k3d deployment, this should work out of the box with the load balancers configured. For a remote EKS deployment, you may need to

The OpenAI API service is hosted and is watching for new models to get installed in the cluster.

Install a model

$ cd models/test/repeater
$ zarf package create .
$ zarf package deploy zarf-package-*.zst --confirm
$ kubectl get pods -n leapfrogai
NAME                              READY   STATUS    RESTARTS   AGE
api-deployment-65cd6fbf95-l5dzw   2/2     Running   0          5m23s

Usage

Reference one of the ipythonnotebooks that showcase a simple getting started.

Leapfrog AI

Leapfrog AI is a deployable AI-as-a-service that brings the capabilities of AI models to egress limited environments by allowing teams to deploy APIs that mirror OpenAI's spec. Teams are able to use tools built around OpenAIs models in their own environment, preventing the release of proprietary and sensitive data to SaaS tools.

In addition, tools like Weaviate are deployed to allow for the creation of content augmented applications.

Create the API Server

See the Getting Started Notebook for example of using the API with the OpenAI python module.

Building leapfrogai and updating PyPi

  1. Change the version in pyproject.toml
  2. python3 -m pip install --upgrade build hatchling twine
  3. python3 -m build
  4. python3 -m twine upload dist/*

Community

Real-time discussions about LeapfrogAI development happen in Discord. Discussions should be civil and focused on the open source development of LeapfrogAI. Distribution of proprietary or non-distributable code or model weights are prohibited and will be removed.

LeapfrogAI is supported by a community of users and contributors, including:

Defense Unicorns logoBeast Code logoHypergiant logoPulze logo

Want to add your organization or logo to this list? Open a PR!

More Repositories

1

zarf

DevSecOps for Air Gap & Limited-Connection Systems. https://zarf.dev/
Go
341
star
2

lula

The Compliance Validator
Go
138
star
3

pepr

Type safe K8s middleware for humans
TypeScript
123
star
4

zarf-package-software-factory

Pre-built Zarf Package of a Software Factory (a.k.a. "DI2-ME")
Go
33
star
5

uds-package-dubbd

Defense Unicorns Big Bang Distro
Shell
25
star
6

uds-cli

Go
24
star
7

uds-core

A secure runtime platform for mission-critical capabilities
TypeScript
21
star
8

tadpole

The fastest way to get started with LeapfrogAI
Makefile
20
star
9

go-oscal

Repository for the generation of OSCAL data types
Go
14
star
10

maru-runner

The Unicorn Task Runner
Go
8
star
11

leapfrogai-api

LeapfrogAI API
Python
8
star
12

uds-package-software-factory

Replaced by https://github.com/defenseunicorns/uds-software-factory
Go
8
star
13

component-generator

Generate and aggregate OSCAL component definition files
Go
7
star
14

uds-rke2-image-builder

Packer builds to produce STIG'd RKE2 images
HCL
7
star
15

bigbang-architecture-diagrams

Architecture diagrams for Platform One's Big Bang
7
star
16

zarf-package-bare-metal

[experimental] A package to deploy Zarf on bare metal machines
Shell
6
star
17

zarf-website

Public website for Zarf
TypeScript
5
star
18

bigbang-oscal-component-generator

(likely temporary) location for a CLI tool that generates an oscal-component.yaml file for Big Bang by collecting all subcomponents
Go
5
star
19

pepr-keycloak-authsvc

Pepr Keycloak AuthSvc Reusable Capability
TypeScript
5
star
20

zarf-package-k3d-airgap

Deploy k3d in an air-gapped environment
Shell
5
star
21

zarf-package-dev-dependencies

An example / experiment on how to include development dependencies inside of a Zarf package
Shell
5
star
22

uds-package-mattermost

🏭 UDS Mattermost Zarf Package
TypeScript
5
star
23

sparkle-academy

Repo for Sparkle Academy exercises
HCL
4
star
24

leapfrogai-backend-rag

Python
4
star
25

grimoire

A collection of scripts and utilities to help unicorns do their jobs efficiently and effectively!
Shell
4
star
26

leapfrogai-images

Chainguard-derived images for LeapfrogAI
Makefile
4
star
27

uds-capability-rook-ceph

Makefile
3
star
28

doug-translate

Svelte
3
star
29

zarf-docs

JavaScript
3
star
30

bigbang-bootstrap-template

Template repository for bigbang bootstraps and demos.
3
star
31

packages

Zarf Packages
Svelte
3
star
32

leapfrogai-backend-ctransformers

ctransformers wrapper for model inferencing
Python
3
star
33

terraform-aws-iam-ra-demo

A Terraform generation module to build IAM Roles Anywhere artifacts demo both NPE and CAC temporary role granting
HCL
3
star
34

leapfrogai-backend-llama-cpp-python

LeapfrogAI backend using llama-cpp-python
Python
3
star
35

zarf-init-aws

Zarf Init Package for AWS - DevSecOps for Air Gap & Limited-Connection Systems. https://zarf.dev/
TypeScript
3
star
36

zarf-init-longhorn

Zarf Init Package for Longhorn - DevSecOps for Air Gap & Limited-Connection Systems. https://zarf.dev/
Mustache
3
star
37

pepr-excellent-examples

Welcome to the Pepr Examples Repository!
TypeScript
3
star
38

uds-security-hub

All things about securing UDS
Go
2
star
39

common-go

Common libraries for πŸ¦„ go things
2
star
40

doc-site-template

Template repository for creating product documentation
SCSS
2
star
41

zarf-package-rke2-init

An alternative zarf init package that deploys rke2
Shell
2
star
42

uds-package-arc

UDS Package for GitHub Actions Runner Controller
2
star
43

sbom-cli

Go
2
star
44

leapfrogai-docs

Merged into LeapfrogAI main repo
SCSS
2
star
45

leapfrog-model-skeleton

Smarty
2
star
46

uds-common

Common tasks for UDS Packages
2
star
47

leapfrogai-backend-vllm

Python
2
star
48

leapfrogai-backend-text-embeddings

LeapfrogAI backend for text embedding generation
Python
2
star
49

uds-support-charts

A Zarf skeleton package for deploying applications using flux
2
star
50

delivery-zarf-init

2
star
51

narwhal-delivery-zarf-package-eks-addons

Handles zarf packaging of multiple add-ons for EKS
Makefile
2
star
52

big-bang-app

HCL
1
star
53

asdf-zarf

asdf plugin for Zarf (Not officially adopted, use at your own risk)
Shell
1
star
54

uds-capability-gitlab

Platform One Gitlab deployed via flux
Shell
1
star
55

uds-idam

TypeScript
1
star
56

kubeflow-pipelines

Smarty
1
star
57

leapfrogai-grpc

Shared Protobufs and gRPC Code for LeapfrogAI
1
star
58

uds-sso

TypeScript
1
star
59

svelte-pdf-viewer

Svelte
1
star
60

uds-common-workflows

Repository containers common github workflows and actions for UDS
1
star
61

delivery-nutanix-deployments

HCL
1
star
62

baffles-infra

A repository containing scripts to bootstrap Kubernetes with Baffles on various cloud and on-prem providers.
HCL
1
star
63

data-derby-weather-forecaster-serving

Python
1
star
64

unicorn-academy

Repository for all things Unicorn Academy.
Svelte
1
star
65

zarf-public-test

A test repository for Zarf `git` pushing / pulling
1
star
66

leapfrog-chat

An internal, RLHF-oriented example of a chat app using LeapfrogAI's tooling
JavaScript
1
star
67

medium-gists

Not large gists, or small ones for that matter. But Medium ones.
1
star
68

uds-leapfrogai

A UDS Capability for AI for National Security
1
star
69

asdf-opentofu

ASDF plugin for OpenTofu
Shell
1
star
70

zarf-ui

Web User Interface for Zarf - DevSecOps for Air Gap & Limited-Connection Systems. https://zarf.dev/
TypeScript
1
star
71

uds-capability-redis

Bigbang Redis deployed via flux by zarf
Go
1
star
72

uds-package-sonarqube

🏭 UDS Sonarqube Zarf Package
TypeScript
1
star