Skip to content

Commit

Permalink
wake up
Browse files Browse the repository at this point in the history
  • Loading branch information
swellington committed Mar 12, 2024
1 parent 273cb58 commit 180cee4
Show file tree
Hide file tree
Showing 82 changed files with 28,129 additions and 18 deletions.
60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Bug report
description: Create a report to help us improve
labels: [bug]
assignees: []

body:
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
id: reproduce
attributes:
label: To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Run command '...'
3. Scroll down to '....'
4. See error
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true

- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
validations:
required: false

- type: input
id: environment
attributes:
label: Environment
description: Please specify your OS and Distro, and BasedAI Version.
placeholder: "OS and Distro: [e.g. Linux Ubuntu, Linux Fedora, etc.], BasedAI Version [e.g. 0.0.2]"
validations:
required: true

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context about the problem here.
validations:
required: false

39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Feature request
description: Suggest an idea for this project
labels: [feature]
assignees: []

body:
- type: textarea
id: problem-description
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is.
placeholder: "Ex. I'm a fan of X for [...]"
validations:
required: true

- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false

34 changes: 34 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Package

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
31 changes: 13 additions & 18 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
MIT License
The MIT License (MIT)
Copyright © 2024 Based Labs

Copyright (c) 2024 BasedAI
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the “Software”), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of
the Software.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
SHELL:=/bin/bash

init-venv:
python3 -m venv venv && source ./venv/bin/activate

clean-venv:
source ./venv/bin/activate && \
pip freeze > make_venv_to_uninstall.txt && \
pip uninstall -r make_venv_to_uninstall.txt && \
rm make_venv_to_uninstall.txt

clean:
rm -rf dist/ && \
rm -rf build/ && \
rm -rf basedai.egg-info/ && \
rm -rf .pytest_cache/ && \
rm -rf lib/

install:
python3 -m pip install .

install-dev:
python3 -m pip install '.[dev]'

install-cubit:
python3 -m pip install '.[cubit]'
100 changes: 100 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<div align="center">

# **BasedAI**
[![Research](https://img.shields.io/badge/arXiv-2403.01008v1-red.svg)](https://arxiv.org/abs/2403.01008)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
---
[Documentation](https://docs.getbased.ai/)[Token](https://app.uniswap.org/explore/tokens/ethereum/0x44971abf0251958492fee97da3e5c5ada88b9185)[Twitter](https://twitter.com/getbasedai)

</div>

BasedAI is a decentralized network built to enable end-to-end private computations on distributed GPU infrastructure. The flagship 'Brain' of BasedAI is allows for Fully Homomorphic Encryption (FHE) of Large Language Models (LLMs), effectively creating Zero-Knowledge LLMs (ZK-LLMs).

For detailed understanding of the BasedAI network and its groundbreaking approach with ZK-LLMs, please refer to our [research paper](https://arxiv.org/abs/2403.01008).

# Install

1. To get started with BasedAI:

```bash
# pip install basedai
```

# Getting Started

In the BasedAI ecosystem, users participate through an integrated wallet system that supports operations with BasedAI's native token, $BASED. The wallet enables users to stake tokens on different Brains in the ecosystem and earn rewards for contributions.

To get started with managing wallets and tokens:

1. Create a new wallet through the BasedAI CLI:
```bash
# create a wallet
basedcli wallet new_personalkey
```

2. Interact with your wallet via the BasedAI CLI.
```bash
# check the balances of your wallet
basedcli wallet balance
```
3. Join as a Brain miner or validators with a compute key:
```bash
# check the balances of your wallet
basedcli wallet new_personalkey
```

4. Get some test $BASED
```bash
# minimal mining of test $BASED
basedcli wallet faucet
```

```bash
# create a new compute wallet for agents operating on your behalf in the network
basedcli wallet new_computekey
```

2. Interact with your wallet via the BasedAI CLI.
```bash
# check the balances of your wallet
basedcli wallet balance
```

For further instructions on token management and participation in the network, please refer to the [official documentation](https://docs.getbased.ai/).

## Using the CLI

The BasedAI Command Line Interface (CLI) will be the primary tool for interacting with Brains, managing wallets, participating in computation tasks as miners or validators, and engaging in the token economy of BasedAI.

For a list of possible commands:
```bash
basedcli help
```

## The BasedAI PIP Package

The BasedAI package includes essential tools included `basedai` (the Python operations package for developers) and `basedcli` (for setting up mining, validation activities, and querying ZK-LLMs). Learn more in the [official documentation](https://docs.getbased.ai).

## Governance and Voting

BasedAI embraces decentralized decision-making through Pepecoin-linked "Brains". Owners of GigaBrains, representing significant staked contributions, can participate in voting on key network decisions, upholding the ecosystem's democratic governance model.

For voting procedures:
```bash
# vote for a proposal
basedcli brains vote <proposal-id> <option>
```

## License
The MIT License (MIT)
Copyright © 2024 Based Labs

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

## For More Information

For further information and updates on BasedAI, please visit the [official website](https://getbased.ai) or consult the initial [research paper](https://getbased.ai/whitepaper).
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.1
31 changes: 31 additions & 0 deletions basedai.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Metadata-Version: 2.1
Name: basedai
Version: 1.0.1
Summary: basedai
Home-page: https://github.com/basedproto/basedai
Author: getbased.ai
Author-email:
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

#
Loading

0 comments on commit 180cee4

Please sign in to comment.