You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started/initilize_ilab.md
+66-52Lines changed: 66 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,77 +6,91 @@ logo: images/ilab_dog.png
6
6
7
7
# 🏗️ Initialize `ilab`
8
8
9
-
1)Initialize `ilab` by running the following command:
9
+
### 🏗️ Initialize `ilab`
10
10
11
-
```shell
12
-
ilab config init
13
-
```
11
+
1. Initialize `ilab` by running the following command:
14
12
15
-
*Example output*
13
+
```shell
14
+
ilab config init
15
+
```
16
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
-
```
17
+
2. When prompted, clone the `https://github.com/instructlab/taxonomy.git` repository into the current directory by typing **enter**
22
18
23
-
2) When prompted by the interface, press **Enter** to add a new default `config.yaml` file.
19
+
**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.
24
20
25
-
3) When prompted, clone the `https://github.com/instructlab/taxonomy.git` repository into the current directory by typing **y**.
21
+
`ilab` will use the default configuration file unless otherwise specified. You can override this behavior with the `--config` parameter for any `ilab` command.
26
22
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.
23
+
3. 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 is used.
28
24
29
-
*Example output after initializing `ilab`*
25
+
*Example output of steps 1 - 3*
30
26
31
27
```shell
32
-
(venv) $ ilab config init
33
-
Welcome to InstructLab CLI. This guide will help you set up your environment.
Path to taxonomy repo [/Users/kellybrown/.local/share/instructlab/taxonomy]:
35
+
Path to your model [/Users/kellybrown/.cache/instructlab/models/merlinite-7b-lab-Q4_K_M.gguf]:
38
36
```
39
37
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.
38
+
You can download this model with `ilab model download` command as well.
43
39
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
Path to your model [/Users/USERNAME/Library/Caches/instructlab/models/merlinite-7b-lab-Q4_K_M.gguf]: <ENTER>
52
-
```
40
+
4. The InstructLab CLI auto-detects your hardware and select the exact system profile that matches your machine. System profiles populate the `config.yaml` file with the proper parameter values based on your detected GPU types and avaiible vRAM.
53
41
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.
42
+
*Example output of profile auto-detection*
55
43
56
44
```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!
We have detected the AMD CPU profile as an exact match for your system.
50
+
51
+
--------------------------------------------
52
+
Initialization completed successfully!
53
+
You're ready to start using `ilab`. Enjoy!
54
+
--------------------------------------------
55
+
```
56
+
57
+
5. If there is not an exact match for your system, you can manually select a system profile when prompted. There are various flags you can utilize with individual `ilab` commands that allow you to utilize your GPU if applicable.
58
+
59
+
*Example output of selecting a system profile*
60
+
61
+
```shell
62
+
Please choose a system profile to use.
63
+
System profiles apply to all parts of the config file and set hardware specific defaults for each command.
64
+
First, please select the hardware vendor your system falls into
65
+
[1] APPLE
66
+
[2] INTEL
67
+
[3] AMD
68
+
[4] NVIDIA
69
+
Enter the number of your choice [0]: 1
70
+
You selected: APPLE
71
+
Next, please select the specific hardware configuration that most closely matches your system.
72
+
[0] No system profile
73
+
[1] APPLE M1 ULTRA
74
+
[2] APPLE M1 MAX
75
+
[3] APPLE M2 MAX
76
+
[4] APPLE M2 ULTRA
77
+
[5] APPLE M2 PRO
78
+
[6] APPLE M2
79
+
[7] APPLE M3 MAX
80
+
[8] APPLE M3 PRO
81
+
[9] APPLE M3
82
+
Enter the number of your choice [hit enter for hardware defaults] [0]: 8
83
+
You selected: /Users/kellybrown/.local/share/instructlab/internal/system_profiles/apple/m3/m3_pro.yaml
84
+
85
+
--------------------------------------------
86
+
Initialization completed successfully!
87
+
You're ready to start using `ilab`. Enjoy!
88
+
--------------------------------------------
75
89
```
76
90
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!
91
+
The GPU profiles are listed by GPU type and number of GPUs present. 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
92
79
-
## `ilab` directory layout after initializing your system
93
+
###`ilab` directory layout after initializing your system
Copy file name to clipboardExpand all lines: docs/getting-started/linux_amd.md
+61-77Lines changed: 61 additions & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,17 +12,17 @@ logo: images/ilab_dog.png
12
12
These steps will pull down a premade `qna.yaml` so you can do a local build. Skip the `wget`, `mv`, and `ilab taxonomy diff` if you don't want to do this.
ilab model convert --model-dir checkpoints/instructlab-granite-7b-lab-mlx-q
36
36
ilab model serve --model-path instructlab-granite-7b-lab-trained/instructlab-granite-7b-lab-Q4_K_M.gguf
37
37
```
38
+
38
39
## Installing `ilab`
39
40
40
-
1) Create a new directory called `instructlab` to store the files the `ilab` CLI needs when running and `cd` into the directory by running the following command:
41
-
42
-
```shell
43
-
mkdir instructlab
44
-
cd instructlab
45
-
```
41
+
The following steps in this document use [Python venv](https://docs.python.org/3/library/venv.html) for virtual environments. However, if you use another tool such as [pyenv](https://github.com/pyenv/pyenv) or [Conda Miniforge](https://github.com/conda-forge/miniforge) for managing Python environments on your machine continue to use that tool instead. Otherwise, you may have issues with packages that are installed but not found in `venv`.
46
42
47
43
!!! note
48
-
The following steps in this document use [Python venv](https://docs.python.org/3/library/venv.html) for virtual environments. However, if you use another tool such as [pyenv](https://github.com/pyenv/pyenv) or [Conda Miniforge](https://github.com/conda-forge/miniforge) for managing Python environments on your machine continue to use that tool instead. Otherwise, you may have issues with packages that are installed but not found in `venv`.
44
+
⏳ `pip install` may take some time, depending on your internet connection. In case installation fails with error ``unsupported instruction `vpdpbusd'``, append `-C cmake.args="-DLLAMA_NATIVE=off"` to `pip install` command.
49
45
50
-
2) There are a few ways you can locally install the `ilab` CLI. Select your preferred installation method from the following instructions. You can then install `ilab` and activate your `venv` environment.
⏳ `pip install` may take some time, depending on your internet connection. In case installation fails with error ``unsupported instruction `vpdpbusd'``, append `-C cmake.args="-DLLAMA_NATIVE=off"` to `pip install` command.
62
+
On Fedora 40+, use `-DCMAKE_C_COMPILER=clang-17` and `-DCMAKE_CXX_COMPILER=clang++-17.`
54
63
55
-
3) Install with AMD ROCm
64
+
2) From your `venv` environment, verify `ilab` is installed correctly, by running the `ilab` command.
-v, --verbose Enable debug logging (repeat for even more verbosity)
85
+
--version Show the version and exit.
86
+
--help Show this message and exit.
87
+
88
+
Commands:
89
+
config Command Group for Interacting with the Config of InstructLab.
90
+
data Command Group for Interacting with the Data generated by...
91
+
model Command Group for Interacting with the Models in InstructLab.
92
+
system Command group for all system-related command calls
93
+
taxonomy Command Group for Interacting with the Taxonomy of InstructLab.
94
+
95
+
Aliases:
96
+
chat model chat
97
+
generate data generate
98
+
serve model serve
99
+
train model train
100
+
```
117
101
118
102
!!! important
119
103
Every `ilab` command needs to be run from within your Python virtual environment. You can enter the Python environment by running the `source venv/bin/activate` command.
0 commit comments