# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2023, Xorbits Inc.
# This file is distributed under the same license as the Xinference package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Xinference\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-31 11:46+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: zh_TW <LL@li.org>\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Generated-By: Babel 2.18.0\n"

#: ../../source/development/xinference_internals.rst:3
msgid "The internals of Xinference"
msgstr "Xinference 的內部結構"

#: ../../source/development/xinference_internals.rst:6
msgid "Table of contents:"
msgstr "目錄"

#: ../../source/development/xinference_internals.rst:9
msgid "Overview"
msgstr "概述"

#: ../../source/development/xinference_internals.rst:10
msgid ""
"Xinference leverages `Xoscar <https://github.com/xorbitsai/xoscar>`_, an "
"actor programming framework we designed, as its core component to manage "
"machines, devices, and model inference processes. Each actor serves as a "
"basic unit for model inference and various inference backends can be "
"integrate into the actor, enabling us to support multiple inference engines "
"and hardware. These actors are hosted and scheduled within actor pools, "
"which are designed to be asynchronous and non-blocking and function as "
"resource pools."
msgstr ""
"Xinference 利用我們設計的 actor 程式設計框架 `Xoscar "
"<https://github.com/xorbitsai/xoscar>`_ 作為其核心元件，以管理機器、裝置和模型推理程序。每個 actor "
"都是模型推理的基本單元，各種推理後端可以整合到 actor 中，從而使我們能夠支援多種推理引擎和硬體。這些 actor 在 actor "
"池中託管和排程，actor 池具有資源池的功能，actor 的設計是異步和非阻塞的。"

#: ../../source/development/xinference_internals.rst:22
msgid ""
"Both supervisor and worker are actor instances. Initially, an actor pool, "
"serving as a resource pool, needs to be created on each server; and each "
"actor can utilize a CPU core or a GPU device. Each server has its own "
"address (IP address or hostname), so actors on different computing nodes can"
" communicate with each other through these addresses. See `Actor`_ for more "
"information."
msgstr ""
"supervisor 和 worker 都是 actor 實例。需要先在每台伺服器上建立一個作為資源池的 actor 池；每個 actor 可以使用一個"
" CPU 核心或一塊 GPU 裝置。每台伺服器都有自己的位址（IP 位址或主機名稱），因此不同計算節點上的 actor "
"可以透過這些位址相互通訊。更多資訊，請參閱 `Actor`_。"

#: ../../source/development/xinference_internals.rst:27
msgid "RESTful API"
msgstr "RESTful API"

#: ../../source/development/xinference_internals.rst:28
msgid ""
"The RESTful API is implemented using `FastAPI "
"<https://github.com/tiangolo/fastapi>`_, as specified in `api/restful_api.py"
" "
"<https://github.com/xorbitsai/inference/tree/main/xinference/api/restful_api.py>`_."
msgstr ""
"RESTful API 是利用 `FastAPI <https://github.com/tiangolo/fastapi>`_ 實作的，具體程式碼在 "
"`api/restful_api.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/api/restful_api.py>`_。"

#: ../../source/development/xinference_internals.rst:35
msgid ""
"This is an example of the API ``/status``, it's corresponding function is "
"``get_status``. You can add connection between RESTful API and the backend "
"function you want in `api/restful_api.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/api/restful_api.py>`_."
msgstr ""
"這是一個 API 的範例，API ``/status`` 對應函數 ``get_status``。您可以在 `api/restful_api.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/api/restful_api.py>`_"
" 中添加 RESTful API 和對應後端函數之間的關係。"

#: ../../source/development/xinference_internals.rst:39
msgid "Command Line"
msgstr "命令列"

#: ../../source/development/xinference_internals.rst:40
msgid ""
"The Command Line is implemented using `Click "
"<https://click.palletsprojects.com/>`_, as specified in `deploy/cmdline.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/deploy/cmdline.py>`_,"
" allowing users to interact with the Xinference deployment features directly"
" from the terminal."
msgstr ""
"命令列是透過 `Click <https://click.palletsprojects.com/>`_ 實現的，具體程式碼在 "
"`deploy/cmdline.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/deploy/cmdline.py>`_，命令列允許使用者直接在終端機與"
" Xinference 進行互動。"

#: ../../source/development/xinference_internals.rst:45
msgid "Entry Points"
msgstr "入口點"

