Skip to content

Commit 7e8d3fc

Browse files
authored
Fix rendering issue in getting sterted (#21)
Signed-off-by: Kelly Brown <kelbrown@redhat.com>
1 parent 85bc66e commit 7e8d3fc

File tree

6 files changed

+217
-441
lines changed

6 files changed

+217
-441
lines changed

docs/getting-started/download_models.md

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,46 @@ logo: images/ilab_dog.png
66

77
# 📥 Download the model
88

9-
- Run the `ilab model download` command.
9+
1) Run the ilab model download command to download a compact pre-trained version of the `granite-7b-lab-GGUF`, `merlinite-7b-lab-GGUF`, and `Mistral-7B-Instruct-v0.2-GGUF` models (~4.4G each) from HuggingFace.
1010

1111
```shell
1212
ilab model download
1313
```
1414

1515
`ilab model download` downloads a compact pre-trained version of the [model](https://huggingface.co/instructlab/) (~4.4G) from HuggingFace:
1616

17+
*Example output of the models downloading*
18+
19+
```shell
20+
Downloading model from Hugging Face:
21+
Model: instructlab/granite-7b-lab-GGUF@main
22+
Destination: /Users/<user>/.cache/instructlab/models
23+
Downloading model from Hugging Face:
24+
Model: instructlab/merlinite-7b-lab-GGUF@main
25+
Destination: /Users/<user>/.cache/instructlab/models
26+
Downloading model from Hugging Face:
27+
Model: TheBloke/Mistral-7B-Instruct-v0.2-GGUF@main
28+
Destination: /Users/<user>/.cache/instructlab/models
29+
30+
TheBloke/Mistral-7B-Instruct-v0.2-GGUF requires a HF Token to be set.
31+
Please use '--hf-token' or 'export HF_TOKEN' to download all necessary models.
32+
```
33+
34+
a) You may be prompted to use your Hugging Face token to download the `Mistral-7B-Instruct-v0.2-GGUF` model.
35+
1736
```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
37+
ilab model download --hf-token <your-huggingface-token>
2238
```
2339

2440
!!! note
2541
⏳ 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.
2642

2743
## Downloading an entire Hugging Face repository (Safetensors Model)
2844

29-
- Specify repository, and a Hugging Face token if necessary. For example:
45+
1) Specify repository, and a Hugging Face token if necessary. For example:
3046

3147
```shell
32-
HF_TOKEN=<YOUR HUGGINGFACE TOKEN GOES HERE> ilab model download --repository=instructlab/granite-7b-lab
48+
ilab model download --repository instructlab/granite-7b-lab-GGUF --filename granite-7b-lab-Q4_K_M.gguf --hf-token <your-huggingface-token>
3349
```
3450

3551
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.
@@ -46,9 +62,11 @@ ilab model list
4662

4763
```shell
4864
(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-
+------------------------------+---------------------+--------+
65+
+-------------------------------------+---------------------+--------+
66+
| Model Name | Last Modified | Size |
67+
+-------------------------------------+---------------------+--------+
68+
| granite-7b-lab-Q4_K_M.gguf | 2024-08-01 15:05:48 | 4.1 GB |
69+
| merlinite-7b-lab-Q4_K_M.gguf | 2024-08-01 15:05:48 | 4.1 GB |
70+
| mistral-7b-instruct-v0.2.Q4_K_M.gguf| 2024-08-01 15:05:48 | 4.1 GB |
71+
+-------------------------------------+---------------------+--------+
5472
```

docs/getting-started/initilize_ilab.md

Lines changed: 64 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -6,112 +6,88 @@ logo: images/ilab_dog.png
66

77
# 🏗️ Initialize `ilab`
88

9-
### 🏗️ Initialize `ilab`
9+
1) Initialize `ilab` by running the following command:
1010

11-
1. Initialize `ilab` by running the following command:
12-
13-
```shell
14-
ilab config init
15-
```
11+
```shell
12+
ilab config init
13+
```
1614

