You are viewing an older version (26.4). For up-to-date documentation, see the latest version (26.7).

Deployments#

Deployment Overview#

Backend.AI lets you deploy AI models as inference services through the Deployments feature. A deployment exposes a model behind a stable endpoint URL that end-user applications (mobile apps, web service backends, internal tools, and so on) can call to run inference.

Figure 13.1

A deployment extends a regular compute session with automated maintenance, replica scaling, and a permanent endpoint address that does not change as replicas come and go. You only specify the scaling parameters you want; Backend.AI creates, monitors, and terminates the underlying inference sessions automatically so you do not have to manage them by hand.

How to Create and Use a Deployment#

Starting from version 26.4.0, you can create a deployment easily without a separate configuration file.

Quick Deploy (Recommended): Browse pre-configured models in the Model Store and click the Deploy button to deploy immediately.

Manual Deploy: Click the New Deployment button on the Deployments page to open the Create Deployment modal. After the deployment is created, add a revision by clicking Add Revision on the Deployment Detail Page and selecting a runtime variant such as vLLM or SGLang.

The general workflow is as follows:

  1. Create a deployment (name, visibility, and resource group).
  2. Add a revision (runtime variant, image, resources, and model storage).
  3. (If the deployment is not public) Generate a token.
  4. (For end users) Access the service endpoint to verify the service.
  5. (If needed) Add a new revision or apply a previous revision.
  6. (If needed) Terminate the deployment.
Advanced: Using Model Definition and Service Definition Files (Custom Runtime)

If you are using the Custom runtime variant or need finer control, you can create and use model definition and service definition files:

  1. Create a model definition file.
  2. Create a service definition file.
  3. Upload the definition files to the model type folder.
  4. When adding a revision, select the Custom runtime variant and choose Use Config File mode.

For details, refer to the Creating a Model Definition File and Creating a Service Definition File sections.

Reference: Configuration Files for Custom Runtime

Creating a Model Definition File#

NOTE

From 24.03, you can configure model definition file name. But if you don't input any other input field in model definition file path, then the system will regard it as model-definition.yml or model-definition.yaml.

The model definition file contains the configuration information required by the Backend.AI system to automatically start, initialize, and scale the inference session. It is stored in the model type folder independently from the container image that contains the inference service engine. This allows the engine to serve different models based on specific requirements and eliminates the need to build and deploy a new container image every time the model changes. By loading the model definition and model data from the network storage, the deployment process can be simplified and optimized during automatic scaling.

The model definition file follows the following format:

yaml
models:
  - name: "simple-http-server"
    model_path: "/models"
    service:
      start_command:
        - python
        - -m
        - http.server
        - --directory
        - /home/work
        - "8000"
      port: 8000
      health_check:
        path: /
        interval: 10.0
        max_retries: 10
        max_wait_time: 15.0
        expected_status_code: 200
        initial_delay: 60.0

Key-Value Descriptions for Model Definition File

NOTE

Fields without "(Required)" mark are optional.

  • name (Required): Defines the name of the model.

  • model_path (Required): Addresses the path of where model is defined.

  • service: Item for organizing information about the files to be served (includes command scripts and code).

    • pre_start_actions: Actions to be executed before the start_command. These actions prepare the environment by creating configuration files, setting up directories, or running initialization scripts. Actions are executed sequentially in the order defined.

      • action: The type of action to perform. See Prestart Actions for available action types and their parameters.
      • args: Action-specific parameters. Each action type has different required arguments.
    • start_command (Required): Specify the command to be executed in model serving. Can be a string or a list of strings.

    • port (Required): Container port for the model service (e.g., 8000, 8080).

    • health_check: Configuration for periodic health monitoring of the model service. When configured, the system automatically checks if the service is responding correctly and removes unhealthy instances from traffic routing.

      • path (Required): HTTP endpoint path for health check requests (e.g., /health, /v1/health).
      • interval (default: 10.0): Time in seconds between consecutive health checks.
      • max_retries (default: 10): Number of consecutive failures allowed before marking the service as UNHEALTHY. The service continues receiving traffic until this threshold is exceeded.
      • max_wait_time (default: 15.0): Timeout in seconds for each health check HTTP request. If no response is received within this time, the check is considered failed.
      • expected_status_code (default: 200): HTTP status code that indicates a healthy response. Common values: 200 (OK), 204 (No Content).
      • initial_delay (default: 60.0): Time in seconds to wait after container creation before starting health checks. This allows time for model loading, GPU initialization, and service warmup. Set higher values for large models (e.g., 300.0 for 70B+ LLMs).