#: ../../source/development/xinference_internals.rst:46
msgid "Take the command-lines we implemented as examples:"
msgstr "以我們實作的命令行為例："

#: ../../source/development/xinference_internals.rst:48
msgid ""
"``xinference``: Provides commands for model management, including "
"registering/unregistering models, listing all registered/running models, and"
" launching or terminating specific models. It also features interactive "
"commands like generate and chat for testing and interacting with deployed "
"models in real-time."
msgstr ""
"``xinference``：提供命令用於模型管理，包括註冊/取消註冊模型、列出所有已註冊/執行的模型，以及啟動或終止特定模型。它還提供生成語言和聊天等互動式命令，用於測試或互動已部署的模型。"

#: ../../source/development/xinference_internals.rst:52
msgid "``xinference-local``: Starts a local Xinference service."
msgstr "``xinference-local``：啟動一個本地 Xinference 服務。"

#: ../../source/development/xinference_internals.rst:54
msgid ""
"``xinference-supervisor``: Initiates a supervisor process that manages and "
"monitors worker actors within a distributed setup."
msgstr ""
"``xinference-supervisor``：啟動 supervisor 進程，在分散式環境中管理和監控 worker actors。"

#: ../../source/development/xinference_internals.rst:56
msgid ""
"``xinference-worker``: Starts a worker process that executes tasks assigned "
"by the supervisor, utilizing available computational resources effectively."
msgstr "``xinference-worker``：啟動 worker 程序，利用可用計算資源，執行 supervisor 分配的任務。"

#: ../../source/development/xinference_internals.rst:59
msgid ""
"Each command is equipped with ``options`` and ``flags`` to customize its "
"behavior, such as specifying log levels, host addresses, port numbers, and "
"other relevant settings."
msgstr "每條命令都配有 ``option`` 和 ``flag``，可自訂其行為，如指定日誌級別、主機地址、通訊埠號碼和其他相關設定。"

#: ../../source/development/xinference_internals.rst:62
msgid ""
"Python projects define command-line console entry points in "
"``pyproject.toml``."
msgstr "Python 專案會在 ``pyproject.toml`` 中定義命令列主控台入口點。"

#: ../../source/development/xinference_internals.rst:72
msgid ""
"The command-line ``xinference`` can be referred to code in "
"``xinference.deploy.cmdline:cli``."
msgstr "命令行 ``xinference`` 可參考 ``xinference.deploy.cmdline:cli`` 中的程式碼。"

#: ../../source/development/xinference_internals.rst:75
msgid "Click"
msgstr "Click"

#: ../../source/development/xinference_internals.rst:76
msgid "We use Click to implement a specific command-line:"
msgstr "我們使用 Click 來實現特定的命令列："

#: ../../source/development/xinference_internals.rst:95
msgid ""
"For example, the ``xinference-local`` command allows you to define the host "
"address and port."
msgstr "例如，``xinference-local`` 指令允許您定義主機位址與埠號。"

#: ../../source/development/xinference_internals.rst:98
msgid "Actor"
msgstr "Actor"

#: ../../source/development/xinference_internals.rst:99
msgid ""
"Xinference is fundamentally based on `Xoscar "
"<https://github.com/xorbitsai/xoscar>`_, our actor framework, which can "
"manage computational resources and Python processes to support scalable and "
"concurrent programming. The following is a pseudocode demonstrating how our "
"Worker Actor works, the actual Worker Actor is more complex than this."
msgstr ""
"Xinference 以 `Xoscar <https://github.com/xorbitsai/xoscar>`_ 為基礎，Xoscar 是我們的"
" actor 框架，可以管理計算資源和 Python 程序，支援可擴展的並行程式設計。下面的虛擬碼演示了 Worker Actor 的運作方式，實際的 "
"Worker Actor 比這個複雜得多。"

#: ../../source/development/xinference_internals.rst:126
msgid ""
"We use the ``WorkerActor`` as an example to illustrate how we build the "
"Xinference. Each actor class is a standard Python class that inherits from "
"``xoscar.Actor``. An instance of this class is a specific actor within the "
"actor pool."
msgstr ""
"我們以 ``WorkerActor`` 為例，說明如何構建 Xinference。每個 actor 類別都是繼承自 ``xoscar.Actor`` "
"的標準 Python 類別。該類別的實例即為 actor 池中的一個特定 actor。"