17-
2. When prompted, clone the `https://github.com/instructlab/taxonomy.git` repository into the current directory by typing **enter**
15+
2) When prompted, clone the `https://github.com/instructlab/taxonomy.git` repository into the current directory by typing **enter**
1816

1917
**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.
2018

2119
`ilab` will use the default configuration file unless otherwise specified. You can override this behavior with the `--config` parameter for any `ilab` command.
2220

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.
24-
25-
*Example output of steps 1 - 3*
26-
27-
```shell
28-
----------------------------------------------------
29-
Welcome to the InstructLab CLI
30-
This guide will help you to setup your environment
31-
----------------------------------------------------
32-
33-
Please provide the following values to initiate the environment [press Enter for defaults]:
34-
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]:
36-
```
37-
38-
You can download this model with `ilab model download` command as well.
39-
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.
41-
42-
*Example output of profile auto-detection*
43-
44-
```shell
45-
Generating config file and profiles:
46-
/home/user/.config/instructlab/config.yaml
47-
/home/user/.local/share/instructlab/internal/train_configuration/profiles
48-
49-
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-
--------------------------------------------
89-
```
21+
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.
9022

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!
23+
*Example output of steps 1 - 3*
24+
```shell
25+
----------------------------------------------------
26+
Welcome to the InstructLab CLI
27+
This guide will help you to setup your environment
28+
----------------------------------------------------
29+
30+
Please provide the following values to initiate the environment [press Enter for defaults]:
31+
Path to taxonomy repo [/Users/<user>/.local/share/instructlab/taxonomy]:
32+
Path to your model [/Users/<user>/.cache/instructlab/models/merlinite-7b-lab-Q4_K_M.gguf]:
33+
```
9234

93-
### `ilab` directory layout after initializing your system
35+
You can download this model with `ilab model download` command as well.
9436

95-
### Mac directory
37+
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.
9638

97-
After running `ilab config init` your directories will look like the following on a Mac system:
39+
*Example output of profile auto-detection*
9840

9941
```shell
100-
├─ ~/Library/Application\ Support/instructlab/models/ (1)
101-
├─ ~/Library/Application\ Support/instructlab/datasets (2)
102-
├─ ~/Library/Application\ Support/instructlab/taxonomy (3)
103-
├─ ~/Library/Application\ Support/instructlab/checkpoints (4)
104-
```
42+
Generating config file and profiles:
43+
/home/user/.config/instructlab/config.yaml
44+
/home/user/.local/share/instructlab/internal/train_configuration/profiles
10545

106-
1) `/Users/USERNAME/Library/Caches/instructlab/models/`: Contains all downloaded large language models, including the saved output of ones you generate with ilab.
46+
We have detected the AMD CPU profile as an exact match for your system.
10747