Understanding Health Check Behavior

The health check system monitors individual model service containers and automatically manages traffic routing based on their health status.

① AppProxy: Traffic Routing Control

Figure 13.2

② Manager: Health State Management and Eviction

Figure 13.3

NOTE

The internal health status (used for traffic routing) may not be immediately synchronized with the status displayed in the user interface.

Time to UNHEALTHY:

  • Initial startup: initial_delay + interval × (max_retries + 1)

    Example with defaults: 60 + 10 × 11 = 170 seconds (about 3 minutes)

  • During operation (after healthy): interval × (max_retries + 1)

    Example with defaults: 10 × 11 = 110 seconds (about 2 minutes)

Description for Service Action Supported in Backend.AI Model Serving

  • write_file: This is an action to create a file with the given file name and append control to it. the default access permission is 644.

    • arg/filename: Specify the file name
    • body: Specify the content to be added to the file.
    • mode: Specify the file's access permissions.
    • append: Set whether to overwrite or append content to the file as True or False .
  • write_tempfile: This is an action to create a file with a temporary file name (.py) and append content to it. If no value is specified for the mode, the default access permission is 644.

    • body: Specify the content to be added to the file.
    • mode: Specify the file's access permissions.
  • run_command: The result of executing a command, including any errors, will be returned in following format ( out: Output of the command execution, err: Error message if an error occurs during command execution)

    • args/command: Specify the command to executed as an array. (e.g. python3 -m http.server 8080 command goes to ["python3", "-m", "http.server", "8080"] )
  • mkdir: This is an action to create a directory by input path

    • args/path: Specify the path to create a directory
  • log: This is an action to print out log by input message

    • args/message: Specify the message to be displayed in the logs.
    • debug: Set to True if it is in debug mode, otherwise set to False.

Uploading Model Definition File to Model Type Folder#

To upload the model definition file (model-definition.yml) to the model type folder, you need to create a virtual folder. When creating the virtual folder, select the model type instead of the default general type. Refer to the section on creating a storage folder in the Data page for instructions on how to create a folder.

Figure 13.4

After creating the folder, select the 'MODELS' tab in the Data page, click on the recently created model type folder icon to open the folder explorer, and upload the model definition file. For more information on how to use the folder explorer, please refer to the Explore Folder section.

Figure 13.5

Figure 13.6

Creating a Service Definition File#

The service definition file (service-definition.toml) allows administrators to pre-configure the resources, environment, and runtime settings required for a model service. When this file is present in a model folder, the system uses these settings as default values when creating a service.

Both model-definition.yaml and service-definition.toml must be present in the model folder to enable the Deploy button on the Model Store page. These two files work together: the model definition specifies the model and inference server configuration, while the service definition specifies the runtime environment, resource allocation, and environment variables.

The service definition file follows the TOML format with sections organized by runtime variant. Each section configures a specific aspect of the service:

toml
[vllm.environment]
image        = "example.com/model-server:latest"
architecture = "x86_64"

[vllm.resource_slots]
cpu = 1
mem = "8gb"
"cuda.shares" = "0.5"

[vllm.environ]
MODEL_NAME = "example-model-name"

