|
| 1 | +--- |
| 2 | +title: Initializing InstructLab |
| 3 | +description: Steps to initilize InsutrctLab on a local machine |
| 4 | +logo: images/ilab_dog.png |
| 5 | +--- |
| 6 | + |
| 7 | +# 🏗️ Initialize `ilab` |
| 8 | + |
| 9 | +1) Initialize `ilab` by running the following command: |
| 10 | + |
| 11 | +```shell |
| 12 | +ilab config init |
| 13 | +``` |
| 14 | + |
| 15 | +*Example output* |
| 16 | + |
| 17 | +```shell |
| 18 | +Welcome to InstructLab CLI. This guide will help you set up your environment. |
| 19 | +Please provide the following values to initiate the environment [press Enter for defaults]: |
| 20 | +Path to taxonomy repo [taxonomy]: <ENTER> |
| 21 | +``` |
| 22 | + |
| 23 | +2) When prompted by the interface, press **Enter** to add a new default `config.yaml` file. |
| 24 | + |
| 25 | +3) When prompted, clone the `https://github.com/instructlab/taxonomy.git` repository into the current directory by typing **y**. |
| 26 | + |
| 27 | + **Optional**: If you want to point to an existing local clone of the `taxonomy` repository, you can pass the path interactively or alternatively with the `--taxonomy-path` flag. |
| 28 | + |
| 29 | + *Example output after initializing `ilab`* |
| 30 | + |
| 31 | + ```shell |
| 32 | + (venv) $ ilab config init |
| 33 | + Welcome to InstructLab CLI. This guide will help you set up your environment. |
| 34 | + Please provide the following values to initiate the environment [press Enter for defaults]: |
| 35 | + Path to taxonomy repo [taxonomy]: <ENTER> |
| 36 | + `taxonomy` seems to not exists or is empty. Should I clone https://github.com/instructlab/taxonomy.git for you? [y/N]: y |
| 37 | + Cloning https://github.com/instructlab/taxonomy.git... |
| 38 | + ``` |
| 39 | + |
| 40 | + `ilab` will use the default configuration file unless otherwise specified. You can override this behavior with the `--config` parameter for any `ilab` command. |
| 41 | + |
| 42 | +4) When prompted, provide the path to your default model. Otherwise, the default of a quantized [Merlinite](https://huggingface.co/instructlab/merlinite-7b-lab-GGUF) model will be used - you can download this model with `ilab model download`. The following example output displays the paths of a Mac instance. |
| 43 | + |
| 44 | + ```shell |
| 45 | + (venv) $ ilab config init |
| 46 | + Welcome to InstructLab CLI. This guide will help you set up your environment. |
| 47 | + Please provide the following values to initiate the environment [press Enter for defaults]: |
| 48 | + Path to taxonomy repo [taxonomy]: <ENTER> |
| 49 | + `taxonomy` seems to not exists or is empty. Should I clone https://github.com/instructlab/taxonomy.git for you? [y/N]: y |
| 50 | + Cloning https://github.com/instructlab/taxonomy.git... |
| 51 | + Path to your model [/Users/USERNAME/Library/Caches/instructlab/models/merlinite-7b-lab-Q4_K_M.gguf]: <ENTER> |
| 52 | + ``` |
| 53 | + |
| 54 | +5) When prompted, please choose a train profile. Train profiles are GPU specific profiles that enable accelerated training behavior. **YOU ARE ON MacOS**, please choose `No Profile (CPU, Apple Metal, AMD ROCm)` by hitting Enter. There are various flags you can utilize with individual `ilab` commands that will allow you to utilize your GPU if applicable. The following example output uses the Linux paths. |
| 55 | + |
| 56 | + ```shell |
| 57 | + Welcome to InstructLab CLI. This guide will help you to setup your environment. |
| 58 | + Please provide the following values to initiate the environment [press Enter for defaults]: |
| 59 | + Path to taxonomy repo [/home/user/.local/share/instructlab/taxonomy]: |
| 60 | + Path to your model [/home/user/.cache/instructlab/models/merlinite-7b-lab-Q4_K_M.gguf]: |
| 61 | + Generating `/home/user/.config/instructlab/config.yaml` and `/home/user/.local/share/instructlab/internal/train_configuration/profiles`... |
| 62 | + Please choose a train profile to use. |
| 63 | + Train profiles assist with the complexity of configuring specific GPU hardware with the InstructLab Training library. |
| 64 | + You can still take advantage of hardware acceleration for training even if your hardware is not listed. |
| 65 | + [0] No profile (CPU, Apple Metal, AMD ROCm) |
| 66 | + [1] Nvidia A100/H100 x2 (A100_H100_x2.yaml) |
| 67 | + [2] Nvidia A100/H100 x4 (A100_H100_x4.yaml) |
| 68 | + [3] Nvidia A100/H100 x8 (A100_H100_x8.yaml) |
| 69 | + [4] Nvidia L40 x4 (L40_x4.yaml) |
| 70 | + [5] Nvidia L40 x8 (L40_x8.yaml) |
| 71 | + [6] Nvidia L4 x8 (L4_x8.yaml) |
| 72 | + Enter the number of your choice [hit enter for no profile] [0]: |
| 73 | + No profile selected - any hardware acceleration for training must be configured manually. |
| 74 | + Initialization completed successfully, you're ready to start using `ilab`. Enjoy! |
| 75 | + ``` |
| 76 | +
|
| 77 | + The GPU profiles are listed by GPU type and number. If you happen to have a GPU configuration with a similar amount of VRAM as any of the above profiles, feel free to try them out! |
| 78 | +
|
| 79 | +## `ilab` directory layout after initializing your system |
| 80 | +### Mac directory |
| 81 | +
|
| 82 | +After running `ilab config init` your directories will look like the following on a Mac system: |
| 83 | +
|
| 84 | +```shell |
| 85 | +├─ ~/Library/Application\ Support/instructlab/models/ (1) |
| 86 | +├─ ~/Library/Application\ Support/instructlab/datasets (2) |
| 87 | +├─ ~/Library/Application\ Support/instructlab/taxonomy (3) |
| 88 | +├─ ~/Library/Application\ Support/instructlab/checkpoints (4) |
| 89 | +``` |
| 90 | +
|
| 91 | + 1) `/Users/USERNAME/Library/Caches/instructlab/models/`: Contains all downloaded large language models, including the saved output of ones you generate with ilab. |
| 92 | + 2) `~/Library/Application\ Support/instructlab/datasets/`: Contains data output from the SDG phase, built on modifications to the taxonomy repository. |
| 93 | + 3) `~/Library/Application\ Support/instructlab/taxonomy/`: Contains the skill and knowledge data. |
| 94 | + 4) `~/Users/USERNAME/Library/Caches/instructlab/checkpoints/`: Contains the output of the training process |
| 95 | +
|
| 96 | + ### Linux directory |
| 97 | +
|
| 98 | +After running `ilab config init` your directories will look like the following on a Linux system: |
| 99 | +
|
| 100 | +```shell |
| 101 | +├─ ~/.cache/instructlab/models/ (1) |
| 102 | +├─ ~/.local/share/instructlab/datasets (2) |
| 103 | +├─ ~/.local/share/instructlab/taxonomy (3) |
| 104 | +├─ ~/.local/share/instructlab/checkpoints (4) |
| 105 | +``` |
| 106 | +
|
| 107 | +1) `~/.cache/instructlab/models/`: Contains all downloaded large language models, including the saved output of ones you generate with ilab. |
| 108 | +2) `~/.local/share/instructlab/datasets/`: Contains data output from the SDG phase, built on modifications to the taxonomy repository. |
| 109 | +3) `~/.local/share/instructlab/taxonomy/`: Contains the skill and knowledge data. |
| 110 | +4) `~/.local/share/instructlab/checkpoints/`: Contains the output of the training process |
0 commit comments