CLI 参考指南


Red Hat Enterprise Linux AI 1.5

RHEL AI 命令行界面(CLI)参考

Red Hat RHEL AI Documentation Team

摘要

本文档提供了有关 RHEL AI 中使用的 CLI 命令的引用。

本参考提供了 Red Hat Enterprise Linux AI CLI (ilab)命令的描述和示例。

1.1. Red Hat Enterprise Linux AI CLI 命令

1.1.1. ilab config

与 InstructLab 配置交互的命令组

用法示例

# Prints the usable commands in the config group
ilab config
Copy to Clipboard Toggle word wrap

1.1.1.1. ilab config init

为 InstructLab 初始化环境

用法示例

# Set up the InstructLab environment
ilab config init
Copy to Clipboard Toggle word wrap

1.1.1.2. ilab config show

显示存储在 ~/.config/instructlab/config.yaml的配置文件的当前状态

用法示例

# Shows the `config.yaml` file on your system
ilab config show
Copy to Clipboard Toggle word wrap

1.1.1.3. ilab config edit

您可以编辑存储在 ~/.config/config.yaml中的配置

用法示例

# Opens a vim shell where you can edit your config file
ilab config edit
Copy to Clipboard Toggle word wrap

1.1.2. ilab data

用于与 InstructLab 生成的数据交互的命令组

用法示例

# Prints the usable commands in the data group
ilab data
Copy to Clipboard Toggle word wrap

1.1.2.1. ilab data generate

为 InstructLab 运行复合数据生成(SDG)进程

用法示例

# Runs the SDG process on the default model, the default model is specified in the `~/.config/config.yaml`
ilab data generate

# Runs the SDG process on a selected model
ilab data generate --model <model-name>

# Runs the SDG process on the customized taxonomy path
ilab data generate --taxonomy-path <path-to-taxonomy>

# Edits the `config.yaml` to use a specified number of GPUs in SDG
ilab data generate --gpus <num-gpus>
Copy to Clipboard Toggle word wrap

1.1.2.2. ilab 数据列表

在您的计算机上显示 datasets 目录中每个数据集 ' ~/.local/instructlab/datasets'

用法示例

# List every dataset in the datasets directory
ilab data list
Copy to Clipboard Toggle word wrap

1.1.3. ilab 模型

用于与 InstructLab 中模型交互的命令组

用法示例

# Prints the usable commands in the model group
ilab model
Copy to Clipboard Toggle word wrap

1.1.3.1. ilab model chat

使用修改后的模型运行聊天

用法示例

# Creates a virtual environment to chat with the model
ilab model chat

# Creates a virtual environment to chat with a specified model
ilab model chat --model <model-name>
Copy to Clipboard Toggle word wrap

1.1.3.2. ilab 模型下载

下载模型

用法示例

# Downloads the default models
ilab model download

# Downloads the models from a specific repository
ilab model download --repository <name-of-repository>
Copy to Clipboard Toggle word wrap

1.1.3.3. ilab 模型评估

对模型运行评估过程

用法示例

# Runs the evaluation process on the MMLU benchmark
ilab model evaluate --benchmark mmlu

# Runs the evaluation process on the MT_BENCH benchmark
ilab model evaluate --benchmark mt_bench

# Runs the evaluation process on the MMLU_BRANCH benchmark
ilab model evaluate --benchmark mmlu_branch

# Runs the evaluation process on the MT_BENCH_BRANCH benchmark
ilab model evaluate --benchmark mt_bench_branch
Copy to Clipboard Toggle word wrap

1.1.3.4. ilab 模型列表

列出系统上安装的所有模型

用法示例

* List all the installed models
ilab model list
Copy to Clipboard Toggle word wrap

1.1.3.5. ilab 模式培训

在模型上运行培训流程

用法示例

# Runs the training process on the default model from the config.yaml
ilab model train

# Runs the training process on a specified model
ilab model train --model-name <name-of-model>
Copy to Clipboard Toggle word wrap

1.1.3.6. ilab 模型服务

在端点上提供模型

用法示例

# Serves the default model to the server
ilab model serve

# Serves the specified model to the server
ilab model serve --model-path <path-to-model>

# Serves the default model using a specified number of GPUs
ilab model serve --gpus <num-gpus>
Copy to Clipboard Toggle word wrap

1.1.4. ilab 系统

所有系统相关命令的命令组

用法示例

# Prints the usable commands in the system group
ilab system
Copy to Clipboard Toggle word wrap

1.1.4.1. ilab 系统信息

显示您的系统的硬件规格

用法示例

#Prints the hardware specifications of your machine
ilab system info
Copy to Clipboard Toggle word wrap

1.1.5. ilab taxonomy

用于与 InstructLab 的 taxonomy 路径交互的命令组

用法示例

# Prints the usable commands in the taxonomy group
ilab taxonomy
Copy to Clipboard Toggle word wrap

1.1.5.1. ilab taxonomy diff

列出您更改的 taxonomy 文件,并验证 taxonomy 是否有效

用法示例

# Prints the taxonomy files you changed and verifies that the taxonomy is valid
ilab taxonomy diff

# Prints the taxonomy files in a specified path and verifies that the taxonomy is valid
ilab taxonomy diff --taxonomy-path <path-to-taxonomy>
Copy to Clipboard Toggle word wrap

法律通告

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部