Key-Value Descriptions for Service Definition File

  • [{runtime}.environment]: Specifies the container image and architecture for the model service.

    • image (Required): The full path of the container image to use for the inference service (e.g., example.com/model-server:latest).
    • architecture (Required): The CPU architecture of the container image (e.g., x86_64, aarch64).
  • [{runtime}.resource_slots]: Defines the compute resources allocated to the model service.

    • cpu: Number of CPU cores to allocate (e.g., 1, 2, 4).
    • mem: Amount of memory to allocate. Supports unit suffixes (e.g., "8gb", "16gb").
    • "cuda.shares": Fractional GPU (fGPU) shares to allocate (e.g., "0.5", "1.0"). This value is quoted because the key contains a dot.
  • [{runtime}.environ]: Sets environment variables that will be passed to the inference service container.

    • You can define any environment variables required by the runtime. For example, MODEL_NAME is commonly used to specify which model to load.
NOTE

The {runtime} prefix in each section header corresponds to the runtime variant name (e.g., vllm, nim, custom). The system matches this prefix with the selected runtime variant when creating the service.

NOTE

When a service is created from the Model Store using the Deploy button, the settings from service-definition.toml are applied automatically. If you later need to adjust the resource allocation, you can modify the service through the Deployments page.

Deployments Page Overview#

The Deployments page displays a list of all deployments in the current project. You can access it by clicking Deployments in the sidebar menu.

Figure 13.7

At the top of the page, you can filter deployments by lifecycle stage:

  • Active: Shows deployments that are currently running or being created. This is the default view.
  • Destroyed: Shows deployments that have been terminated.

You can also use the property filter bar to search deployments by Deployment Name, Service Endpoint URL, or Owner (available to admins and superadmins).

Click the New Deployment button to open the Create Deployment modal.

Creating a Deployment#

Creating a deployment is a two-step flow:

  1. Create the deployment — a lightweight container that defines the deployment's identity (name, visibility, deployment metadata, and resource group).
  2. Add a revision — a configuration snapshot that defines what actually runs (start command, environment variables, runtime variant, image, resources, model storage).

Each deployment can hold many revisions. Only one revision is current (serving traffic) at a time, and you can switch between revisions from the Revisions tab on the Deployment Detail Page.

Create Deployment Modal#

Click the New Deployment button on the Deployments page to open the Create Deployment modal. The modal collects only deployment-level metadata; no revision is created at this point.

Figure 13.8

The modal contains the following fields:

  • Deployment Name: A unique name used to identify the deployment across the dashboard, API, and the endpoint URL.
  • Resource Group: The resource group where the deployment will run. If only one resource group is available to your project, the field is auto-selected and you can proceed without choosing one manually.
  • Desired Replicas: The number of replicas to keep running for this deployment. The system scales the active pool toward this target.
  • Tags: Optional labels for organizing and filtering deployments. Press Enter or comma to add.
  • Open To Public: When enabled, the endpoint is reachable without an access token. When disabled, every request must carry a token. See Access Tokens.

Click Create Deployment to create the deployment. You are then taken to the Deployment Detail Page, where the No Current Revision warning is shown until you add the first revision. To update deployment-level settings (name, visibility, desired replicas, or tags) after creation, click the Edit button on the Service Info card.

Add Revision#

A revision captures every setting needed to run the inference server — image, start command, resources, model mounts, and environment variables. From the Deployment Detail Page, click Add Revision to open the modal.

Figure 13.9

Use the Preset Mode / Advanced Mode switcher in the modal title to select how to configure the revision.

Preset Mode#

Quickly add a revision using a pre-defined deployment preset.

  • Preset: A deployment preset compatible with the deployment's resource group. Click the ⓘ button next to the selector to view the preset details.
  • Model Folder: The storage folder to mount on each replica.

If no presets are available for the deployment's resource group, an informational message is shown. Switch to Advanced Mode to configure the revision manually.

Advanced Mode#

Configure every revision setting directly. A Load current revision button lets you pre-fill the form from the currently active revision.

The form contains the following sections:

  • Model & Runtime: Select the model folder and runtime variant. For vLLM / SGLang variants, a Runtime Parameters panel appears; for the Custom variant, a Model Definition Mode control appears. See the sections below for details on runtime-specific fields.
  • Environments: Choose the container image (Environment / Version) and add environment variables.
  • Cluster & Resources: Allocate CPU, memory, and accelerator resources.
  • Advanced Settings (collapsible): Mount additional storage folders alongside the model folder.