#: ../../source/development/xinference_internals.rst:130
msgid ""
"**Define Actor Actions**: Each actor needs to define certain actions or "
"behaviors to accomplish specific tasks. For instance, the model inference "
"``WorkerActor`` needs to launch the model (``launch_model``), list the "
"models in this actor (``list_models``), terminate a model "
"(``terminate_model``). There are two special methods worth noting. The "
"``__post_create__`` is invoked before the actor is created, allowing for "
"necessary initializations. The ``__pre_destroy__`` is called after the actor"
" is destroyed, allowing for cleanup or finalization tasks."
msgstr ""
"**定義 Actor 的行為**：每個 actor 都需要定義某些動作或行為來完成特定任務。例如，模型推理 ``WorkerActor`` "
"需要啟動模型（``launch_model``）、列出該 actor "
"中的模型（``list_models``）、終止模型（``termininate_model``）。有兩個特殊方法值得注意。``__post_create__``"
" 在創建 actor 之前調用，進行必要的初始化。而 ``__pre_destroy__`` 會在 actor 被銷毀後調用，執行清理任務。"

#: ../../source/development/xinference_internals.rst:136
msgid ""
"**Reference Actor and Invoke Methods**: When an actor is created, it yields "
"a reference variable so that other actors can reference it. The actor "
"reference can also be referenced with the address. Suppose the "
"``WorkerActor`` is created and the reference variable is ``worker_ref``,  "
"the ``launch_model`` method of this actor class can be invoked by calling "
"``worker_ref.launch_model()``. Even if the actor's method is originally a "
"synchronized method, when called with an actor reference, it will become as "
"an asynchronous method."
msgstr ""
"**引用 Actor 和呼叫方法**：當建立一個 Actor 時，會產生一個參考變數，以便其他 Actor 可以引用它。Actor 也可以用 IP "
"位址來引用。假設建立了 ``WorkerActor``，且參考變數為 ``worker_ref``，那麼就可以透過呼叫 "
"``worker_ref.launch_model()`` 來呼叫該 Actor 類別的 ``launch_model``。即使 actor "
"中的方法原本是一個傳統的阻塞式方法，當我們使用參考變數呼叫這個方法時，它也變成了一個非同步方法。"

#: ../../source/development/xinference_internals.rst:143
msgid ""
"**Inference Engine**: The actor can manage the process, and the inference "
"engine is also a process. In the launch model part of the ``WorkerActor``, "
"we can initialize different inference engines according to the user's need. "
"Therefore, Xinference can support multiple inference engines and can easily "
"adapt to new inference engines in the future."
msgstr ""
"**推理引擎**：Actor 可以管理進程，而推理引擎也是一種進程。在 ``WorkerActor`` "
"的啟動模型部分，我們可以根據使用者的需求初始化不同的推理引擎。因此，Xinference 可以支援多種推理引擎，並能輕鬆適應未來的新推理引擎。"

#: ../../source/development/xinference_internals.rst:148
msgid ""
"See `Xoscar document <https://xoscar.dev/en/latest/getting_started/llm-"
"inference.html>`_ for more actor use cases."
msgstr ""
"請參閱 `Xoscar 文件 <https://xoscar.dev/en/latest/getting_started/llm-"
"inference.html>`_ 了解更多 Actor 使用案例。"

#: ../../source/development/xinference_internals.rst:151
msgid "Asynchronous Programming"
msgstr "非同步程式設計"

#: ../../source/development/xinference_internals.rst:153
msgid ""
"Both Xinference and Xoscar highly utilize asynchronous programming of "
"``asyncio``. Asynchronous programming is a programming paradigm that does "
"not block. Instead, requests and function calls are issued and executed in "
"the background and results are returned in the future. This enables us to "
"perform activities concurrently."
msgstr ""
"Xinference 和 Xoscar 高度依賴非同步程式庫 "
"``asyncio``。非同步程式設計是一種非阻塞的程式設計範式。相較於傳統的阻塞式函式呼叫，非同步程式設計中的請求或函式呼叫在背景執行，執行結果在未來某個時間點返回。非同步程式設計的優勢在於能夠同時並行進行許多不同的活動或任務。"

#: ../../source/development/xinference_internals.rst:159
msgid ""
"If you're not familiar with Pythons's ``asyncio``, you can see more "
"tutorials for help:"
msgstr "如果您不熟悉 Python 的 ``asyncio``，可以查看更多教學以獲得幫助："

