Skip to Content
DocumentationModel Bundling ServiceQuick Start

Model Bundling Service Quick Start

Model Bundling Service is a command-line interface (CLI) for creating and managing model bundles for Liquid Edge AI Platform (LEAP). This guide will help you quickly get started with the tool.

Here is a typical user workflow:

  • Download an open source base model.
  • Customize the base model with your own dataset e.g. by finetuning.
  • Create a model bundle using the leap-bundle CLI for LEAP SDK.

Compatability Note: The Model Bundling Service will work with any finetuned model, as long as the model architecture comes from a base model that is part of the LEAP model library.

Install

pip install leap-bundle

Authenticate

  1. Sign in on the LEAP website 

  2. Click the account icon on the top right, and go to your profile

  3. Select the API keys tab and create a new API key

api-key-screenshot

  1. Authenticate the Model Bundling Service with your API token:
leap-bundle login <api-key>

Example output:

Validating API token... Successfully logged in to LEAP platform!

Create model bundle

  1. Prepare your model checkpoint.
  2. Create a bundle request:
leap-bundle create <path-to-your-model-checkpoint>

Example output:

Calculating directory hash... Submitting bundle request... Bundle request created with ID: 1 Starting upload... Uploading directory... Upload completed successfully! Request ID: 1
  1. Check request status:
leap-bundle list

Example output:

Bundle Requests (50 most recent) ┏━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ID Input Path Status Creation Notes ┡━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ 1 /path/to/your/model/directory processing 2024-01-15T10:30:00Z Request is being processed. └──────┴─────────────────────────────────┴──────────────┴────────────────────────┴─────────────────────────────┘ Found 1 bundle requests.

Get details for a specific request:

leap-bundle list <request-id>

Example output:

Request Details: ID: 1 Input Path: /path/to/your/model/directory Status: completed Creation: 2024-01-15T10:30:00Z Update: 2024-01-15T10:45:00Z Notes:
  1. When the request is Completed, you can download the bundle:
leap-bundle download <request-id>

Example output:

Requesting download for bundle request 1... Download URL obtained for request 1 Downloading bundle output... Download completed successfully! File saved to: input-8da4w_output_8da8w-seq_8196.bundle

The model bundle file will be saved in the current directory with a .bundle extension.

Complete Example

Here’s a complete example showing the full workflow:

# 1. Install and authenticate pip install leap-bundle leap-bundle login <api-key> leap-bundle whoami # 2. Create a bundle request leap-bundle create <model-directory> # 3. Monitor the request (repeat until completed) leap-bundle list # 4. Download when ready leap-bundle download <request-id> # 5. Your bundle file is now ready to use! ls -la <downloaded-bundle-file>

Managing Requests

Cancel a Request

If you need to cancel a request that’s still processing:

leap-bundle cancel <request-id>

Example output:

Cancelling bundle request 1... Request cancelled successfully.

Log out

You can log out to clear your stored credentials:

leap-bundle logout

Example output:

Successfully logged out from LEAP platform!

Next Steps

Last updated on