At the bottom of the modal, check Apply immediately after adding to activate the new revision immediately upon creation. If unchecked, the revision is saved in an inactive state and you can apply it later from the Revisions tab.

Add Revision: Field Reference#

The subsections below describe revision-level fields in detail. They apply both when adding a revision manually in Advanced Mode and when you want to understand what each field controls.

Model Definition Mode (Custom Runtime Only)#

When you select the Custom runtime variant, a Model Definition Mode segmented control appears at the top of the form. It lets you choose how the inference server startup is defined:

Enter Command Mode#

Select Enter Command to define the startup directly as a CLI command. The following fields are available:

  • Start Command: The shell command (or argument list) to launch the inference server. For example, python -m http.server 8000.
  • Model Mount Destination: The path inside the container where the model storage folder is mounted (default: /models).
  • Port: The container port that the inference server listens on (default: 8000).
  • Health Check URL: The HTTP endpoint path called during service health checks (default: /health).
  • Startup Grace Period: Grace period in seconds after container startup during which failed health checks are tolerated; the replica becomes active on the first successful check (default: 60.0). Increase this for large models that take longer to load.
  • Max Retries: Maximum consecutive health check failures before the replica is marked UNHEALTHY (default: 10).
  • Interval: Seconds between consecutive health checks (default: 10.0).
  • Max Wait Time: Timeout in seconds for each individual health check request (default: 15.0).
Use Config File Mode#

Select Use Config File to load the startup configuration from a model-definition.yaml file stored in the model storage folder. The following fields are available:

  • Mount Destination: The path inside the container where the model storage folder is mounted (default: /models).
  • Model Definition File Path: The path to the model definition file within the model storage folder (default: model-definition.yaml).

For instructions on creating a model definition file, refer to the Creating a Model Definition File section.

Runtime Parameters (vLLM / SGLang)#

When you select the vLLM or SGLang runtime variant, a Runtime Parameters section appears in place of the Model Definition Mode selector. This section lets you configure the serving framework without editing configuration files manually.

Parameters are organized into tab-separated categories. The available tabs vary by runtime variant.

NOTE

Unchanged parameters use the runtime's default values.

vLLM Runtime Parameters

Figure 13.10

vLLM provides the following tabs: Model Loading, Resource Memory, Serving Performance, Multimodal, Tool Reasoning, and others.

Key fields in the Model Loading tab:

  • Model: The name or path of the model to use.
  • DType: The data type for model weights and computation (for example, Auto, float16, bfloat16).
  • Quantization: The model quantization method (for example, awq, gptq, fp8).
  • Max Model Length: The maximum context length (number of tokens) the model can process.
  • Served Model Name: The model name to expose at the API endpoint.
  • Trust Remote Code: Allows execution of custom model code from the model repository.

SGLang Runtime Parameters

Figure 13.11

SGLang provides the following tabs: Model Loading, Resource Memory, Serving Performance, Tool Reasoning, and others.

Key fields in the Model Loading tab:

  • Model: The name or path of the model to use.
  • DType: The data type for model weights and computation (for example, Auto, float16, bfloat16).
  • Quantization: The model quantization method (for example, awq, gptq, fp8).
  • Context Length: The maximum context length the model can process.
  • Served Model Name: The model name to expose at the API endpoint.
  • Trust Remote Code: Allows execution of custom model code from the model repository.

In addition to runtime parameters, the vLLM and SGLang runtime variants pre-populate specific environment variables in the Environments section:

  • vLLM: BACKEND_MODEL_NAME, VLLM_QUANTIZATION, VLLM_TP_SIZE (tensor parallelism), VLLM_PP_SIZE (pipeline parallelism), VLLM_EXTRA_ARGS (extra CLI arguments)
  • SGLang: BACKEND_MODEL_NAME, SGLANG_QUANTIZATION, SGLANG_TP_SIZE (tensor parallelism), SGLANG_PP_SIZE (pipeline parallelism), SGLANG_EXTRA_ARGS (extra CLI arguments)

Environments#