#: ../../source/development/xinference_internals.rst:161
msgid ""
"`Python Asyncio Tutorial <https://bbc.github.io/cloudfit-public-"
"docs/asyncio/asyncio-part-1.html>`__"
msgstr ""
"`Python Asyncio 教學 <https://bbc.github.io/cloudfit-public-"
"docs/asyncio/asyncio-part-1.html>`__"

#: ../../source/development/xinference_internals.rst:163
msgid ""
"`Real Python's asyncio Tutorial <https://realpython.com/async-io-python/>`__"
msgstr "`Real Python asyncio 教學 <https://realpython.com/async-io-python/>`__"

#: ../../source/development/xinference_internals.rst:165
msgid ""
"`Python Official Documentation "
"<https://docs.python.org/3/library/asyncio.html>`__"
msgstr "`Python 官方文件 <https://docs.python.org/3/library/asyncio.html>`__"

#: ../../source/development/xinference_internals.rst:169
msgid "Model"
msgstr "模型"

#: ../../source/development/xinference_internals.rst:171
msgid ""
"Xinference supports different types of models including large language "
"models (LLMs), image models, audio models, embedding models, etc. All models"
" are implemented in `model/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/model>`_."
msgstr ""
"Xinference 支援不同類型的模型，包括大型語言模型（LLM）、圖像模型、音訊模型、嵌入模型等。所有模型在 `model/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/model>`_ "
"資料夾下實現。"

#: ../../source/development/xinference_internals.rst:175
msgid "LLM"
msgstr ""

#: ../../source/development/xinference_internals.rst:177
msgid ""
"Take `model/llm/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm>`_ "
"for example, it focuses on the management and instantiation of LLMs. It "
"includes detailed implementations for loading, configuring, and deploying "
"LLMs."
msgstr ""
"以 `model/llm/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm>`_ "
"為例，它主要管理和啟動 LLM，包括載入、設定和執行大型語言模型。"

#: ../../source/development/xinference_internals.rst:181
msgid ""
"We support many backends such as GGML, PyTorch, and vLLM. Our generated "
"content is compatible with the format of OpenAI, supporting features such as"
" streaming output and returning chat completion format (for chat models "
"only). Therefore, there is a lot of adaptation work to be done after the "
"model generate content. These tasks are not difficult, but they do require "
"some time. When writing this part of the code, please refer to the `OpenAI "
"API documentation <https://platform.openai.com/docs/introduction>`_ and the "
"documentation of various inference backends, and make the necessary "
"adaptations."
msgstr ""
"我們支援不同的推理後端，例如 GGML、PyTorch 和 vLLM。生成的內容與 OpenAI "
"的格式相容，例如支援串流輸出（stream），對話模型以 chat completion "
"格式回傳。因此模型輸出內容後需要進行許多適配工作。這些工作並不困難，但需要一些時間。編寫這部分程式碼時，請參考 `OpenAI 的 API 文件 "
"<https://platform.openai.com/docs/introduction>`_ 和各個推理後端的文件，進行必要的適配。"

#: ../../source/development/xinference_internals.rst:185
msgid "JSON"
msgstr ""

#: ../../source/development/xinference_internals.rst:187
msgid ""
"In `model/llm/llm_family.json "
"<https://github.com/xorbitsai/inference/blob/main/xinference/model/llm/llm_family.json>`_,"
" we utilize JSON files to manage the metadata of emerging open-source "
"models. Adding a new model does not necessitate writing new code, it merely "
"requires appending new metadata to the existing JSON file."
msgstr ""
"在 `model/llm/llm_family.json "
"<https://github.com/xorbitsai/inference/blob/main/xinference/model/llm/llm_family.json>`_"
" 中，我們利用 JSON 檔案來管理新出現的開源模型的元資料。新增一個模型並不需要編寫新程式碼，只需要將新的元資料添加到現有的 JSON 檔案中即可。"

