Skip to main content

Covalent Blueprints: a toolkit for creating pre-packaged, reusable Covalent projects.

Project description

Covalent Blueprints Banner

Plug-and-play Covalent workflows and service deployments.

Covalent Blueprints are pre-configured applications for Covalent. Each blueprint is runnable both on its own and as a component in another workflow. See the catalogue below for a list of available blueprints.

Example: Deploy a Llama 3 chatbot backend

Run a Llama3 chatbot on H100 GPUs in just a few lines.

from covalent_blueprints import store_secret, save_api_key
from covalent_blueprints_ai import llama_chatbot

# Set credentials
save_api_key("<covalent-cloud-api-key>")
store_secret(name="HF_TOKEN", value="<huggingface-write-token>")

# Initialize a blueprint
bp = llama_chatbot(model_name="meta-llama/Meta-Llama-3-70B-Instruct")

# Customize compute resources (e.g. 2x H100 GPUs)
bp.executors.service_executor.gpu_type = "h100"
bp.executors.service_executor.num_gpus = 2
bp.executors.service_executor.memory = "240GB"

# Run the blueprint
llama_client = bp.run()

The llama_chatbot blueprint returns a Python client for the deployed service.

llama_client.generate(prompt="How are you feeling?", max_new_tokens=100)
How are you feeling? How are you doing?
I am feeling well, thank you for asking. I am a machine learning model, so I don't have emotions or feelings in the way that humans do.
llama_client.generate_message(
    messages=[
        {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
        {"role": "user", "content": "Who are you?"},
    ]
)
{'role': 'assistant', 'content': "Arrrr, me hearty! Me be Captain Chatterbeard, the scurviest chatbot to ever sail the seven seas o' conversation! Me be here to swab yer decks with me witty banter, me treasure trove o' knowledge, and me trusty cutlass o' clever responses! So hoist the colors, me matey, and set course fer a swashbucklin' good time! What be bringin' ye to these fair waters?"}

Release compute resources with a single line.

llama_client.teardown()

Blueprints catalogue

👉 Each link below points to an example notebook.

pip install -U covalent-blueprints-ai
Blueprint Description
Image Generator Deploy a text-to-image generator service.
Llama Chatbot Deploy a chatbot backend using a Llama-like model.
LoRA fine tuning Fine tune and deploy an LLM as a Covalent service.
vLLM Deploy an LLM using vLLM on Covalent Cloud.
NVIDIA Llama RAG Deploy a retrieval-augmented generation (RAG) pipeline using multiple NVIDIA NIMs.

More coming soon...

Contributing

Public contributions will soon be open! In the meantime, please reach out on Slack to contribute a blueprint.

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

covalent_blueprints-0.6.1rc0.tar.gz (35.8 kB view details)

Uploaded Source

Built Distribution

covalent_blueprints-0.6.1rc0-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file covalent_blueprints-0.6.1rc0.tar.gz.

File metadata

File hashes

Hashes for covalent_blueprints-0.6.1rc0.tar.gz
Algorithm Hash digest
SHA256 4821ca5a30741a6c445e6b1c15cb905c2f520049649a5d488592cffe9e38a57b
MD5 87b734c09a3c39596069905ce4c07d7d
BLAKE2b-256 3de76e1f2951e39309fa28287c2b4545cdae531a93f3646087d07facea5dc330

See more details on using hashes here.

File details

Details for the file covalent_blueprints-0.6.1rc0-py3-none-any.whl.

File metadata

File hashes

Hashes for covalent_blueprints-0.6.1rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf8fd6c608a7372ba905c38b9890976caeff2b4a396ca41f6c1844bce5fdbc6c
MD5 c9e0640feb2807b3433c9c4ef2e4ea74
BLAKE2b-256 2bc52200a7bfc7897b7e43ca117193f84307b7b0d92e8789a3adbfb2b51d27f5

See more details on using hashes here.

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