diff --git a/packages/backend.ai-webui-docs/src/en/images/admin_model_card_list_v2.png b/packages/backend.ai-webui-docs/src/en/images/admin_model_card_list_v2.png new file mode 100644 index 0000000000..6160bef2dc Binary files /dev/null and b/packages/backend.ai-webui-docs/src/en/images/admin_model_card_list_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/en/images/auto_scaling_rules_modal_prometheus_v2.png b/packages/backend.ai-webui-docs/src/en/images/auto_scaling_rules_modal_prometheus_v2.png new file mode 100644 index 0000000000..b2fb903076 Binary files /dev/null and b/packages/backend.ai-webui-docs/src/en/images/auto_scaling_rules_modal_prometheus_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/en/images/auto_scaling_rules_modal_v2.png b/packages/backend.ai-webui-docs/src/en/images/auto_scaling_rules_modal_v2.png new file mode 100644 index 0000000000..86154da6ee Binary files /dev/null and b/packages/backend.ai-webui-docs/src/en/images/auto_scaling_rules_modal_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/en/images/auto_scaling_rules_v2.png b/packages/backend.ai-webui-docs/src/en/images/auto_scaling_rules_v2.png new file mode 100644 index 0000000000..b6faffbceb Binary files /dev/null and b/packages/backend.ai-webui-docs/src/en/images/auto_scaling_rules_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/en/images/model_card_deploy_modal.png b/packages/backend.ai-webui-docs/src/en/images/model_card_deploy_modal.png new file mode 100644 index 0000000000..87e883c626 Binary files /dev/null and b/packages/backend.ai-webui-docs/src/en/images/model_card_deploy_modal.png differ diff --git a/packages/backend.ai-webui-docs/src/en/images/model_card_detail_drawer.png b/packages/backend.ai-webui-docs/src/en/images/model_card_detail_drawer.png new file mode 100644 index 0000000000..58d246ce36 Binary files /dev/null and b/packages/backend.ai-webui-docs/src/en/images/model_card_detail_drawer.png differ diff --git a/packages/backend.ai-webui-docs/src/en/images/model_store_page_v2.png b/packages/backend.ai-webui-docs/src/en/images/model_store_page_v2.png new file mode 100644 index 0000000000..39c439d56a Binary files /dev/null and b/packages/backend.ai-webui-docs/src/en/images/model_store_page_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/en/model_serving/model_serving.md b/packages/backend.ai-webui-docs/src/en/model_serving/model_serving.md index b1165954d7..34a8557e2c 100644 --- a/packages/backend.ai-webui-docs/src/en/model_serving/model_serving.md +++ b/packages/backend.ai-webui-docs/src/en/model_serving/model_serving.md @@ -72,7 +72,7 @@ To use the Model Service, you need to follow the steps below: :::tip As an alternative workflow, you can browse pre-configured models in the [Model Store](#model-store) and deploy them with a single click using the -`Run this model` button. +`Run this model` button (renamed `Deploy` on version 26.4.0 and later). ::: @@ -293,10 +293,10 @@ please refer to the [Explore Folder](#explore-folder) section. 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 `Run this model` 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. +model folder to enable the `Run this model` button (`Deploy` on version 26.4.0 and +later) 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: @@ -340,10 +340,10 @@ selected runtime variant when creating the service. ::: :::note -When a service is created from the Model Store using the `Run this model` 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 -Model Serving page. +When a service is created from the Model Store using the `Run this model` button +(`Deploy` on version 26.4.0 and later), 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 Model Serving page. ::: ## Serving Page Overview @@ -587,6 +587,48 @@ where you can add a rule. Each field in the modal is described below: ![](../images/auto_scaling_rules_modal.png) +:::note +From Backend.AI version **26.4.0** onwards, Auto Scaling Rules have been redesigned with +Prometheus preset support and a new condition model. If you are on an older version, the +description above still applies. Otherwise, refer to +[Auto Scaling Rules (version 26.4.0 and later)](#auto-scaling-rules-version-26-4-0-and-later) below. +::: + + + +#### Auto Scaling Rules (version 26.4.0 and later) + +On Backend.AI version 26.4.0 and later, Auto Scaling Rules are redesigned with a Prometheus metric source, a segmented condition control, and a richer rule list. + +![](../images/auto_scaling_rules_v2.png) + +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**, **Time Window**, **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) **Time Window** 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 with two modes: + + - **Single**: Defines a single comparison `Metric Threshold`, where `` is either `>` or `<`. + - **Range**: Defines a range `Min Threshold < Metric < Max Threshold`. Both thresholds are required; the minimum must be less than the maximum. + +- **Step Size**: A positive integer specifying how many replicas to add or remove per scaling event. The direction (add or remove) is derived automatically from which threshold is configured, so you only specify the magnitude. +- **Time Window**: The time window, in seconds, over which the metric is aggregated and evaluated for scaling. This replaces the legacy `CoolDown Seconds` field and has a different meaning. +- **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**. + +![](../images/auto_scaling_rules_modal_v2.png) + +When **Metric Source** is set to `Prometheus`, the editor shows the preset selector and the live **Current value** preview. + +![](../images/auto_scaling_rules_modal_prometheus_v2.png) + ### Generating Tokens @@ -750,6 +792,65 @@ When a service is created from the Model Store, the settings from service later through the Serving page. ::: +:::note +From Backend.AI version **26.4.0** onwards, the Model Store has been redesigned. If you are on +an older version, the description above still applies. Otherwise, refer to +[Model Store (version 26.4.0 and later)](#model-store-version-26-4-0-and-later) below. +::: + + + +### Model Store (version 26.4.0 and later) + +On Backend.AI version 26.4.0 and later, the Model Store is redesigned with a simplified browsing experience, a card-detail drawer, and a streamlined deploy flow that replaces the legacy browse/detail/run workflow. + +![](../images/model_store_page_v2.png) + +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. + +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. + +![](../images/model_card_detail_drawer.png) + +To clone a model folder in version 26.4.0 and later, use the [Data](../vfolder/vfolder.md) page directly, since the Model Store drawer no longer provides a dedicated Clone button. + +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. After the endpoint becomes queryable, you are navigated to its endpoint 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 endpoint detail page. + +![](../images/model_card_deploy_modal.png) + +:::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. +::: + ## Admin Features ### Admin Serving Page @@ -801,3 +902,43 @@ You can delete individual model cards by clicking the delete icon in the **Contr #### Scanning Project Model Cards Click the `Scan Project Model Cards` button to automatically scan a project's model folders and create model cards for any folders that contain valid model definitions. The scan results show the number of model cards created and updated. + +:::note +The **Scan Project Model Cards** button is not available on Backend.AI version 26.4.0 and later. +::: + +:::note +From Backend.AI version **26.4.0** onwards, the Admin Model Store Management tab has been +redesigned. If you are on an older version, the description above still applies. Otherwise, +refer to [Admin Model Store Management (version 26.4.0 and later)](#admin-model-store-management-version-26-4-0-and-later) below. +::: + + + +#### Admin Model Store Management (version 26.4.0 and later) + +On Backend.AI version 26.4.0 and later, the **Model Store Management** tab presents a redesigned model card list. + +![](../images/admin_model_card_list_v2.png) + +The list provides the following columns: + +- **Name**: The unique identifier of the model card. +- **Title**: The human-readable display name. +- **Category**: The model category (e.g., LLM). +- **Task**: The inference task type (e.g., text-generation). +- **Access Level**: Shows a green `Public` tag when the model card is publicly accessible, or a default `Private` tag otherwise. +- **Domain**: The domain that owns the model card. +- **Project**: The project that owns the model card. +- **Created At**: The timestamp when the model card was created. + +You can filter the list by **Name** using the property filter bar at the top. Edit and delete action icons are shown directly in the **Name** cell of each row. + +To delete multiple model cards at once, select the rows you want to remove using the checkboxes and click the red trash-bin button next to the selection count. A confirmation dialog appears before the cards are deleted. + +:::note +The Create, Edit, and Delete dialogs for individual model cards are the same as in the legacy +version. See [Creating a Model Card](#creating-a-model-card), +[Editing a Model Card](#editing-a-model-card), and [Deleting Model Cards](#deleting-model-cards). +::: + diff --git a/packages/backend.ai-webui-docs/src/ja/images/admin_model_card_list_v2.png b/packages/backend.ai-webui-docs/src/ja/images/admin_model_card_list_v2.png new file mode 100644 index 0000000000..6160bef2dc Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ja/images/admin_model_card_list_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/ja/images/auto_scaling_rules_modal_prometheus_v2.png b/packages/backend.ai-webui-docs/src/ja/images/auto_scaling_rules_modal_prometheus_v2.png new file mode 100644 index 0000000000..b2fb903076 Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ja/images/auto_scaling_rules_modal_prometheus_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/ja/images/auto_scaling_rules_modal_v2.png b/packages/backend.ai-webui-docs/src/ja/images/auto_scaling_rules_modal_v2.png new file mode 100644 index 0000000000..86154da6ee Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ja/images/auto_scaling_rules_modal_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/ja/images/auto_scaling_rules_v2.png b/packages/backend.ai-webui-docs/src/ja/images/auto_scaling_rules_v2.png new file mode 100644 index 0000000000..b6faffbceb Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ja/images/auto_scaling_rules_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/ja/images/model_card_deploy_modal.png b/packages/backend.ai-webui-docs/src/ja/images/model_card_deploy_modal.png new file mode 100644 index 0000000000..87e883c626 Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ja/images/model_card_deploy_modal.png differ diff --git a/packages/backend.ai-webui-docs/src/ja/images/model_card_detail_drawer.png b/packages/backend.ai-webui-docs/src/ja/images/model_card_detail_drawer.png new file mode 100644 index 0000000000..58d246ce36 Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ja/images/model_card_detail_drawer.png differ diff --git a/packages/backend.ai-webui-docs/src/ja/images/model_store_page_v2.png b/packages/backend.ai-webui-docs/src/ja/images/model_store_page_v2.png new file mode 100644 index 0000000000..39c439d56a Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ja/images/model_store_page_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/ja/model_serving/model_serving.md b/packages/backend.ai-webui-docs/src/ja/model_serving/model_serving.md index 3cd8331935..26240ef4ff 100644 --- a/packages/backend.ai-webui-docs/src/ja/model_serving/model_serving.md +++ b/packages/backend.ai-webui-docs/src/ja/model_serving/model_serving.md @@ -63,7 +63,8 @@ Backend.AIは、モデル学習フェーズにおける開発環境の構築と :::tip 代替ワークフローとして、[モデルストア](#model-store)で事前構成されたモデルを閲覧し、 -`Run this model`ボタンを使用してワンクリックでデプロイすることもできます。 +`Run this model`ボタン(バージョン 26.4.0 以降では `Deploy` に名称変更)を使用して +ワンクリックでデプロイすることもできます。 ::: @@ -272,9 +273,9 @@ failures) ┌─────┴─────┐ サービス定義ファイル(`service-definition.toml`)を使用すると、管理者はモデルサービスに必要なリソース、環境、およびランタイム設定を事前に構成できます。このファイルがモデルフォルダーに存在する場合、システムはサービスを作成する際にこれらの設定をデフォルト値として使用します。 `model-definition.yaml` と `service-definition.toml` の両方がモデルフォルダーに存在する必要があり、 -これによりモデルストアページで`Run this model`ボタンが有効になります。これら2つのファイルは -連携して動作します:モデル定義はモデルと推論サーバーの構成を指定し、サービス定義はランタイム環境、 -リソース割り当て、および環境変数を指定します。 +これによりモデルストアページで`Run this model`ボタン(バージョン 26.4.0 以降では `Deploy`)が +有効になります。これら2つのファイルは連携して動作します:モデル定義はモデルと推論サーバーの +構成を指定し、サービス定義はランタイム環境、リソース割り当て、および環境変数を指定します。 サービス定義ファイルは、ランタイムバリアントごとにセクションを整理したTOML形式に従います。各セクションはサービスの特定の側面を構成します: @@ -318,9 +319,9 @@ MODEL_NAME = "example-model-name" ::: :::note -`Run this model`ボタンを使用してモデルストアからサービスを作成すると、 -`service-definition.toml` の設定が自動的に適用されます。後でリソース割り当てを -調整する必要がある場合は、モデルサービングページを通じてサービスを変更できます。 +`Run this model`ボタン(バージョン 26.4.0 以降では `Deploy`)を使用してモデルストアから +サービスを作成すると、`service-definition.toml` の設定が自動的に適用されます。後で +リソース割り当てを調整する必要がある場合は、モデルサービングページを通じてサービスを変更できます。 ::: ## サービングページの概要 @@ -561,6 +562,49 @@ vllm serve /models/my-model --tp 2 ![](../images/auto_scaling_rules_modal.png) +:::note +Backend.AI バージョン **26.4.0** 以降、自動スケーリングルールは Prometheus プリセット +サポートと新しいコンディションモデルで再設計されました。それより古いバージョンを使用 +している場合は、上記の説明がそのまま適用されます。それ以外の場合は、以下の +[自動スケーリングルール(バージョン 26.4.0 以降)](#auto-scaling-rules-version-26-4-0-and-later) +を参照してください。 +::: + + + +#### 自動スケーリングルール(バージョン 26.4.0 以降) + +Backend.AI バージョン 26.4.0 以降では、Prometheus メトリックソース、セグメント化されたコンディションコントロール、およびより豊富なルール一覧を備えた自動スケーリングルールが再設計されました。 + +![](../images/auto_scaling_rules_v2.png) + +ルール一覧には以下が含まれます: + +- **作成された時間**(Created At)および**最後にトリガーされました**(Last Triggered)の日時範囲でルールをフィルタリングできるプロパティフィルターバー。 +- サーバーサイドのページネーション。 +- 以下の列:**メトリックソース**(Metric Source)、**コンディション**(Condition)、**時間ウィンドウ**(Time Window)、**ステップサイズ**(Step Size)、**min / max レプリカ**(Min / Max Replicas)、**作成された時間**(Created At)、**最後にトリガーされました**(Last Triggered)。**ステップサイズ**列は、設定されたしきい値から導出される方向に基づいて `+`、`−`、`±` を自動的に表示するため、`Scale Out` または `Scale In` を明示的に選択する必要はなくなりました。 +- 各行のコンディションサマリーの横に表示される行ごとの編集および削除アイコン。 + +`Add Rules`ボタンをクリックすると、**自動スケーリングルールを追加します**エディターが開きます。既存のルールを変更するには、その行の編集アイコンをクリックします。ルールの値が事前に入力された状態で**自動スケーリングルールを編集します**エディターが開きます。エディターには次のフィールドが順番に含まれます: + +- **メトリックソース**(Metric Source): `Kernel`、`Inference Framework`、`Prometheus` のいずれかを選択します。 +- **メトリック名**(Metric Name): `Kernel` および `Inference Framework` の場合、メトリック名を入力します。`Kernel` では、`cpu_util`、`mem`、`net_rx`、`net_tx` などの一般的なメトリックがオートコンプリートの候補として提案され、カスタム名を自由に入力することもできます。 +- **メトリック名(Prometheusプリセット)**(Metric Name (Prometheus Preset)): **メトリックソース**が `Prometheus` の場合のみ表示されます。ドロップダウンからプリセットを選択すると、プリセットのメトリック名、クエリテンプレート、および(定義されている場合)**時間ウィンドウ**が自動的に入力されます。セレクタの下にある**現在の値**(Current value)プレビューは、プリセットが返す最新の値を更新ボタンとともに表示します。複数のシリーズが返される場合、プレビューにはシリーズの件数と最新の値が表示されます。利用可能なデータがない場合は、**データがありません**(No data available)と表示されます。 +- **コンディション**(Condition): 2 つのモードを持つセグメント化されたコントロールです: + + - **シングル**(Single): `Metric Threshold` の単一比較を定義します。ここで `` は `>` または `<` です。 + - **範囲**(Range): `Min Threshold < Metric < Max Threshold` の範囲を定義します。両方のしきい値が必須で、最小値は最大値より小さくなければなりません。 + +- **ステップサイズ**(Step Size): スケーリングイベントごとに追加または削除するレプリカ数を指定する正の整数です。方向(追加または削除)は構成されたしきい値から自動的に導出されるため、大きさのみを指定します。 +- **時間ウィンドウ**(Time Window): メトリックが集約されてスケーリング評価に使用される時間(秒単位)です。これは以前の `CoolDown Seconds` フィールドを置き換えるもので、意味が異なります。 +- **最小レプリカ**(Min Replicas)および**マックスレプリカ**(Max Replicas): 自動スケーリングがレプリカ数に対して強制する下限と上限です。自動スケーリングは、レプリカ数を**最小レプリカ**より下げたり、**マックスレプリカ**より上げたりすることはありません。 + +![](../images/auto_scaling_rules_modal_v2.png) + +**メトリックソース**が `Prometheus` に設定されている場合、エディターにはプリセットセレクタとライブの**現在の値**プレビューが表示されます。 + +![](../images/auto_scaling_rules_modal_prometheus_v2.png) + ### トークンの生成 @@ -710,6 +754,67 @@ API接続に問題が発生した場合、Chatページにモデル設定を手 自動的に適用されます。後でサービングページを通じてサービスを変更できます。 ::: +:::note +Backend.AI バージョン **26.4.0** 以降、モデルストアは再設計されました。それより古い +バージョンを使用している場合は、上記の説明がそのまま適用されます。それ以外の場合は、 +以下の[モデルストア(バージョン 26.4.0 以降)](#model-store-version-26-4-0-and-later) +を参照してください。 +::: + + + +### モデルストア(バージョン 26.4.0 以降) + +Backend.AI バージョン 26.4.0 以降では、簡素化された閲覧エクスペリエンス、カード詳細ドロワー、および従来の閲覧/詳細/実行ワークフローを置き換える合理化されたデプロイフローを備えたモデルストアに再設計されました。 + +![](../images/model_store_page_v2.png) + +ページ上部には検索と並べ替えのレイアウトが使用されています: + +- **モデルの検索**(Search Models): **名前でフィルタリングする**(Filter By Name)プロパティフィルターを使用して、モデルカードを名前で検索します。 +- **並べ替え**(Sort): 結果の並び順を選択します。使用可能なオプションは、`名前 (A→Z)`、`名前 (Z→A)`、`古い順`、`新しい順` です。 +- **更新**: 更新ボタンをクリックしてカード一覧を再読み込みします。 + +各カードには、モデルブランドのアイコン、タイトル(タイトルが設定されていない場合は名前)、タスクタグ、相対作成時刻、およびアイコン付きの著者が表示されます。現在のプロジェクトに**互換性のあるプリセットがない**カードは不透明度 50 % で表示されます。そのようなカードを開いて詳細を表示することは可能ですが、**Deploy** ボタンは無効化され、ドロワーに *No compatible presets available. This model cannot be deployed.* というエラーアラートが表示されます。 + +サーバーで `MODEL_STORE` プロジェクトが設定されていない場合、ページには管理者に問い合わせるようにとの案内とともに *モデルストアプロジェクトが見つかりません* というメッセージが表示されます。フィルターに一致するモデルカードがない場合は *モデルが見つかりません* と表示されます。 + +一覧はページ下部でページネーションされます。ページサイズは `10`、`20`、`50` 件の中から変更できます。 + +カードをクリックすると、ページの右側にモデルカードのドロワーが開きます。ドロワーの上部にはモデルのタイトルと説明が表示され、次にタスク、カテゴリ、ラベル、ライセンスのタグが続き、その後に次の項目を含む詳細一覧が表示されます: + +- **著者**(Author) +- **アーキテクチャ**(Architecture) +- **フレームワーク**(Framework)(各フレームワークはアイコン付きで表示) +- **バージョン**(Version) +- **作成した**(Created)および**最終更新日**(Last Modified)のタイムスタンプ +- **モデルフォルダ**(Model Folder): モデルストレージフォルダのフォルダエクスプローラを開くクリック可能なリンク +- **最小リソース**(Min Resource): 最小リソース要件(CPU、メモリ、GPU) + +モデルカードに README が含まれている場合は、ドロワーの下部に `README.md` カードとしてレンダリングされます。 + +![](../images/model_card_detail_drawer.png) + +バージョン 26.4.0 以降でモデルフォルダをクローンするには、[データ](../vfolder/vfolder.md) ページを直接使用してください。モデルストアドロワーには専用のクローンボタンは提供されなくなりました。 + +ドロワーヘッダーの **Deploy** ボタンをクリックすると、モデルがサービスとしてデプロイされます。デプロイフローは次の 2 通りのいずれかで動作します: + +- **自動デプロイ**: モデルに使用可能なプリセットがちょうど 1 つあり、現在のプロジェクトにアクセス可能なリソースグループがちょうど 1 つある場合、モーダルを表示せずにデプロイが静かに作成されます。エンドポイントがクエリ可能になった後、そのエンドポイント詳細ページに遷移します。 +- **モデルのデプロイモーダル**(Deploy Model): それ以外の場合、**Deploy Model** モーダルが次の必須フィールドとともに開きます: + + - **プリセット**(Preset): 使用可能なリソースプリセットのグループ化されたドロップダウンです。プリセットが複数のランタイムバリアントにまたがる場合、オプションはランタイムバリアント名ごとにグループ化されます。それ以外の場合は、フラットなリストとして表示されます。 + - **リソースグループ**(Resource Group): サービスが実行されるリソースグループです。 + + モーダルの **Deploy** ボタンをクリックしてデプロイを開始します。モデルがデプロイされたことを確認する成功トーストが表示され、エンドポイント詳細ページに遷移します。 + +![](../images/model_card_deploy_modal.png) + +:::note +選択したモデルに現在のプロジェクトと互換性のあるプリセットがない場合、ドロワーの +**Deploy** ボタンは無効化され、互換性のあるプリセットが利用可能になるまでデプロイは +ブロックされます。 +::: + ## 管理者機能 ### 管理者サービングページ @@ -761,3 +866,46 @@ API接続に問題が発生した場合、Chatページにモデル設定を手 #### プロジェクトモデルカードのスキャン `Scan Project Model Cards`ボタンをクリックして、プロジェクトのモデルフォルダーを自動的にスキャンし、有効なモデル定義を含むフォルダーのモデルカードを作成します。スキャン結果には、作成および更新されたモデルカードの数が表示されます。 + + +:::note +Backend.AI バージョン **26.4.0** 以降、管理者モデルストア管理タブは再設計されました。 +それより古いバージョンを使用している場合は、上記の説明がそのまま適用されます。 +それ以外の場合は、以下の +[管理者モデルストア管理(バージョン 26.4.0 以降)](#admin-model-store-management-version-26-4-0-and-later) +を参照してください。 +::: + + + +#### 管理者モデルストア管理(バージョン 26.4.0 以降) + +Backend.AI バージョン 26.4.0 以降では、**Model Store Management** タブに再設計されたモデルカード一覧が表示されます。 + +![](../images/admin_model_card_list_v2.png) + +一覧には次の列が表示されます: + +- **名前**(Name): モデルカードの一意の識別子です。 +- **タイトル**(Title): 人間が読みやすい表示名です。 +- **カテゴリー**(Category): モデルカテゴリです(例:LLM)。 +- **タスク**(Task): 推論タスクタイプです(例:text-generation)。 +- **アクセスレベル**(Access Level): モデルカードが公開アクセス可能な場合は緑色の `Public` タグが、それ以外の場合はデフォルトの `Private` タグが表示されます。 +- **ドメイン**(Domain): モデルカードを所有するドメインです。 +- **プロジェクト**(Project): モデルカードを所有するプロジェクトです。 +- **作成された時間**(Created At): モデルカードが作成された時間です。 + +上部のプロパティフィルターバーを使用して、**名前**で一覧をフィルタリングできます。各行の**名前**セルには、編集および削除のアクションアイコンが直接表示されます。 + +複数のモデルカードを一度に削除するには、チェックボックスで削除する行を選択し、選択件数の横にある赤色のゴミ箱ボタンをクリックします。カードが削除される前に確認ダイアログが表示されます。 + +:::note +個別モデルカードの作成、編集、削除ダイアログは以前のバージョンと同じです。 +[モデルカードの作成](#creating-a-model-card)、 +[モデルカードの編集](#editing-a-model-card)、 +[モデルカードの削除](#deleting-model-cards) を参照してください。 +::: + +:::note +**Scan Project Model Cards** ボタンは Backend.AI バージョン 26.4.0 以降では利用できません。 +::: diff --git a/packages/backend.ai-webui-docs/src/ko/images/admin_model_card_list_v2.png b/packages/backend.ai-webui-docs/src/ko/images/admin_model_card_list_v2.png new file mode 100644 index 0000000000..6160bef2dc Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ko/images/admin_model_card_list_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/ko/images/auto_scaling_rules_modal_prometheus_v2.png b/packages/backend.ai-webui-docs/src/ko/images/auto_scaling_rules_modal_prometheus_v2.png new file mode 100644 index 0000000000..b2fb903076 Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ko/images/auto_scaling_rules_modal_prometheus_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/ko/images/auto_scaling_rules_modal_v2.png b/packages/backend.ai-webui-docs/src/ko/images/auto_scaling_rules_modal_v2.png new file mode 100644 index 0000000000..86154da6ee Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ko/images/auto_scaling_rules_modal_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/ko/images/auto_scaling_rules_v2.png b/packages/backend.ai-webui-docs/src/ko/images/auto_scaling_rules_v2.png new file mode 100644 index 0000000000..b6faffbceb Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ko/images/auto_scaling_rules_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/ko/images/model_card_deploy_modal.png b/packages/backend.ai-webui-docs/src/ko/images/model_card_deploy_modal.png new file mode 100644 index 0000000000..87e883c626 Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ko/images/model_card_deploy_modal.png differ diff --git a/packages/backend.ai-webui-docs/src/ko/images/model_card_detail_drawer.png b/packages/backend.ai-webui-docs/src/ko/images/model_card_detail_drawer.png new file mode 100644 index 0000000000..58d246ce36 Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ko/images/model_card_detail_drawer.png differ diff --git a/packages/backend.ai-webui-docs/src/ko/images/model_store_page_v2.png b/packages/backend.ai-webui-docs/src/ko/images/model_store_page_v2.png new file mode 100644 index 0000000000..39c439d56a Binary files /dev/null and b/packages/backend.ai-webui-docs/src/ko/images/model_store_page_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/ko/model_serving/model_serving.md b/packages/backend.ai-webui-docs/src/ko/model_serving/model_serving.md index 7302402beb..56f71cac1b 100644 --- a/packages/backend.ai-webui-docs/src/ko/model_serving/model_serving.md +++ b/packages/backend.ai-webui-docs/src/ko/model_serving/model_serving.md @@ -63,7 +63,8 @@ Backend.AI는 모델 학습 단계에서 개발 환경 구축과 리소스 관 :::tip 대안적 워크플로우로, [모델 스토어](#model-store)에서 사전 구성된 모델을 탐색하고 -`Run this model` 버튼을 사용하여 한 번의 클릭으로 배포할 수 있습니다. +`Run this model` 버튼(버전 26.4.0 이상에서는 `Deploy`로 이름이 변경됨)을 사용하여 +한 번의 클릭으로 배포할 수 있습니다. ::: @@ -273,9 +274,9 @@ failures) ┌─────┴─────┐ 서비스 정의 파일(`service-definition.toml`)을 사용하면 관리자가 모델 서비스에 필요한 리소스, 환경 및 런타임 설정을 미리 구성할 수 있습니다. 이 파일이 모델 폴더에 있으면, 시스템은 서비스를 생성할 때 이러한 설정을 기본값으로 사용합니다. `model-definition.yaml`과 `service-definition.toml` 모두 모델 폴더에 있어야 -모델 스토어 페이지에서 `Run this model` 버튼이 활성화됩니다. 이 두 파일은 -함께 작동합니다: 모델 정의는 모델과 추론 서버 구성을 지정하고, 서비스 정의는 -런타임 환경, 리소스 할당 및 환경 변수를 지정합니다. +모델 스토어 페이지에서 `Run this model` 버튼(버전 26.4.0 이상에서는 `Deploy`)이 +활성화됩니다. 이 두 파일은 함께 작동합니다: 모델 정의는 모델과 추론 서버 구성을 +지정하고, 서비스 정의는 런타임 환경, 리소스 할당 및 환경 변수를 지정합니다. 서비스 정의 파일은 런타임 변형별로 섹션이 구성된 TOML 형식을 따릅니다. 각 섹션은 서비스의 특정 측면을 구성합니다. @@ -319,9 +320,9 @@ MODEL_NAME = "example-model-name" ::: :::note -`Run this model` 버튼을 사용하여 모델 스토어에서 서비스를 생성하면 -`service-definition.toml`의 설정이 자동으로 적용됩니다. 나중에 리소스 -할당을 조정해야 하는 경우, 모델 서빙 페이지를 통해 서비스를 수정할 수 있습니다. +`Run this model` 버튼(버전 26.4.0 이상에서는 `Deploy`)을 사용하여 모델 스토어에서 +서비스를 생성하면 `service-definition.toml`의 설정이 자동으로 적용됩니다. 나중에 +리소스 할당을 조정해야 하는 경우, 모델 서빙 페이지를 통해 서비스를 수정할 수 있습니다. ::: ## 서빙 페이지 개요 @@ -563,6 +564,49 @@ vllm serve /models/my-model --tp 2 ![](../images/auto_scaling_rules_modal.png) +:::note +Backend.AI 버전 **26.4.0**부터 자동 스케일링 규칙이 Prometheus 프리셋 지원과 +새로운 조건 모델로 재설계되었습니다. 이전 버전을 사용 중이라면 위의 설명이 그대로 +적용됩니다. 그렇지 않은 경우, 아래 +[자동 스케일링 규칙 (버전 26.4.0 이상)](#auto-scaling-rules-version-26-4-0-and-later) +섹션을 참고하세요. +::: + + + +#### 자동 스케일링 규칙 (버전 26.4.0 이상) + +Backend.AI 버전 26.4.0 이상에서는 Prometheus 메트릭 소스, 세그먼트형 조건 컨트롤, 그리고 더욱 풍부한 규칙 목록과 함께 자동 스케일링 규칙이 재설계되었습니다. + +![](../images/auto_scaling_rules_v2.png) + +규칙 목록에서는 다음을 제공합니다: + +- **생성 시간**(Created At)과 **최근 실행 시점**(Last Triggered) 날짜-시간 범위로 규칙을 필터링할 수 있는 속성 필터 바. +- 서버 측 페이지네이션. +- **메트릭 소스**(Metric Source), **조건**(Condition), **타임 윈도우**(Time Window), **단계 크기**(Step Size), **최소 / 최대 복제본 수**(Min / Max Replicas), **생성 시간**(Created At), **최근 실행 시점**(Last Triggered) 컬럼. **단계 크기** 컬럼은 설정된 임계값으로부터 도출된 방향에 따라 `+`, `−`, `±` 기호를 자동으로 표시하므로, 더 이상 `Scale Out` 또는 `Scale In`을 명시적으로 선택하지 않습니다. +- 각 행의 조건 요약 옆에 표시되는 행별 편집 및 삭제 아이콘. + +`Add Rules` 버튼을 클릭하면 **오토스케일링 규칙 추가** 편집기가 열립니다. 기존 규칙을 수정하려면 해당 행의 편집 아이콘을 클릭하세요. 규칙 값이 미리 채워진 상태로 **오토스케일링 규칙 수정** 편집기가 열립니다. 편집기에는 다음 필드가 순서대로 포함됩니다: + +- **메트릭 소스**(Metric Source): `Kernel`, `Inference Framework`, `Prometheus` 중 하나를 선택합니다. +- **메트릭 이름**(Metric Name): `Kernel`과 `Inference Framework`의 경우 메트릭 이름을 입력합니다. `Kernel`에서는 `cpu_util`, `mem`, `net_rx`, `net_tx`와 같은 일반적인 메트릭이 자동 완성 제안으로 제공되며, 사용자 정의 이름을 자유롭게 입력할 수도 있습니다. +- **메트릭 이름 (Prometheus 프리셋)**(Metric Name (Prometheus Preset)): **메트릭 소스**가 `Prometheus`일 때만 표시됩니다. 드롭다운에서 프리셋을 선택하면 프리셋의 메트릭 이름, 쿼리 템플릿, 그리고 (정의된 경우) **타임 윈도우**가 자동으로 채워집니다. 선택기 아래의 **현재 값**(Current value) 미리보기는 프리셋이 반환하는 최신 값을 새로 고침 버튼과 함께 표시합니다. 여러 시리즈가 반환되는 경우 미리보기에는 시리즈 수와 가장 최근 값이 표시되며, 사용 가능한 데이터가 없으면 **사용 가능한 데이터가 없습니다**(No data available)라고 표시됩니다. +- **조건**(Condition): 두 가지 모드를 가진 세그먼트형 컨트롤입니다: + + - **단일**(Single): `Metric Threshold` 단일 비교를 정의합니다. 여기서 ``는 `>` 또는 `<` 중 하나입니다. + - **범위**(Range): `Min Threshold < Metric < Max Threshold` 범위를 정의합니다. 두 임계값 모두 필수이며, 최소값은 최대값보다 작아야 합니다. + +- **단계 크기**(Step Size): 스케일링 이벤트마다 추가하거나 제거할 복제본 수를 지정하는 양의 정수입니다. 방향(추가 또는 제거)은 구성된 임계값에서 자동으로 도출되므로 크기만 지정하면 됩니다. +- **타임 윈도우**(Time Window): 메트릭이 집계되어 스케일링 평가에 사용되는 시간(초 단위)입니다. 이는 기존의 `CoolDown Seconds` 필드를 대체하며 의미가 다릅니다. +- **최소 복제본 수**(Min Replicas) 및 **최대 복제본 수**(Max Replicas): 자동 스케일링이 복제본 수에 대해 강제하는 하한과 상한입니다. 자동 스케일링은 복제본 수를 **최소 복제본 수** 아래로 줄이거나 **최대 복제본 수** 위로 늘리지 않습니다. + +![](../images/auto_scaling_rules_modal_v2.png) + +**메트릭 소스**가 `Prometheus`로 설정되면 편집기에 프리셋 선택기와 실시간 **현재 값** 미리보기가 표시됩니다. + +![](../images/auto_scaling_rules_modal_prometheus_v2.png) + ### 토큰 생성 @@ -727,6 +771,66 @@ API 연결에 문제가 발생하면, Chat 페이지에 모델 설정을 수동 자동으로 적용됩니다. 나중에 서빙 페이지를 통해 서비스를 수정할 수 있습니다. ::: +:::note +Backend.AI 버전 **26.4.0**부터 모델 스토어가 재설계되었습니다. 이전 버전을 사용 +중이라면 위의 설명이 그대로 적용됩니다. 그렇지 않은 경우, 아래 +[모델 스토어 (버전 26.4.0 이상)](#model-store-version-26-4-0-and-later) +섹션을 참고하세요. +::: + + + +### 모델 스토어 (버전 26.4.0 이상) + +Backend.AI 버전 26.4.0 이상에서는 간소화된 탐색 경험, 카드 상세 Drawer, 그리고 기존의 탐색/상세/실행 워크플로우를 대체하는 간결한 배포 흐름으로 모델 스토어가 재설계되었습니다. + +![](../images/model_store_page_v2.png) + +페이지 상단은 검색 및 정렬 레이아웃을 사용합니다: + +- **모델 검색**(Search Models): **이름으로 필터링**(Filter By Name) 속성 필터를 사용하여 이름으로 모델 카드를 검색합니다. +- **정렬**(Sort): 결과 정렬 방식을 선택합니다. 사용 가능한 옵션은 `이름 (A→Z)`, `이름 (Z→A)`, `오래된 순`, `최신 순`입니다. +- **새로 고침**: 새로 고침 버튼을 클릭하여 카드 목록을 다시 로드합니다. + +각 카드에는 모델 브랜드 아이콘, 제목(제목이 설정되지 않은 경우 이름), 작업 태그, 상대 생성 시간, 그리고 아이콘과 함께 작가가 표시됩니다. 현재 프로젝트에 **호환 가능한 프리셋이 없는** 카드는 50% 투명도로 표시됩니다. 이러한 카드를 열어 상세 정보를 볼 수는 있지만, **Deploy** 버튼은 비활성화되고 Drawer에 *No compatible presets available. This model cannot be deployed.*라는 오류 알림이 표시됩니다. + +서버에 `MODEL_STORE` 프로젝트가 설정되어 있지 않으면, 페이지에는 관리자에게 문의하라는 안내와 함께 *모델 스토어 프로젝트를 찾을 수 없습니다* 메시지가 표시됩니다. 필터와 일치하는 모델 카드가 없으면 *모델을 찾을 수 없습니다*라고 표시됩니다. + +목록은 하단에서 페이지네이션됩니다. 페이지 크기는 `10`, `20`, `50`개 항목 중에서 변경할 수 있습니다. + +카드를 클릭하면 페이지 오른쪽에 모델 카드 Drawer가 열립니다. Drawer 상단에는 모델 제목과 설명이 표시되고, 그 다음 작업, 카테고리, 라벨, 라이선스 태그가 이어지며, 다음 항목을 포함한 상세 목록이 표시됩니다: + +- **작가**(Author) +- **아키텍처**(Architecture) +- **프레임워크**(Framework) (각 프레임워크는 아이콘과 함께 표시) +- **버전**(Version) +- **생성**(Created) 및 **마지막 수정**(Last Modified) 타임스탬프 +- **모델 폴더**(Model Folder): 모델 스토리지 폴더의 폴더 탐색기를 여는 클릭 가능한 링크 +- **최소 리소스**(Min Resource): 최소 리소스 요구 사항(CPU, 메모리, GPU) + +모델 카드에 README가 포함된 경우, Drawer 하단에 `README.md` 카드로 렌더링됩니다. + +![](../images/model_card_detail_drawer.png) + +버전 26.4.0 이상에서 모델 폴더를 복제하려면 [데이터](../vfolder/vfolder.md) 페이지를 직접 사용하세요. 모델 스토어 Drawer에는 더 이상 전용 Clone 버튼이 제공되지 않습니다. + +Drawer 헤더의 **Deploy** 버튼을 클릭하여 모델을 서비스로 배포합니다. 배포 흐름은 다음 두 가지 방식 중 하나로 동작합니다: + +- **자동 배포**: 모델에 사용 가능한 프리셋이 정확히 하나 있고 현재 프로젝트에 접근 가능한 자원 그룹이 정확히 하나 있으면, 모달을 표시하지 않고 배포가 조용히 생성됩니다. 엔드포인트가 쿼리 가능해진 후 해당 엔드포인트 상세 페이지로 이동합니다. +- **모델 배포 모달**(Deploy Model): 그렇지 않은 경우, **Deploy Model** 모달이 다음 필수 필드와 함께 열립니다: + + - **프리셋**(Preset): 사용 가능한 자원 프리셋의 그룹화된 드롭다운입니다. 프리셋이 여러 런타임 변형에 걸쳐 있는 경우 옵션은 런타임 변형 이름별로 그룹화되고, 그렇지 않은 경우 평면 목록으로 표시됩니다. + - **자원 그룹**(Resource Group): 서비스가 실행될 자원 그룹입니다. + + 모달의 **Deploy** 버튼을 클릭하여 배포를 시작합니다. 모델이 배포되었음을 확인하는 성공 토스트가 표시되고, 엔드포인트 상세 페이지로 이동합니다. + +![](../images/model_card_deploy_modal.png) + +:::note +선택한 모델에 현재 프로젝트와 호환되는 프리셋이 없으면 Drawer의 **Deploy** 버튼이 +비활성화되며, 호환되는 프리셋이 제공될 때까지 배포가 차단됩니다. +::: + ## 관리자 기능 ### 관리자 서빙 페이지 @@ -778,3 +882,45 @@ API 연결에 문제가 발생하면, Chat 페이지에 모델 설정을 수동 #### 프로젝트 모델 카드 스캔 `Scan Project Model Cards` 버튼을 클릭하여 프로젝트의 모델 폴더를 자동으로 스캔하고, 유효한 모델 정의가 포함된 폴더에 대해 모델 카드를 생성합니다. 스캔 결과에는 생성 및 업데이트된 모델 카드 수가 표시됩니다. + + +:::note +Backend.AI 버전 **26.4.0**부터 관리자 모델 스토어 관리 탭이 재설계되었습니다. 이전 +버전을 사용 중이라면 위의 설명이 그대로 적용됩니다. 그렇지 않은 경우, 아래 +[관리자 모델 스토어 관리 (버전 26.4.0 이상)](#admin-model-store-management-version-26-4-0-and-later) +섹션을 참고하세요. +::: + + + +#### 관리자 모델 스토어 관리 (버전 26.4.0 이상) + +Backend.AI 버전 26.4.0 이상에서는 **Model Store Management** 탭에 재설계된 모델 카드 목록이 표시됩니다. + +![](../images/admin_model_card_list_v2.png) + +목록은 다음 컬럼을 제공합니다: + +- **이름**(Name): 모델 카드의 고유 식별자입니다. +- **제목**(Title): 사람이 읽을 수 있는 표시 이름입니다. +- **카테고리**(Category): 모델 카테고리입니다 (예: LLM). +- **작업**(Task): 추론 작업 유형입니다 (예: text-generation). +- **접근 수준**(Access Level): 모델 카드가 공개적으로 접근 가능한 경우 녹색 `Public` 태그가 표시되고, 그렇지 않으면 기본 `Private` 태그가 표시됩니다. +- **도메인**(Domain): 모델 카드를 소유한 도메인입니다. +- **프로젝트**(Project): 모델 카드를 소유한 프로젝트입니다. +- **생성 시간**(Created At): 모델 카드가 생성된 시간입니다. + +상단의 속성 필터 바를 사용하여 **이름**으로 목록을 필터링할 수 있습니다. 각 행의 **이름** 셀에는 편집 및 삭제 액션 아이콘이 직접 표시됩니다. + +여러 모델 카드를 한 번에 삭제하려면 체크박스로 삭제할 행을 선택한 후 선택 개수 옆의 빨간색 휴지통 버튼을 클릭합니다. 카드가 삭제되기 전에 확인 대화 상자가 표시됩니다. + +:::note +개별 모델 카드의 생성, 편집, 삭제 대화 상자는 이전 버전과 동일합니다. +[모델 카드 생성](#creating-a-model-card), +[모델 카드 수정](#editing-a-model-card), +[모델 카드 삭제](#deleting-model-cards)를 참고하세요. +::: + +:::note +**Scan Project Model Cards** 버튼은 Backend.AI 버전 26.4.0 이상에서는 제공되지 않습니다. +::: diff --git a/packages/backend.ai-webui-docs/src/th/images/admin_model_card_list_v2.png b/packages/backend.ai-webui-docs/src/th/images/admin_model_card_list_v2.png new file mode 100644 index 0000000000..6160bef2dc Binary files /dev/null and b/packages/backend.ai-webui-docs/src/th/images/admin_model_card_list_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/th/images/auto_scaling_rules_modal_prometheus_v2.png b/packages/backend.ai-webui-docs/src/th/images/auto_scaling_rules_modal_prometheus_v2.png new file mode 100644 index 0000000000..b2fb903076 Binary files /dev/null and b/packages/backend.ai-webui-docs/src/th/images/auto_scaling_rules_modal_prometheus_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/th/images/auto_scaling_rules_modal_v2.png b/packages/backend.ai-webui-docs/src/th/images/auto_scaling_rules_modal_v2.png new file mode 100644 index 0000000000..86154da6ee Binary files /dev/null and b/packages/backend.ai-webui-docs/src/th/images/auto_scaling_rules_modal_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/th/images/auto_scaling_rules_v2.png b/packages/backend.ai-webui-docs/src/th/images/auto_scaling_rules_v2.png new file mode 100644 index 0000000000..b6faffbceb Binary files /dev/null and b/packages/backend.ai-webui-docs/src/th/images/auto_scaling_rules_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/th/images/model_card_deploy_modal.png b/packages/backend.ai-webui-docs/src/th/images/model_card_deploy_modal.png new file mode 100644 index 0000000000..87e883c626 Binary files /dev/null and b/packages/backend.ai-webui-docs/src/th/images/model_card_deploy_modal.png differ diff --git a/packages/backend.ai-webui-docs/src/th/images/model_card_detail_drawer.png b/packages/backend.ai-webui-docs/src/th/images/model_card_detail_drawer.png new file mode 100644 index 0000000000..58d246ce36 Binary files /dev/null and b/packages/backend.ai-webui-docs/src/th/images/model_card_detail_drawer.png differ diff --git a/packages/backend.ai-webui-docs/src/th/images/model_store_page_v2.png b/packages/backend.ai-webui-docs/src/th/images/model_store_page_v2.png new file mode 100644 index 0000000000..39c439d56a Binary files /dev/null and b/packages/backend.ai-webui-docs/src/th/images/model_store_page_v2.png differ diff --git a/packages/backend.ai-webui-docs/src/th/model_serving/model_serving.md b/packages/backend.ai-webui-docs/src/th/model_serving/model_serving.md index b1268790f7..253b040dbf 100644 --- a/packages/backend.ai-webui-docs/src/th/model_serving/model_serving.md +++ b/packages/backend.ai-webui-docs/src/th/model_serving/model_serving.md @@ -66,6 +66,7 @@ inference API ได้เมื่อต้องการ deploy โมเด :::tip เป็นเวิร์กโฟลว์ทางเลือก คุณสามารถเรียกดูโมเดลที่กำหนดค่าไว้ล่วงหน้าใน [Model Store](#model-store) และ deploy ด้วยคลิกเดียวโดยใช้ปุ่ม `Run this model` +(เปลี่ยนชื่อเป็น `Deploy` ในเวอร์ชัน 26.4.0 ขึ้นไป) ::: @@ -267,7 +268,7 @@ failures) ┌─────┴─────┐ ไฟล์กำหนดบริการ (`service-definition.toml`) ช่วยให้ผู้ดูแลระบบสามารถกำหนดค่าทรัพยากร สภาพแวดล้อม และการตั้งค่า runtime ที่จำเป็นสำหรับบริการโมเดลล่วงหน้า เมื่อไฟล์นี้อยู่ในโฟลเดอร์โมเดล ระบบจะใช้การตั้งค่าเหล่านี้เป็นค่าเริ่มต้นเมื่อสร้างบริการ -ทั้ง `model-definition.yaml` และ `service-definition.toml` ต้องอยู่ในโฟลเดอร์โมเดลเพื่อเปิดใช้งานปุ่ม `Run this model` ในหน้า Model Store ไฟล์ทั้งสองทำงานร่วมกัน: ไฟล์กำหนดโมเดลระบุการกำหนดค่าโมเดลและเซิร์ฟเวอร์ inference ในขณะที่ไฟล์กำหนดบริการระบุสภาพแวดล้อม runtime การจัดสรรทรัพยากร และตัวแปรสภาพแวดล้อม +ทั้ง `model-definition.yaml` และ `service-definition.toml` ต้องอยู่ในโฟลเดอร์โมเดลเพื่อเปิดใช้งานปุ่ม `Run this model` (`Deploy` ในเวอร์ชัน 26.4.0 ขึ้นไป) ในหน้า Model Store ไฟล์ทั้งสองทำงานร่วมกัน: ไฟล์กำหนดโมเดลระบุการกำหนดค่าโมเดลและเซิร์ฟเวอร์ inference ในขณะที่ไฟล์กำหนดบริการระบุสภาพแวดล้อม runtime การจัดสรรทรัพยากร และตัวแปรสภาพแวดล้อม ไฟล์กำหนดบริการใช้รูปแบบ TOML โดยมีส่วนต่างๆ จัดตามตัวแปร runtime แต่ละส่วนกำหนดลักษณะเฉพาะของบริการ: @@ -307,7 +308,7 @@ MODEL_NAME = "example-model-name" ::: :::note -เมื่อบริการถูกสร้างขึ้นจาก Model Store โดยใช้ปุ่ม `Run this model` การตั้งค่าจาก `service-definition.toml` จะถูกนำไปใช้โดยอัตโนมัติ หากคุณต้องการปรับการจัดสรรทรัพยากรในภายหลัง คุณสามารถแก้ไขบริการผ่านหน้า Model Serving +เมื่อบริการถูกสร้างขึ้นจาก Model Store โดยใช้ปุ่ม `Run this model` (`Deploy` ในเวอร์ชัน 26.4.0 ขึ้นไป) การตั้งค่าจาก `service-definition.toml` จะถูกนำไปใช้โดยอัตโนมัติ หากคุณต้องการปรับการจัดสรรทรัพยากรในภายหลัง คุณสามารถแก้ไขบริการผ่านหน้า Model Serving ::: ## ภาพรวมหน้า Serving @@ -549,6 +550,49 @@ vllm serve /models/my-model --tp 2 ![](../images/auto_scaling_rules_modal.png) +:::note +ตั้งแต่ Backend.AI เวอร์ชัน **26.4.0** เป็นต้นไป กฎการปรับขนาดอัตโนมัติได้รับการออกแบบใหม่ +พร้อมการรองรับ Prometheus preset และโมเดลเงื่อนไขใหม่ หากคุณใช้เวอร์ชันที่เก่ากว่า คำอธิบาย +ข้างต้นยังคงใช้ได้ มิฉะนั้น ให้ดู +[กฎการปรับขนาดอัตโนมัติ (เวอร์ชัน 26.4.0 ขึ้นไป)](#auto-scaling-rules-version-26-4-0-and-later) +ด้านล่าง +::: + + + +#### กฎการปรับขนาดอัตโนมัติ (เวอร์ชัน 26.4.0 ขึ้นไป) + +ใน Backend.AI เวอร์ชัน 26.4.0 ขึ้นไป กฎการปรับขนาดอัตโนมัติได้รับการออกแบบใหม่พร้อมด้วยแหล่งเมตริก Prometheus, ตัวควบคุมเงื่อนไขแบบแบ่งส่วน และรายการกฎที่มีรายละเอียดมากขึ้น + +![](../images/auto_scaling_rules_v2.png) + +รายการกฎให้บริการดังนี้: + +- แถบตัวกรองคุณสมบัติสำหรับกรองกฎตามช่วงวันเวลาของ **สร้างเวลา** (Created At) และ **ทริกเกอร์ครั้งสุดท้าย** (Last Triggered) +- การแบ่งหน้าที่ฝั่งเซิร์ฟเวอร์ +- คอลัมน์ต่อไปนี้: **แหล่งวัด** (Metric Source), **เงื่อนไข** (Condition), **กรอบเวลา** (Time Window), **ขนาดขั้นตอน** (Step Size), **แบบจำลองขั้นต่ำ / สูงสุด** (Min / Max Replicas), **สร้างเวลา** (Created At), **ทริกเกอร์ครั้งสุดท้าย** (Last Triggered) คอลัมน์ **ขนาดขั้นตอน** จะแสดง `+`, `−`, หรือ `±` โดยอัตโนมัติตามทิศทางที่ได้จากเกณฑ์ที่คุณตั้งไว้ ดังนั้นคุณจึงไม่ต้องเลือก `Scale Out` หรือ `Scale In` โดยตรงอีกต่อไป +- ไอคอนแก้ไขและลบต่อแถว แสดงถัดจากสรุปเงื่อนไขในแต่ละแถว + +คลิกปุ่ม `Add Rules` เพื่อเปิดตัวแก้ไข **เพิ่มกฎการปรับขนาดอัตโนมัติ** หากต้องการแก้ไขกฎที่มีอยู่ ให้คลิกไอคอนแก้ไขในแถวนั้น ตัวแก้ไข **แก้ไขกฎการปรับขนาดอัตโนมัติ** จะเปิดขึ้นโดยมีค่าของกฎที่กรอกไว้ล่วงหน้า ตัวแก้ไขประกอบด้วยฟิลด์ต่อไปนี้ตามลำดับ: + +- **แหล่งวัด** (Metric Source): เลือก `Kernel`, `Inference Framework` หรือ `Prometheus` +- **ชื่อเมตริก** (Metric Name): สำหรับ `Kernel` และ `Inference Framework` ให้ใส่ชื่อเมตริก สำหรับ `Kernel` จะมีเมตริกทั่วไป เช่น `cpu_util`, `mem`, `net_rx` และ `net_tx` เป็นคำแนะนำให้เติมอัตโนมัติ และคุณยังสามารถพิมพ์ชื่อที่กำหนดเองได้อย่างอิสระ +- **ชื่อเมตริก (Prometheus Preset)** (Metric Name (Prometheus Preset)): แสดงเฉพาะเมื่อ **แหล่งวัด** เป็น `Prometheus` เลือก preset จากดรอปดาวน์ ชื่อเมตริก เทมเพลตคิวรี และ (เมื่อกำหนดไว้) **กรอบเวลา** ของ preset จะถูกกรอกโดยอัตโนมัติ ด้านล่างตัวเลือก การแสดงตัวอย่าง **ค่าปัจจุบัน** (Current value) จะแสดงค่าล่าสุดที่ preset ส่งกลับพร้อมปุ่มรีเฟรช เมื่อมีชุดข้อมูลหลายชุดถูกส่งกลับ การแสดงตัวอย่างจะแสดงจำนวนชุดข้อมูลและค่าล่าสุด หากไม่มีข้อมูลให้ใช้งาน จะแสดงเป็น **ไม่มีข้อมูล** (No data available) +- **เงื่อนไข** (Condition): ตัวควบคุมแบบแบ่งส่วนที่มีสองโหมด: + + - **รายการเดียว** (Single): กำหนดการเปรียบเทียบแบบเดียว `Metric Threshold` โดยที่ `` เป็น `>` หรือ `<` + - **ช่วง** (Range): กำหนดช่วง `Min Threshold < Metric < Max Threshold` ต้องระบุทั้งสองเกณฑ์ และเกณฑ์ต่ำสุดต้องน้อยกว่าเกณฑ์สูงสุด + +- **ขนาดขั้นตอน** (Step Size): จำนวนเต็มบวกที่ระบุจำนวนเรพลิกาที่จะเพิ่มหรือลบต่อเหตุการณ์การปรับขนาด ทิศทาง (เพิ่มหรือลบ) ได้มาจากเกณฑ์ที่กำหนดค่าไว้โดยอัตโนมัติ ดังนั้นคุณจึงระบุเฉพาะขนาดเท่านั้น +- **กรอบเวลา** (Time Window): กรอบเวลาเป็นวินาทีที่ใช้ในการรวบรวมและประเมินเมตริกสำหรับการปรับขนาด ค่านี้แทนที่ฟิลด์ `CoolDown Seconds` เดิมและมีความหมายที่แตกต่างออกไป +- **แบบจำลองขั้นต่ำ** (Min Replicas) และ **แบบจำลองสูงสุด** (Max Replicas): ขอบเขตล่างและบนที่การปรับขนาดอัตโนมัติบังคับใช้กับจำนวนเรพลิกา การปรับขนาดอัตโนมัติจะไม่ลดจำนวนเรพลิกาต่ำกว่า **แบบจำลองขั้นต่ำ** หรือเพิ่มให้มากกว่า **แบบจำลองสูงสุด** + +![](../images/auto_scaling_rules_modal_v2.png) + +เมื่อ **แหล่งวัด** ถูกตั้งเป็น `Prometheus` ตัวแก้ไขจะแสดงตัวเลือก preset และการแสดงตัวอย่าง **ค่าปัจจุบัน** แบบสด + +![](../images/auto_scaling_rules_modal_prometheus_v2.png) + ### การสร้างโทเค็น @@ -709,6 +753,65 @@ endpoint ได้ หากบริการถูกสร้างในเ จะถูกนำไปใช้โดยอัตโนมัติ คุณสามารถแก้ไขบริการในภายหลังผ่านหน้าการให้บริการ ::: +:::note +ตั้งแต่ Backend.AI เวอร์ชัน **26.4.0** เป็นต้นไป Model Store ได้รับการออกแบบใหม่ หากคุณ +ใช้เวอร์ชันที่เก่ากว่า คำอธิบายข้างต้นยังคงใช้ได้ มิฉะนั้น ให้ดู +[Model Store (เวอร์ชัน 26.4.0 ขึ้นไป)](#model-store-version-26-4-0-and-later) ด้านล่าง +::: + + + +### Model Store (เวอร์ชัน 26.4.0 ขึ้นไป) + +ใน Backend.AI เวอร์ชัน 26.4.0 ขึ้นไป Model Store ได้รับการออกแบบใหม่พร้อมด้วยประสบการณ์การเรียกดูที่เรียบง่ายขึ้น, Drawer แสดงรายละเอียดการ์ด และขั้นตอนการ deploy ที่กระชับซึ่งแทนที่เวิร์กโฟลว์แบบเรียกดู/รายละเอียด/เรียกใช้แบบเดิม + +![](../images/model_store_page_v2.png) + +ส่วนบนของหน้าใช้รูปแบบค้นหาและเรียงลำดับ: + +- **ค้นหาโมเดล** (Search Models): ใช้ตัวกรองคุณสมบัติ **กรองตามชื่อ** (Filter By Name) เพื่อค้นหาการ์ดโมเดลตามชื่อ +- **เรียงลำดับ** (Sort): เลือกวิธีการเรียงลำดับผลลัพธ์ ตัวเลือกที่ใช้งานได้คือ `ชื่อ (A→Z)`, `ชื่อ (Z→A)`, `เก่าสุดก่อน`, และ `ใหม่สุดก่อน` +- **รีเฟรช**: คลิกปุ่มรีเฟรชเพื่อโหลดรายการการ์ดใหม่ + +การ์ดแต่ละใบจะแสดงไอคอนแบรนด์ของโมเดล, ชื่อเรื่อง (หรือชื่อเมื่อไม่มีการตั้งชื่อเรื่อง), แท็กงาน, เวลาสร้างแบบสัมพัทธ์ และผู้เขียนพร้อมไอคอน การ์ดที่ **ไม่มี preset ที่เข้ากันได้** สำหรับโปรเจกต์ปัจจุบันจะถูกแสดงที่ความโปร่งใส 50 % คุณสามารถเปิดการ์ดดังกล่าวเพื่อดูรายละเอียดได้ แต่ปุ่ม **Deploy** จะถูกปิดใช้งานและมีการแจ้งเตือนข้อผิดพลาด *No compatible presets available. This model cannot be deployed.* แสดงใน Drawer + +หากไม่ได้ตั้งค่าโปรเจกต์ `MODEL_STORE` บนเซิร์ฟเวอร์ หน้าจะแสดงข้อความ *ไม่พบโปรเจกต์ Model Store* พร้อมคำแนะนำให้ติดต่อผู้ดูแลระบบ หากไม่มีการ์ดโมเดลใดที่ตรงกับตัวกรองของคุณ หน้าจะแสดง *ไม่พบโมเดล* + +รายการจะถูกแบ่งหน้าที่ด้านล่าง คุณสามารถเปลี่ยนขนาดหน้าระหว่าง `10`, `20` และ `50` รายการได้ + +คลิกการ์ดเพื่อเปิด Drawer การ์ดโมเดลทางด้านขวาของหน้า Drawer จะแสดงชื่อเรื่องและคำอธิบายโมเดลที่ด้านบน ตามด้วยแท็กงาน หมวดหมู่ ป้ายกำกับ และใบอนุญาต จากนั้นจะเป็นรายการรายละเอียดที่มีรายการต่อไปนี้: + +- **ผู้เขียน** (Author) +- **สถาปัตยกรรม** (Architecture) +- **เฟรมเวิร์ก** (Framework) (เฟรมเวิร์กแต่ละตัวจะแสดงพร้อมไอคอน) +- **เวอร์ชัน** (Version) +- **สร้างเมื่อ** (Created) และ **แก้ไขล่าสุด** (Last Modified) เวลาประทับ +- **โฟลเดอร์โมเดล** (Model Folder): ลิงก์ที่คลิกได้ซึ่งเปิดตัวสำรวจโฟลเดอร์สำหรับโฟลเดอร์จัดเก็บโมเดล +- **ทรัพยากรขั้นต่ำ** (Min Resource): ข้อกำหนดทรัพยากรขั้นต่ำ (CPU, หน่วยความจำ, GPU) + +หากการ์ดโมเดลมี README จะถูกเรนเดอร์เป็นการ์ด `README.md` ที่ด้านล่างของ Drawer + +![](../images/model_card_detail_drawer.png) + +ในการโคลนโฟลเดอร์โมเดลในเวอร์ชัน 26.4.0 ขึ้นไป ให้ใช้หน้า [Data](../vfolder/vfolder.md) โดยตรง เนื่องจาก Drawer ของ Model Store ไม่มีปุ่ม Clone เฉพาะอีกต่อไป + +คลิกปุ่ม **Deploy** ในส่วนหัวของ Drawer เพื่อ deploy โมเดลเป็นบริการ ขั้นตอนการ deploy ทำงานได้ด้วยหนึ่งในสองรูปแบบ: + +- **Deploy อัตโนมัติ**: หากโมเดลมี preset ที่ใช้งานได้เพียงหนึ่งรายการ และโปรเจกต์ปัจจุบันมีกลุ่มทรัพยากรที่เข้าถึงได้เพียงหนึ่งรายการ การ deploy จะถูกสร้างขึ้นอย่างเงียบ ๆ โดยไม่มีโมดอลแสดงขึ้น หลังจาก endpoint พร้อมให้สืบค้นแล้ว คุณจะถูกนำไปยังหน้ารายละเอียด endpoint +- **โมดอล Deploy Model**: มิฉะนั้น โมดอล **Deploy Model** จะเปิดขึ้นพร้อมด้วยฟิลด์ที่จำเป็นต่อไปนี้: + + - **Preset**: ดรอปดาวน์ที่จัดกลุ่มของ preset ทรัพยากรที่ใช้งานได้ เมื่อ preset ครอบคลุมตัวแปร runtime หลายตัว ตัวเลือกจะถูกจัดกลุ่มตามชื่อตัวแปร runtime มิฉะนั้น ตัวเลือกจะถูกแสดงเป็นรายการแบบแบน + - **Resource Group**: กลุ่มทรัพยากรที่บริการจะทำงาน + + คลิกปุ่ม **Deploy** ในโมดอลเพื่อเริ่มการ deploy จะมีการแสดง toast แสดงความสำเร็จที่ยืนยันว่าโมเดลได้รับการ deploy แล้ว และคุณจะถูกนำไปยังหน้ารายละเอียด endpoint + +![](../images/model_card_deploy_modal.png) + +:::note +หากโมเดลที่เลือกไม่มี preset ที่เข้ากันได้สำหรับโปรเจกต์ปัจจุบัน ปุ่ม **Deploy** ใน Drawer +จะถูกปิดใช้งาน และการ deploy จะถูกปิดกั้นจนกว่าจะมี preset ที่เข้ากันได้ +::: + ## ฟีเจอร์สำหรับผู้ดูแลระบบ ### หน้า Admin Serving @@ -760,3 +863,46 @@ endpoint ได้ หากบริการถูกสร้างในเ #### การสแกนการ์ดโมเดลโปรเจกต์ คลิกปุ่ม `Scan Project Model Cards` เพื่อสแกนโฟลเดอร์โมเดลของโปรเจกต์โดยอัตโนมัติและสร้างการ์ดโมเดลสำหรับโฟลเดอร์ที่มีคำจำกัดความโมเดลที่ถูกต้อง ผลลัพธ์การสแกนจะแสดงจำนวนการ์ดโมเดลที่สร้างและอัปเดต + + +:::note +ตั้งแต่ Backend.AI เวอร์ชัน **26.4.0** เป็นต้นไป แท็บการจัดการ Model Store สำหรับผู้ดูแล +ระบบได้รับการออกแบบใหม่ หากคุณใช้เวอร์ชันที่เก่ากว่า คำอธิบายข้างต้นยังคงใช้ได้ มิฉะนั้น +ให้ดู +[การจัดการ Model Store สำหรับผู้ดูแลระบบ (เวอร์ชัน 26.4.0 ขึ้นไป)](#admin-model-store-management-version-26-4-0-and-later) +ด้านล่าง +::: + + + +#### การจัดการ Model Store สำหรับผู้ดูแลระบบ (เวอร์ชัน 26.4.0 ขึ้นไป) + +ใน Backend.AI เวอร์ชัน 26.4.0 ขึ้นไป แท็บ **Model Store Management** จะแสดงรายการการ์ดโมเดลที่ได้รับการออกแบบใหม่ + +![](../images/admin_model_card_list_v2.png) + +รายการมีคอลัมน์ต่อไปนี้: + +- **ชื่อ** (Name): ตัวระบุเฉพาะของการ์ดโมเดล +- **ชื่อเรื่อง** (Title): ชื่อที่แสดงผลซึ่งมนุษย์อ่านได้ +- **หมวดหมู่** (Category): หมวดหมู่โมเดล (เช่น LLM) +- **งาน** (Task): ประเภทงาน inference (เช่น text-generation) +- **ระดับการเข้าถึง** (Access Level): แสดงแท็ก `Public` สีเขียวเมื่อการ์ดโมเดลเข้าถึงได้แบบสาธารณะ หรือแท็ก `Private` แบบเริ่มต้นเมื่อเป็นแบบส่วนตัว +- **โดเมน** (Domain): โดเมนที่เป็นเจ้าของการ์ดโมเดล +- **โปรเจกต์** (Project): โปรเจกต์ที่เป็นเจ้าของการ์ดโมเดล +- **สร้างเวลา** (Created At): เวลาที่สร้างการ์ดโมเดล + +คุณสามารถกรองรายการตาม **ชื่อ** โดยใช้แถบตัวกรองคุณสมบัติที่ด้านบน ไอคอนแก้ไขและลบจะแสดงอยู่ในเซลล์ **ชื่อ** ของแต่ละแถวโดยตรง + +หากต้องการลบการ์ดโมเดลหลายรายการในคราวเดียว ให้เลือกแถวที่ต้องการลบโดยใช้ช่องทำเครื่องหมาย จากนั้นคลิกปุ่มถังขยะสีแดงถัดจากจำนวนที่เลือก กล่องโต้ตอบยืนยันจะปรากฏขึ้นก่อนที่การ์ดจะถูกลบ + +:::note +กล่องโต้ตอบสำหรับการสร้าง, การแก้ไข และการลบของการ์ดโมเดลแต่ละรายการเหมือนกับในเวอร์ชัน +เดิม ดู [การสร้างการ์ดโมเดล](#creating-a-model-card), +[การแก้ไขการ์ดโมเดล](#editing-a-model-card), และ +[การลบการ์ดโมเดล](#deleting-model-cards) +::: + +:::note +ปุ่ม **Scan Project Model Cards** ไม่มีให้ใช้งานใน Backend.AI เวอร์ชัน 26.4.0 ขึ้นไป +:::