> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liquid.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> The Bundling Service helps users create and manage model bundles for Liquid Edge AI Platform (LEAP). Currently users interact with it through a command-line interface (CLI).

The CLI supports two main workflows:

* **GGUF Model Download**: Download pre-built models from the LEAP Model Library (no authentication required)
* **Model Bundling**: Create bundles from your own fine-tuned models (requires authentication)

## Install

```
pip install leap-bundle
```

## Requirements

Before using the Model Bundle Tool, ensure your system meets the following requirements:

* **Python 3.8 or higher**: The CLI tool is built with Python and requires at least version 3.8.
* **`pip` installed**: You need `pip` to install the CLI tool and its dependencies.
* **AWS services access**: Model uploads use Amazon Web Services (AWS) for file storage. Ensure you can access `amazonaws.com` domains from your network. If you're behind a corporate firewall or VPN, you may need to configure network settings to allow access to AWS services.

<Info>
  If model uploads fail with connectivity errors, verify that your network allows access to AWS services and that DNS resolution is working properly.
</Info>

## Quick Start

<Tabs>
  <Tab title="Download LEAP Models">
    Download GGUF models from the [LEAP Model Library](https://leap.liquid.ai/models). **No authentication required.**

    ```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
    leap-bundle download <model-name> [--quantization <quantization>]
    ```

    Example:

    ```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
    leap-bundle download LFM2-1.2B --quantization Q5_K_M
    ```

    The command will:

    1. Resolve the appropriate manifest URL for the model/quantization.
    2. Create an output directory based on the URL or according to `--output-path` if specified.
    3. Download the JSON manifest file for the given combination of model and quantization, if it exists.
    4. Download all model files referenced in the manifest.
    5. Update the local manifest to use relative paths to the downloaded files.

    <Info>
      Manifest downloads don't require authentication with `leap-bundle login`. They work immediately after installation.
    </Info>
  </Tab>

  <Tab title="Bundle Custom Models">
    Create bundles from your own fine-tuned models. **Requires authentication.**

    <Info>
      **Compatibility Note:** The Model Bundling Service will work with any fine-tuned model, as long as the model architecture comes from a base model that is part of the LEAP model library.
    </Info>

    ### 1. Authenticate

    1. Sign in on the [LEAP website](https://leap.liquid.ai/sign-in)

    2. Click the account icon on the top right, and go to your [`profile`](https://leap.liquid.ai/profile)

    3. Select the [`API keys` tab](https://leap.liquid.ai/profile#/api-keys) and create a new API key

           <img src="https://mintlify.s3.us-west-1.amazonaws.com/liquidai/images/deployment/tools/model-bundling/assets/images/api-keys-51242efd637d71dd5e7f4eb01555cd78.png" alt="api-key-screenshot" />

    4. Authenticate the Model Bundling Service with your API token:

    ```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
    leap-bundle login <api-key>
    ```

    Example output:

    ```
    ℹ Validating API token...
    ✓ Successfully logged in to LEAP platform!
    ```

    ### 2. Create model bundle

    1. Prepare your model checkpoint.
    2. Create a bundle request:

    ```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
    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
    ```

    3. Check request status:

    ```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
    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:

    ```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
    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:
    ```

    4. When the request is `Completed`, download the bundle:

    ```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
    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: model-Q4_K_M.gguf
    ```

    The model files will be saved in the current directory.

    ### Complete Example

    Here's a complete example showing the full workflow:

    ```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
    # 1. Install and authenticate
    pip install leap-bundle
    leap-bundle login <api-key>
    leap-bundle whoami

    # 2. Create a bundle request (GGUF by default)
    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 model files are now ready to use!
    ls -la <downloaded-model-files>
    ```

    ### Managing Requests

    #### Cancel a Request

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

    ```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
    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:

    ```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
    leap-bundle logout
    ```

    Example output:

    ```
    ✓ Successfully logged out from LEAP platform!
    ```

    <Accordion title="Legacy: ExecuTorch Bundling">
      ExecuTorch bundling is deprecated and may be removed in a future version. Use GGUF bundling (the default) for new projects.

      To create an ExecuTorch bundle instead of GGUF:

      ```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
      leap-bundle create <model-directory> --executorch
      ```

      ExecuTorch bundling produces `.bundle` files instead of `.gguf` files.
    </Accordion>
  </Tab>
</Tabs>

## Next Steps

* Visit the [LEAP Model Library](https://leap.liquid.ai/models) to explore available models.
* Check the [Bundle Creation](/deployment/tools/model-bundling/bundle-creation) page for detailed command reference.
