このコンテンツは選択した言語では利用できません。

Chapter 2. Initializing InstructLab


You must initialize the InstructLab environments to begin working with the Red Hat Enterprise Linux AI models.

2.1. Creating your RHEL AI environment

You can start interacting with LLMs and the RHEL AI tooling by initializing the InstructLab environment.

Important

System profiles for AMD machines is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.

Prerequisites

  • You installed RHEL AI with the bootable container image.
  • You have root user access on your machine.

Procedure

  1. Optional: You can view your machine’s information by running the following command:

    $ ilab system info
  2. Initialize InstructLab by running the following command:

    $ ilab config init
  3. The RHEL AI CLI starts setting up your environment and config.yaml file. The CLI automatically detects your machine’s hardware and selects a system profile based on the GPU types. System profiles populate the config.yaml file with the proper parameter values based on your detected hardware.

    Example output of profile auto-detection

    Generating config file and profiles:
        /home/user/.config/instructlab/config.yaml
        /home/user/.local/share/instructlab/internal/system_profiles/
    
    We have detected the NVIDIA H100 X4 profile as an exact match for your system.
    
    --------------------------------------------
      Initialization completed successfully!
    You're ready to start using `ilab`. Enjoy!
    --------------------------------------------

  4. If the CLI does not detect an exact match for your system, you can manually select a system profile when prompted. Select your hardware vendor and configuration that matches your system.

    Example output of selecting system profiles

    Please choose a system profile to use.
    System profiles apply to all parts of the config file and set hardware specific defaults for each command.
    First, please select the hardware vendor your system falls into
    [0] NO SYSTEM PROFILE
    [1] NVIDIA
    Enter the number of your choice [0]: 4
    You selected: NVIDIA
    Next, please select the specific hardware configuration that most closely matches your system.
    [0] No system profile
    [1] NVIDIA H100 X2
    [2] NVIDIA H100 X8
    [3] NVIDIA H100 X4
    [4] NVIDIA L4 X8
    [5] NVIDIA A100 X2
    [6] NVIDIA A100 X8
    [7] NVIDIA A100 X4
    [8] NVIDIA L40S X4
    [9] NVIDIA L40S X8
    Enter the number of your choice [hit enter for hardware defaults] [0]: 3

    Example output of a completed ilab config init run.

    You selected: /Users/<user>/.local/share/instructlab/internal/system_profiles/nvidia/H100/h100_x4.yaml
    
    --------------------------------------------
        Initialization completed successfully!
      You're ready to start using `ilab`. Enjoy!
    --------------------------------------------

  5. If you want to use the skeleton taxonomy tree, which includes two skills and one knowledge qna.yaml file, you can clone the skeleton repository and place it in the taxonomy directory by running the following command:

    rm -rf ~/.local/share/instructlab/taxonomy/ ; git clone https://github.com/RedHatOfficial/rhelai-sample-taxonomy.git ~/.local/share/instructlab/taxonomy/
  6. If the incorrect system profile is auto-detected, you can run the following command:

    $ ilab config init --profile <path-to-system-profile>

    where

    <path-to-system-profile>

    Specify the path to the correct system profile. You can find the system profiles in the ~/.local/share/instructlab/internal/system_profiles path.

    Example profile selection command

    $ ilab config init --profile ~/.local/share/instructlab/internal/system_profiles/amd/mi300x/mi300x_x8.yaml

Directory structure of the InstructLab environment

├─ ~/.config/instructlab/config.yaml 1
├─ ~/.cache/instructlab/models/ 2
├─ ~/.local/share/instructlab/datasets 3
├─ ~/.local/share/instructlab/taxonomy 4
├─ ~/.local/share/instructlab/phased/<phase1-or-phase2>/checkpoints/ 5

1
~/.config/instructlab/config.yaml: Contains the config.yaml file.
2
~/.cache/instructlab/models/: Contains all downloaded large language models, including the saved output of ones you generate with RHEL AI.
3
~/.local/share/instructlab/datasets/: Contains data output from the SDG phase, built on modifications to the taxonomy repository.
4
~/.local/share/instructlab/taxonomy/: Contains the skill and knowledge data.
5
~/.local/share/instructlab/phased/<phase1-or-phase2>/checkpoints/: Contains the output of the multi-phase training process

Verification

  1. You can view the full config.yaml file by running the following command

    $ ilab config show
  2. You can also manually edit the config.yaml file by running the following command:

    $ ilab config edit
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.