The Environments section is present for all runtime variants.

  • Environment / Version: The container image used for the inference server. Selecting a runtime variant filters this list to images that are compatible with that runtime.
  • Environment Variables: Key/value pairs passed to the inference server container. For vLLM and SGLang, a set of runtime-specific variables (listed above) are pre-populated. You can add, edit, or remove entries freely.

Cluster and Resources#

The Cluster and Resources section lets you specify the compute resources to allocate to each replica.

  • Resource Preset: A pre-configured bundle of CPU, memory, and accelerator allocations. Available presets are filtered by the deployment's resource group. You can also configure resources manually (CPU, memory, GPU) without selecting a preset.

Advanced Settings#

Expand the Advanced Settings collapse panel to mount additional storage folders alongside the model storage folder.

  • Additional Mounts: A table of storage folders to mount into the inference server container. Only general-purpose (non-model) folders in ready state are listed. Hidden folders (names starting with .) and the model storage folder itself are excluded.

Deployment Detail Page#

Click on a deployment name in the Deployments list to view detailed information about the deployment.

Deployment Alerts#

The Deployment Detail Page shows contextual alert banners at the top, reflecting the current state of the deployment:

  • Deployment is ready: Shown when the deployment is HEALTHY. Includes a Test in Chat button as a shortcut to the LLM Chat Test interface so you can test the model without leaving the page.

Figure 13.12

  • Private deployment — use an access token to access the endpoint.: Shown when Open To Public is disabled. Includes a shortcut to Manage Access Tokens so you can issue or copy a token. See Access Tokens.

Figure 13.13

  • No revision is deployed — add a revision to activate this service.: Shown when the deployment has no current revision. Click Add Revision to create the first revision and activate the service.

  • Preparing your service: Shown while the deployment is being created or transitioning between states. Indicates the service is not yet ready to handle requests.

  • Not In Project: Shown when the deployment belongs to a different project than the currently selected one. The Edit button is disabled while this alert is active. Click the Switch Project button in the alert to switch to the correct project and manage the deployment.

Service Information#

The Service Info card displays the following details:

  • Deployment Name and Status
  • Deployment ID and Session Owner
  • Visibility: Shown as a Public / Private tag. Public means the endpoint is reachable without an access token; Private means callers must supply a valid access token.
  • Number of Replicas
  • Service Endpoint: The URL for accessing the deployment. For LLM deployments, a Test in Chat button is available.
  • Resource Group: The resource group the deployment runs in. Resource group is now part of the deployment metadata (set once when the deployment is created) rather than per-revision.
  • Resources: Allocated CPU, memory, accelerator, and Shared Memory (SHM). The shared memory value is taken from the current revision and represents the size of /dev/shm available to the inference server — important for multi-GPU and multi-process inference workloads.
  • Model Storage: The mounted model storage folder and mount destination.
  • Additional Mounts: Any extra storage folders mounted.
  • Environment Variables: Displayed as a code block.
  • Image: The container image used for the service.

Figure 13.14

More Menu (Edit and Delete)#

The Service Info card's header exposes an Edit button alongside a More menu. The More menu currently contains the Delete Deployment action.

Figure 13.15

Replicas#

The Replicas tab shows the routing nodes that make up the deployment. Replica entries are filtered by a Running / Terminated radio control at the top of the tab, which replaced the previous enum-based status filter.

Figure 13.16

  • Running: Shows replicas that are currently provisioning, running, or otherwise active.
  • Terminated: Shows replicas that have completed their lifecycle.

Each replica row carries three independent status fields. They describe different axes and should be read together — a replica can be Running in its lifecycle while its health is still Not Checked, for example.

  • Lifecycle Status: Where the replica is in its lifecycle — for example, Provisioning, Warming Up, Running, Terminating, or Terminated. During Warming Up, the replica is inside its startup grace period: it is starting up and waiting for the first successful health check. Failed checks are tolerated during this window; the replica moves to Running on the first success, and is terminated if it never succeeds before the window ends. The column header reads Lifecycle.
  • Health Status: The current health of the replica process — Healthy, Unhealthy, Degraded, or Not Checked.
    • Not Checked means the first health check has not completed yet — the replica is typically still in its Warming Up grace period. By itself it does not indicate a problem; read the Lifecycle Status to see where the replica is.
  • Traffic Status: Whether the replica is currently serving requests. A replica can be removed from traffic independently of its health (for example, when it is manually deactivated), which is why traffic is shown as its own status rather than being merged into Health Status.
