This cloud is just someone else's computer.
Lilypad enables users to run AI workloads easily in a decentralized GPU network where anyone can get paid to connect their compute nodes to the network and run jobs. Users have access to easy Stable Diffusion XL and cutting edge open source LLMs both on chain, from CLI and via Lilypad AI Studio on the web.
Welcome to the prerelease series of Lilypad v2.
The testnet has a base curency of ETH and you will also get LP to pay for jobs (and nodes to stake).
Metamask:
Network name: Lilypad v2 Aurora testnet
New RPC URL: http://testnet.lilypad.tech:8545
Chain ID: 1337
Currency symbol: ETH
Block explorer URL: (leave blank)
To obtain funds, go to http://faucet.lilypad.tech:8080
The faucet will give you both ETH (to pay for gas) and LP (to stake and pay for jobs).
Download the latest release of Lilypad for your platform. Both the amd64/x86_64 and arm64 variants of macOS and Linux are supported. (If you are on Apple Silicon, you'll want arm64).
The commands below will automatically detect your OS and processor architecture and download the correct Lilypad build for your machine.
# Detect your machine's architecture and set it as $OSARCH
OSARCH=$(uname -m | awk '{if ($0 ~ /arm64|aarch64/) print "arm64"; else if ($0 ~ /x86_64|amd64/) print "amd64"; else print "unsupported_arch"}') && export OSARCH
# Detect your operating system and set it as $OSNAME
OSNAME=$(uname -s | awk '{if ($1 == "Darwin") print "darwin"; else if ($1 == "Linux") print "linux"; else print "unsupported_os"}') && export OSNAME;
# Download the latest production build
curl -sSL -o lilypad https://github.com/bacalhau-project/lilypad/releases/download/v2.0.0-701b8cb/lilypad-$OSNAME-$OSARCH
# Make Lilypad executable and install it
chmod +x lilypad
sudo mv lilypad /usr/local/bin/lilypad
You can also, at your option, choose to compile Lilypad using Go and install it that way on any machine that supports the Go toolchain.
export WEB3_PRIVATE_KEY=<your private key>
(or arrange for the key to be in your environment in a more secure way that doesn't get written to your shell history)
lilypad run cowsay:v0.0.1 -i Message="moo"
lilypad run sdxl:v0.9-lilypad1 -i PromptEnv="PROMPT=beautiful view of iceland with a record player"
lilypad serve
systemd units & more details here
Check the github releases page for each module or just use the git hash as the tag.
A module is just a git repo.
Module versions are just git tags.
In your repo, create a file called lilypad_module.json.tmpl
See cowsay for example
This is a json template with Go text/template style {{.Message}}
sections which will be replaced by Lilypad with json encoded inputs to modules. You can also do fancy things with go templates like setting defaults, see cowsay for example. While developing a module, you can use the git hash to test it.
Pass inputs as:
lilypad run github.com/username/repo:tag -i Message=moo
Inputs are a map of strings to strings.
YOU MUST MAKE YOUR MODULE DETERMINISTIC
Tips:
- Make the output reproducible, for example for the diffusers library, see here
- Strip timestamps and time measurements out of the output, including to stdout/stderr
- Don't read any sources of entropy (e.g. /dev/random)
- When referencing docker images, you MUST specify their sha256 hashes, as shown in this example
If your module is not deterministic, compute providers will not adopt it and add it to their allowlists.
subt
: Thesubt
function allows for substitutions in your template, a feature that addresses the issue outlined in #14.
This function is a workaround for the lack of direct substitution support in the module. It implements the printf function under the hood, which allows you to format strings with placeholders.