#: ../../source/development/xinference_internals.rst:214
msgid ""
"This is an example of how to define the Llama-2 chat model. The "
"``model_specs`` define the information of the model, as one model family "
"usually comes with various sizes, quantization methods, and file formats. "
"For instance, the ``model_format`` could be ``pytorch`` (using Hugging Face "
"Transformers or vLLM as backend), ``ggmlv3`` (a tensor library associated "
"with llama.cpp), or ``gptq`` (a post-training quantization framework). The "
"``model_id`` defines the repository of the model hub from which Xinference "
"downloads the checkpoint files. Furthermore, due to distinct instruction-"
"tuning processes, different model families have varying prompt styles. The "
"``prompt_style`` in the JSON file specifies how to format prompts for this "
"particular model. For example, ``system_prompt`` and ``roles`` are used to "
"specify the instructions and personality of the model."
msgstr ""
"這是一個如何定義 Llama-2 聊天模型的範例。``model_specs`` "
"定義了模型的資訊，因為一個模型系列通常有不同的尺寸、量化方法和檔案格式。例如，``model_format`` 可以是 ``pytorch`` （使用 "
"Hugging Face Transformers 或 vLLM 作為後端）、 ``ggmlv3`` （與 llama.cpp 相關的張量庫）或 "
"``gptq`` （訓練後量化框架）。``model_id`` 定義了模型中心的資源庫，Xinference "
"從模型中心下載檢查點檔案。此外，由於不同的指令調整過程，不同的模型系列有不同的提示風格。JSON 檔案中的 ``prompt_style`` "
"指定了該特定模型的提示格式。例如，``system_prompt`` 和 ``roles`` 用於指定模型的指令和個性。"

#: ../../source/development/xinference_internals.rst:224
msgid "Code Walkthrough"
msgstr "程式碼指南"

#: ../../source/development/xinference_internals.rst:226
msgid ""
"The main code is located in the `xinference/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference>`_:"
msgstr ""
"主要程式碼位於 `xinference/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference>`_："

#: ../../source/development/xinference_internals.rst:228
msgid ""
"`api/ <https://github.com/xorbitsai/inference/tree/main/xinference/api>`_: "
"`restful_api.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/api/restful_api.py>`_"
" is the core part that sets up and runs the RESTful APIs. It integrates an "
"authentication service (the specific code is located in `oauth2/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/api/oauth2>`_),"
" as some or all endpointsrequire user authentication."
msgstr ""
"`api/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/api>`_：`restful_api.py"
" "
"<https://github.com/xorbitsai/inference/tree/main/xinference/api/restful_api.py>`_"
" 是設定與執行 RESTful API 的核心部分。它整合了一項身份驗證服務（具體程式碼位於 `oauth2/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/api/oauth2>`_），因為部分或所有端口需要使用者身份驗證。"

#: ../../source/development/xinference_internals.rst:233
msgid ""
"`client/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/client>`_: This"
" is the client of Xinference."
msgstr ""
"`client/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/client>`_：這是 "
"Xinference 的客戶端。"

#: ../../source/development/xinference_internals.rst:235
msgid ""
"`oscar/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/client/oscar>`_"
" defines the Actor Client which acts as a client interface for interacting "
"with models deployed in a Xinference cluster."
msgstr ""
"`oscar/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/client/oscar>`_"
" 定義了 Actor 客戶端，這是一個客戶端介面，用於與 Xinference 中的模型進行互動。"

#: ../../source/development/xinference_internals.rst:238
msgid ""
"`restful/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/client/restful>`_"
" implements a RESTful client for interacting with a Xinference service."
msgstr ""
"`restful/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/client/restful>`_"
" 實作與 Xinference 服務互動的 RESTful 客戶端。"

#: ../../source/development/xinference_internals.rst:241
msgid ""
"`core/ <https://github.com/xorbitsai/inference/tree/main/xinference/core>`_:"
" This is the core part of Xinference."
msgstr ""
"`core/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core>`_：這是 "
"Xinference 的核心部分。"

#: ../../source/development/xinference_internals.rst:243
msgid ""
"`metrics.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/metrics.py>`_"
" and `resource.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/resource.py>`_"
" defines a set of tools for collecting and reporting metrics and the status "
"of node resources, including model throughput, latency, the usage of CPU and"
" GPU, memory usage, and more."
msgstr ""
"`metrics.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/metrics.py>`_"
" 和 `resource.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/resource.py>`_"
" 定義了一套用於收集和報告指標以及節點資源狀態的工具，包括模型吞吐量、延遲、CPU 和 GPU 使用率、記憶體使用率等。"