108-
2) `~/Library/Application\ Support/instructlab/datasets/`: Contains data output from the SDG phase, built on modifications to the taxonomy repository.
48+
--------------------------------------------
49+
Initialization completed successfully!
50+
You're ready to start using `ilab`. Enjoy!
51+
--------------------------------------------
52+
```
10953
110-
3) `~/Library/Application\ Support/instructlab/taxonomy/`: Contains the skill and knowledge data.
54+
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.
11155
112-
4) `~/Users/USERNAME/Library/Caches/instructlab/checkpoints/`: Contains the output of the training process
56+
*Example output of selecting a system profile*
11357
114-
### Linux directory
58+
```shell
59+
Please choose a system profile to use.
60+
System profiles apply to all parts of the config file and set hardware specific defaults for each command.
61+
First, please select the hardware vendor your system falls into
62+
[1] APPLE
63+
[2] INTEL
64+
[3] AMD
65+
[4] NVIDIA
66+
Enter the number of your choice [0]: 1
67+
You selected: APPLE
68+
Next, please select the specific hardware configuration that most closely matches your system.
69+
[0] No system profile
70+
[1] APPLE M1 ULTRA
71+
[2] APPLE M1 MAX
72+
[3] APPLE M2 MAX
73+
[4] APPLE M2 ULTRA
74+
[5] APPLE M2 PRO
75+
[6] APPLE M2
76+
[7] APPLE M3 MAX
77+
[8] APPLE M3 PRO
78+
[9] APPLE M3
79+
Enter the number of your choice [hit enter for hardware defaults] [0]: 8
80+
You selected: /Users/kellybrown/.local/share/instructlab/internal/system_profiles/apple/m3/m3_pro.yaml
81+
82+
--------------------------------------------
83+
Initialization completed successfully!
84+
You're ready to start using `ilab`. Enjoy!
85+
--------------------------------------------
86+
```
87+
88+
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!
89+
90+
### `ilab` directory layout after initializing your system
11591

11692
After running `ilab config init` your directories will look like the following on a Linux system:
11793

docs/getting-started/linux_amd.md

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -45,59 +45,59 @@ The following steps in this document use [Python venv](https://docs.python.org/3
4545

4646
1) Install with AMD ROCm
4747

48-
```bash
49-
python3 -m venv --upgrade-deps venv
50-
source venv/bin/activate
51-
pip cache remove llama_cpp_python
52-
pip install 'instructlab[rocm]' \
53-
--extra-index-url https://download.pytorch.org/whl/rocm6.0 \
54-
-C cmake.args="-DLLAMA_HIPBLAS=on" \
55-
-C cmake.args="-DAMDGPU_TARGETS=all" \
56-
-C cmake.args="-DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang" \
57-
-C cmake.args="-DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++" \
58-
-C cmake.args="-DCMAKE_PREFIX_PATH=/opt/rocm" \
59-
-C cmake.args="-DLLAMA_NATIVE=off"
60-
```
48+
```bash
49+
python3 -m venv --upgrade-deps venv
50+
source venv/bin/activate
51+
pip cache remove llama_cpp_python
52+
pip install 'instructlab[rocm]' \
53+
--extra-index-url https://download.pytorch.org/whl/rocm6.0 \
54+
-C cmake.args="-DLLAMA_HIPBLAS=on" \
55+
-C cmake.args="-DAMDGPU_TARGETS=all" \
56+
-C cmake.args="-DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang" \
57+
-C cmake.args="-DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++" \
58+
-C cmake.args="-DCMAKE_PREFIX_PATH=/opt/rocm" \
59+
-C cmake.args="-DLLAMA_NATIVE=off"
60+
```
6161

6262
On Fedora 40+, use `-DCMAKE_C_COMPILER=clang-17` and `-DCMAKE_CXX_COMPILER=clang++-17.`
6363

6464
2) From your `venv` environment, verify `ilab` is installed correctly, by running the `ilab` command.
6565

66-
```shell
67-
ilab
68-
```
66+
```shell
67+
ilab
68+
```
6969

70-
*Example output of the `ilab` command*
70+
*Example output of the `ilab` command*
7171

72-
```shell
73-
(venv) $ ilab
74-
Usage: ilab [OPTIONS] COMMAND [ARGS]...
72+
```shell
73+
(venv) $ ilab
74+
Usage: ilab [OPTIONS] COMMAND [ARGS]...
7575

76-
CLI for interacting with InstructLab.
76+
CLI for interacting with InstructLab.
7777

78-
If this is your first time running ilab, it's best to start with `ilab
79-
config init` to create the environment.
78+
If this is your first time running ilab, it's best to start with `ilab
79+
config init` to create the environment.
8080
81-
Options:
82-
--config PATH Path to a configuration file. [default:
81+
Options:
82+
--config PATH Path to a configuration file. [default:
8383
/Users/kellybrown/.config/instructlab/config.yaml]
84-
-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-
```
84+
-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+
```
101101
102102
!!! important
103103
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

Comments
 (0)