NOTE

The three statuses are independent axes. During the Warming Up lifecycle phase a replica is within its startup grace period, and its Health Status typically reads Not Checked until the first check completes — by itself that does not indicate a problem.

Click on a replica node to open the session detail drawer, where you can view individual session details.

If a replica has encountered an error, clicking the error indicator on the row opens a JSON viewer modal that displays the raw error data. This is useful for diagnosing issues with individual replicas.

Figure 13.17

Revisions Tab#

The Revisions card on the deployment detail page has two tabs: Current Revision and Revision History. The Add Revision button at the top of the card is available from both tabs and opens the Add Revision modal (see Add Revision).

Current Revision Tab#

The Current Revision tab shows the full configuration of the revision that is currently active and serving traffic.

Figure 13.18

The following fields are displayed:

  • Revision Number: The auto-assigned sequential number of this revision (for example, #3).
  • Revision ID: The UUID of this revision.
  • Created At
  • Resources: The resource allocation (CPU, memory, and accelerators) for each replica.
  • Model Folder: The model folder mounted into each replica, shown as a link, together with Mount Destination For Model Folder.
  • Model Definition File Path: Path to the model definition file within the model folder.
  • Additional Mounts: Extra storage folders mounted into each replica.
  • Runtime: The serving runtime (for example, vLLM, SGLang, or Custom).
  • Image: The container image used to run the replica.
  • Cluster Mode: The clustering layout of each replica's compute session (mode / size).
  • Environment Variables: Key-value pairs injected into the container, displayed as a shell script block.

When the model definition file defines a model, the following fields are also shown:

  • Model Name, Model Path, Start Command, Port, Health Check URL, Startup Grace Period, Max Retries, Interval (s), Max Wait Time (s)

Applying-in-progress state

While a different revision is being applied, the Current Revision tab shows an alert: "Applying revision N." A View Revision button in the alert opens a detail drawer for the revision currently being applied. The tab refreshes automatically every 5 seconds until the apply completes.

Empty state

If no revision has been deployed yet, the tab shows: "No revision is deployed — add a revision to activate this service."

Revision History Tab#

The Revision History tab lists all revisions added to the deployment, sorted from newest to oldest by default.

Figure 13.19

The table includes the following columns:

  • Revision (ID): The revision number and its UUID. The revision number is an incrementing integer; lower numbers are older revisions. Click the revision number to open the revision detail drawer.
  • Created At
  • Cluster Mode: The clustering layout formatted as "mode / size". Hover over the column header for a description.

The following columns are hidden by default but can be enabled from the column settings:

  • Model Name, Runtime, Image, Model Folder

Filters

The filter bar above the table lets you narrow the list by revision number, created-at date range, cluster mode, image, and model folder.

Applying a revision

Each row has an Apply action button. Click it to open a confirmation dialog. On confirm, the selected revision becomes the current revision and the deployment begins serving traffic with the new configuration. The previous revision is preserved in the history.

  • A green Current tag marks the revision that is currently active.
  • A yellow Applying tag (with a loading spinner) marks a revision that is being applied.
  • The Apply button is disabled for the currently active revision and any revision that is being applied.

Clicking the revision number in any row opens the revision detail drawer, which shows the full configuration of that revision. The drawer also has an Apply button (disabled for the current and applying revisions).

Auto Scaling Rules#

Auto Scaling Rules automatically increase or decrease the number of replicas for a model service based on live metrics. This conserves resources during low usage and prevents request delays or failures during high usage.

Figure 13.20

The rule list provides:

  • A property filter bar to filter rules by Created At and Last Triggered datetime ranges.
  • Server-side pagination.
  • The following columns: Metric Source, Condition, Cooldown Sec., Step Size, Min / Max Replicas, Created At, and Last Triggered. The Step Size column automatically shows +, , or ± based on the direction derived from the thresholds you have set, so you no longer choose Scale Out or Scale In explicitly.
  • Per-row edit and delete icons shown next to the condition summary in each row.

Click the Add Rules button to open the Add Auto Scaling Rule editor. To modify an existing rule, click the edit icon on its row; the Edit Auto Scaling Rule editor opens with the rule's values pre-filled. The editor contains the following fields in order:

  • Metric Source: Select one of Kernel, Inference Framework, or Prometheus.

  • Metric Name: For Kernel and Inference Framework, enter a metric name. For Kernel, a list of common metrics (such as cpu_util, mem, net_rx, and net_tx) is offered as autocomplete suggestions, and you can also type a custom name freely.

  • Metric Name (Prometheus Preset): Shown only when Metric Source is Prometheus. Select a preset from the dropdown; the preset's metric name, query template, and (when defined) Cooldown Sec. are filled in automatically. Below the selector, a Current value preview shows the latest value returned by the preset, with a refresh button. When multiple series are returned, the preview shows the number of series and the most recent value; if no data is available, it shows No data available.

  • Condition: A segmented control for choosing the scaling direction. It provides three options.

    • Scale In: Decreases replicas when the metric falls below a threshold. Sets Metric < [threshold].
    • Scale Out: Increases replicas when the metric rises above a threshold. Sets Metric > [threshold].
    • Scale In & Out: Automatically scales in or out depending on which side of the configured range the metric crosses. Sets Metric < Min Threshold or Metric > Max Threshold.

Figure 13.21

  • Step Size: A positive integer specifying how many replicas to add or remove per scaling event. The -, +, or ± sign is shown automatically based on the selected condition (Scale In / Scale Out / Scale In & Out).

    • Only a minimum threshold is set: [metric] < [minThreshold] triggers Scale In (replicas decrease when the metric falls below the threshold).
    • Only a maximum threshold is set: [metric] > [maxThreshold] triggers Scale Out (replicas increase when the metric rises above the threshold).
    • Both thresholds are set: replicas are scaled in or out depending on which boundary the metric crosses ([minThreshold] < [metric] < [maxThreshold] is the normal operating range).
  • Cooldown Sec.: The time, in seconds, to wait after a scaling event before the next evaluation.

  • Min Replicas and Max Replicas: The lower and upper bounds that auto-scaling enforces on the replica count. Auto-scaling will not reduce the number of replicas below Min Replicas or increase it above Max Replicas.

Figure 13.22

When Metric Source is set to Prometheus, the editor shows the preset selector and the live Current value preview.

Figure 13.23

Generating Tokens#

Once the deployment is HEALTHY, you can click on its name in the Deployments list to open the Deployment Detail Page. The Service Endpoint URL is shown in the Service Info card. If Open To Public is enabled, end users can access the deployment without a token. If it is disabled, generate and share a token as described below.

Figure 13.24

Click the Generate Token button located to the right of the generated token list. In the modal that appears, enter the expiration date.

Figure 13.25

The issued token will be added to the list of generated tokens. Each token displays its Status (Valid or Expired), Expiration Date, and Created Date. Click the copy button in the token item to copy the token, and add it as the value of the following key.

Figure 13.26

Key Value
Content-Type application/json
Authorization BackendAI

Terminating a Deployment#

When a deployment is no longer needed, it is recommended to terminate it to free up scheduler resources. To terminate the deployment, open the More menu on the Service Info card and select Delete Deployment. A typed-confirmation modal appears — type the deployment name to enable the Permanently Delete button. The terminated deployment then appears in the Destroyed filter view.

Figure 13.27

Accessing Your Deployment#

Making API Requests#

To allow end users to call your deployment, share the deployment URL with them. If the Open To Public option is enabled, you can share the Service Endpoint URL from the Deployment Detail Page directly. If the deployment is private, share the URL along with an access token.

Here is a simple command using curl to verify that the deployment is responding:

bash
export API_TOKEN="<token>"
export MODEL_SERVICE_ENDPOINT="<model-service-endpoint>"
curl -H "Content-Type: application/json" -X GET    -H "Authorization: BackendAI $API_TOKEN"    "$MODEL_SERVICE_ENDPOINT"
WARNING

By default, end users must be on a network that can reach the deployment URL. If the deployment was created in a closed network, only end users with access to that network can reach the service.

LLM Chat Test#

If you have created a Large Language Model (LLM) service, you can test the LLM in real-time. When the deployment is ready, a Test in Chat button appears in the Deployment is ready banner at the top of the Deployment Detail Page. Click it to start the test.

Figure 13.28

You will be redirected to the Chat page, where the model you created is automatically selected. Using the chat interface provided on the Chat page, you can test the LLM model. For more information about the chat feature, please refer to the Chat page.

Figure 13.29

If you encounter issues connecting to the API, the Chat page will display options that allow you to manually configure the model settings. To use the model, you will need the following information:

  • baseURL (optional): Base URL of the server where the model is located. Make sure to include the version information. For instance, when utilizing the OpenAI API, you should enter https://api.openai.com/v1.
  • Token (optional): An authentication key to access the model service. Tokens can be generated from various services, not just Backend.AI. The format and generation process may vary depending on the service. Always refer to the specific service's guide for details. For instance, when using the service generated by Backend.AI, please refer to the Generating Tokens section for instructions on how to generate tokens.

Figure 13.30

Model Store#

The Model Store provides a card-based gallery of pre-configured models that you can browse, search, and deploy. You can access the Model Store from the sidebar menu.

Figure 13.31

Browsing and Searching Models#

The page uses a search and sort layout at the top:

  • Search Models: Use the Filter By Name property filter to search model cards by name.
  • Sort: Choose how results are ordered. The available options are Name (A→Z), Name (Z→A), Oldest first, and Newest first.
  • Refresh: Click the refresh button to reload the card list.

Each card displays the model brand icon, title (or name when no title is set), task tag, relative creation time, and the author with an icon. Cards that have no compatible presets for the current project are shown at 50% opacity. You can still open such a card to view its details, but its Deploy button is disabled and an error alert is shown in the drawer: No compatible presets available. This model cannot be deployed.

If the MODEL_STORE project is not set up on the server, the page shows a Model Store project not found message with instructions to contact an administrator. If no model cards match your filters, the page displays No models found.

The list is paginated at the bottom. You can change the page size between 10, 20, and 50 entries.

Model Card Details#

Click a card to open the model card drawer on the right side of the page. The drawer shows the model title and description at the top, followed by the task, category, labels, and license tags, and then a details list with the following items:

  • Author
  • Architecture
  • Framework (each framework is shown with an icon)
  • Version
  • Created and Last Modified timestamps
  • Model Folder: A clickable link that opens the folder explorer for the model storage folder
  • Min Resource: The minimum resource requirements (CPU, memory, GPU)

If the model card includes a README, it is rendered as a README.md card at the bottom of the drawer.

Figure 13.32

Deploying a Model#

Click the Deploy button in the drawer header to deploy the model as a service. The deploy flow behaves in one of two ways:

  • Auto-deploy: If the model has exactly one available preset and the current project has exactly one accessible resource group, the deployment is created silently without showing a modal. You are then navigated to the Deployment Detail Page.

  • Deploy Model modal: Otherwise, a Deploy Model modal opens with the following required fields:

    • Preset: A grouped dropdown of available resource presets. When presets span multiple runtime variants, options are grouped by runtime variant name; otherwise the options are shown as a flat list.
    • Resource Group: The resource group where the service will run.

    Click the Deploy button in the modal to start the deployment. A success toast confirms that the model has been deployed, and you are navigated to the Deployment Detail Page.

Figure 13.33

NOTE

If the selected model has no compatible presets for the current project, the drawer's Deploy button is disabled and deployment is blocked until a compatible preset is available.

© 2026 Lablup Inc. · Backend.AI WebUI Docs