#: ../../source/development/xinference_internals.rst:248
msgid ""
"`image_interface.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/image_interface.py>`_"
" and `chat_interface.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/chat_interface.py>`_"
" implement `Gradio <https://github.com/gradio-app/gradio>`_ interfaces for "
"image and chat models, respectively. These interfaces allow users to "
"interact with models through a Web UI, such as generating images or engaging"
" in chat. They build user interfaces using the gradio package and "
"communicate with backend models through our RESTful APIs."
msgstr ""
"`image_interface.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/image_interface.py>`_"
" 和 `chat_interface.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/chat_interface.py>`_"
" 分別為圖像和聊天模型實作了 `Gradio <https://github.com/gradio-app/gradio>`_ "
"介面。這些介面允許使用者透過 Web 界面與模型進行互動，例如生成圖像或進行聊天。程式碼使用 Gradio 套件建構使用者界面，並透過我們的 "
"RESTful API 與後端模型通訊。"

#: ../../source/development/xinference_internals.rst:254
msgid ""
"`worker.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/worker.py>`_"
" and `supervisor.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/supervisor.py>`_"
" respectively define the logic for worker actors and supervisor actor. "
"Worker actors are responsible for carrying out specific model computation "
"tasks, while supervisor actors manage the lifecycle of worker nodes, "
"schedule tasks, and monitor system states."
msgstr ""
"`worker.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/worker.py>`_"
" 和 `supervisor.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/supervisor.py>`_"
" 分別定義了 worker actor 和 supervisor actor 的邏輯。worker actor 負責執行特定的模型計算任務，而 "
"supervisor actor 則管理 Worker 節點的生命週期和任務調度，並監控系統狀態。"

#: ../../source/development/xinference_internals.rst:259
msgid ""
"`status_guard.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/status_guard.py>`_"
" implements a status monitor to track the status of models (like creating, "
"updating, terminating, etc.). It allows querying status information of model"
" instances and managing these statuses based on the model's UID."
msgstr ""
"`status_guard.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/status_guard.py>`_"
" 實作了一個狀態監視器，用於追蹤模型的狀態（如建立、更新、終止等）。它允許根據模型的 UID 查詢模型實例的狀態資訊。"

#: ../../source/development/xinference_internals.rst:263
msgid ""
"`cache_tracker.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/cache_tracker.py>`_"
" defines a cache tracker for recording and managing cache status and "
"information of model versions. It supports recording cache locations and "
"statuses of model versions and querying model version information based on "
"model names."
msgstr ""
"`cache_tracker.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/cache_tracker.py>`_"
" 定義了一個快取追蹤器，用於記錄和管理快取狀態及模型版本資訊。它支援記錄快取位置與模型版本的狀態，並可依模型名稱查詢模型版本資訊。"

#: ../../source/development/xinference_internals.rst:267
msgid ""
"`event.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/event.py>`_"
" defines an event collector for gathering and reporting various runtime "
"events of models, such as information, warnings, and errors. `model.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/model.py>`_"
" defines a Model Actor, the core component for direct model interactions. "
"The Model Actor is responsible for executing model inference requests, "
"handling input and output data streams, and supports various types of model "
"operations."
msgstr ""
"`event.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/event.py>`_"
" 定義了一個事件收集器，用於收集和報告各種運行時模型的事件，例如資訊、警告和錯誤。`model.py "
"<https://github.com/xorbitsai/inference/tree/main/xinference/core/model.py>`_"
" 定義了一個模型 Actor，它是與模型直接互動的核心組件。模型 actor "
"負責執行模型推理請求、處理輸入和輸出資料流，並支援各種模型操作。這兩個部分都使用 `Xoscar "
"<https://github.com/xorbitsai/xoscar>`_ 來進行並發與分散式執行。"

#: ../../source/development/xinference_internals.rst:273
msgid ""
"`deploy/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/deploy>`_: It "
"provides a command-line interface (CLI) for interacting with the Xinference "
"framework, allowing users to perform operations by command line. See "
"`Command Line`_ for more information."
msgstr ""
"`deploy/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/deploy>`_：它提供了一個命令列界面（CLI），用於與"
" Xinference 框架進行互動，允許使用者透過命令列進行操作。更多資訊，請參見 `Command Line`_。"

#: ../../source/development/xinference_internals.rst:276
msgid ""
"`locale/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/locale>`_: It "
"supports multi-language localization. By simply adding and updating JSON "
"translation files, it becomes possible to support more languages, improving "
"user experience."
msgstr ""
"`locale/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/locale>`_：它支援多語言本地化。只需新增和更新"
" JSON 翻譯檔案，即可支援更多語言，改善使用者體驗。"

