Skip to content

Commit e33b278

Browse files
authored
Reformat Getting started page on docs site (#6)
Signed-off-by: Kelly Brown <kelbrown@redhat.com>
1 parent 39448dd commit e33b278

File tree

9 files changed

+271
-461
lines changed

9 files changed

+271
-461
lines changed
File renamed without changes.
File renamed without changes.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Downloading LLMs
3+
description: Steps on how to download models using `ilab`
4+
logo: images/ilab_dog.png
5+
---
6+
7+
# 📥 Download the model
8+
9+
- Run the `ilab model download` command.
10+
11+
```shell
12+
ilab model download
13+
```
14+
15+
`ilab model download` downloads a compact pre-trained version of the [model](https://huggingface.co/instructlab/) (~4.4G) from HuggingFace:
16+
17+
```shell
18+
(venv) $ ilab model download
19+
Downloading model from Hugging Face: instructlab/merlinite-7b-lab-GGUF@main to /Users/USERNAME/Library/Caches/instructlab/models...
20+
...
21+
INFO 2024-08-01 15:05:48,464 huggingface_hub.file_download:1893: Download complete. Moving file to /Users/USERNAME/Library/Caches/instructlab/models/merlinite-7b-lab-Q4_K_M.gguf
22+
```
23+
24+
!!! note
25+
⏳ This command can take few minutes or immediately depending on your internet connection or model is cached. If you have issues connecting to Hugging Face, refer to the [Hugging Face discussion forum](https://discuss.huggingface.co/) for more details.
26+
27+
## Downloading an entire Hugging Face repository (Safetensors Model)
28+
29+
- Specify repository, and a Hugging Face token if necessary. For example:
30+
31+
```shell
32+
HF_TOKEN=<YOUR HUGGINGFACE TOKEN GOES HERE> ilab model download --repository=instructlab/granite-7b-lab
33+
```
34+
35+
These types of models are useful for GPU-enabled systems or anyone looking to serve a model using vLLM. InstructLab provides Safetensor versions of our Granite models on HuggingFace.
36+
37+
## Listing downloaded models
38+
39+
All downloaded models can be seen with the `ilab model list` command.
40+
41+
```shell
42+
ilab model list
43+
```
44+
45+
*Example output of `ilab model list` after `ilab model download`*
46+
47+
```shell
48+
(venv) $ ilab model list
49+
+------------------------------+---------------------+--------+
50+
| Model Name | Last Modified | Size |
51+
+------------------------------+---------------------+--------+
52+
| merlinite-7b-lab-Q4_K_M.gguf | 2024-08-01 15:05:48 | 4.1 GB |
53+
+------------------------------+---------------------+--------+
54+
```
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
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

Comments
 (0)