#: ../../source/development/xinference_internals.rst:279
msgid ""
"`model/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/model>`_: It "
"provides a structure for model descriptions, creation, and caching. See "
"`Model`_ for more information."
msgstr ""
"`model/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/model>`_：它為模型描述、建立和快取提供了一個框架。請參閱"
" `Model`_ 以取得更多資訊。"

#: ../../source/development/xinference_internals.rst:282
msgid ""
"`web/ui/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/web/ui>`_: The "
"js code of the frontend (Web UI)."
msgstr ""
"`web/ui/ "
"<https://github.com/xorbitsai/inference/tree/main/xinference/web/ui>`_：前端（使用者介面）的"
" JavaScript 程式碼。"

#~ msgid ""
#~ "Xinference supports different types of models including large language "
#~ "models (LLMs), image models, audio models, embedding models, etc"
#~ msgstr ""
#~ "Xinference 支援不同類型的模型，包括大型語言模型（LLM）、圖像模型、音訊模型、嵌入模型等。所有模型都在 `model/ "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model>`_ 中實現。以 "
#~ "`llm/ "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm>`_ "
#~ "為例，它專注於 LLM 的管理和實例化。它包括載入、設定和部署 LLM 的詳細實現，包括處理不同類型的量化和模型格式。在 `llm/ "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm>`_ "
#~ "中，它支援許多後端，如 `GGML "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm/ggml>`_、`PyTorch"
#~ " "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm/pytorch>`_、`SGLang"
#~ " "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm/sglang>`_"
#~ " 和 `vLLM "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm/vllm>`_。"

#~ msgid ""
#~ "Take `llm/ "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm>`_ "
#~ "for example, it focuses on the management and instantiation of LLMs. It "
#~ "includes detailed implementations for loading, configuring, and deploying "
#~ "LLMs, including handling different types of quantization and model formats. "
#~ "In `llm/ "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm>`_, "
#~ "it supports many backends such as `GGML "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm/ggml>`_,"
#~ " `PyTorch "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm/pytorch>`_,"
#~ " `SGLang "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm/sglang>`_"
#~ " and `vLLM "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm/vllm>`_."
#~ msgstr ""
#~ "所有模型都在 `model/ "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model>`_ 中實現。以 "
#~ "`llm/ "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm>`_ "
#~ "為例，它側重於 LLM 的管理和實例化。它包括加載、配置和部署 LLM 的詳細實現，包括處理不同類型的量化及模型格式。在 `llm/ "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm>`_ "
#~ "中，它支援許多後端，如 `GGML "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm/ggml>`_、`PyTorch"
#~ " "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm/pytorch>`_、`SGLang"
#~ " "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm/sglang>`_"
#~ " 和 `vLLM "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model/llm/vllm>`_。"

#~ msgid ""
#~ "All models are implemented in `model/ "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model>`_."
#~ msgstr ""
#~ "所有模型在 `model/ "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/model>`_ 中實現"

#~ msgid ""
#~ "In ``model/llm/``, it supports many backends such as GGML, PyTorch, and "
#~ "vLLM."
#~ msgstr "在 ``model/llm/`` 下，我們支援了許多後端，例如 GGML、PyTorch 和 vLLM。"

#~ msgid ""
#~ "`oscar/ "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/client/oscar>`_"
#~ " defines the Actor Client which acts as a client interface for interacting "
#~ "with models deployed in a server environment. It includes functionalities to"
#~ " register/unregister models, launch/terminate models, and interact with "
#~ "different types of models. This part heavily utilizes ``asyncio`` for "
#~ "asynchronous operations. See `Concurrency`_ for more information."
#~ msgstr ""
#~ "`oscar/ "
#~ "<https://github.com/xorbitsai/inference/tree/main/xinference/client/oscar>`_"
#~ " 定義了 Actor "
#~ "客戶端，這是一個客戶端介面，用於與部署在伺服器環境中的模型互動。它包含註冊/取消註冊模型、啟動/終止模型，以及與不同類型模型互動的功能。這部分主要使用 "
#~ "``asyncio`` 進行非同步操作。更多資訊，請參閱 `Concurrency`_。"

#~ msgid "Concurrency"
#~ msgstr "並發性"

#~ msgid ""
#~ "Both Xinference and Xoscar highly utilize coroutine programming of "
#~ "``asyncio``."
#~ msgstr "Xinference 和 Xoscar 都高度利用了 ``asyncio`` 進行協程程式設計。"
