Skip to content

Commit 6e1fb4f

Browse files
committed
Updates for Sep 25
Cleanup up some formatting and noticed missing Granite info. Signed-off-by: JJ Asghar <[email protected]>
1 parent 7ded0fb commit 6e1fb4f

File tree

5 files changed

+34
-479
lines changed

5 files changed

+34
-479
lines changed

docs/lab-2/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ take a look at the next screen shot:
160160

161161
![comment_code](../images/comment_code.png)
162162

163-
It does some amazing work for you code, and really finally, take a look at [this video](https://www.youtube.com/watch?v=V3Yq6w9QaxI) if you want a quick video of other neat https://continue.dev functions we didn't go over.
163+
It does some amazing work for you code, and really finally, take a look at [this video](https://www.youtube.com/watch?v=V3Yq6w9QaxI)
164+
if you want a quick video of other neat <https://continue.dev> functions we didn't go over.
164165

165166
On to the next lab!
166167

docs/lab-3/getting-started-ilab.md renamed to docs/lab-3/README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ it to have.
1616

1717
!!! warning
1818
If you are running on Windows, you should use WSL2 for this, but it _is unsupported_ but we will do our best to get you success if you run into any problems.
19+
**Note**: You will need to use something _other_ then `pip install 'instructlab[mps]'`, it depends on your GPU, and hardware. You'll need to do some homework
20+
here.
1921

2022
## tl;dr
2123

@@ -43,7 +45,8 @@ ilab model serve --model-path instructlab-granite-7b-lab-trained/instructlab-gra
4345

4446
### Install `ilab`
4547

46-
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:
48+
1) Open up `iTerm2` or `Terminal` (assuming you're on a Mac and we'll continue assuming this) and create a new directory called `instructlab` to store the files the `ilab`
49+
CLI needs when running and `cd` into the directory by running the following command:
4750

4851
```shell
4952
mkdir instructlab
@@ -249,10 +252,13 @@ After running `ilab config init` your directories will look like the following o
249252
├─ ~/Library/Application\ Support/instructlab/checkpoints (4)
250253
```
251254

252-
1) `/Users/USERNAME/Library/Caches/instructlab/models/`: Contains all downloaded large language models, including the saved output of ones you generate with ilab.
253-
2) `~/Library/Application\ Support/instructlab/datasets/`: Contains data output from the SDG phase, built on modifications to the taxonomy repository.
254-
3) `~/Library/Application\ Support/instructlab/taxonomy/`: Contains the skill and knowledge data.
255-
4) `~/Users/USERNAME/Library/Caches/instructlab/checkpoints/`: Contains the output of the training process
255+
1) `/Users/USERNAME/Library/Caches/instructlab/models/`: Contains all downloaded large language models, including the saved output of ones you generate with ilab.
256+
257+
2) `~/Library/Application\ Support/instructlab/datasets/`: Contains data output from the SDG phase, built on modifications to the taxonomy repository.
258+
259+
3) `~/Library/Application\ Support/instructlab/taxonomy/`: Contains the skill and knowledge data.
260+
261+
4) `~/Users/USERNAME/Library/Caches/instructlab/checkpoints/`: Contains the output of the training process
256262

257263
### 📥 Download the model
258264

@@ -311,13 +317,13 @@ ilab model list
311317
ilab model serve
312318
```
313319

314-
erve a non-default model (e.g. Mixtral-8x7B-Instruct-v0.1):
320+
Serve a non-default model (e.g. Mixtral-8x7B-Instruct-v0.1):
315321

316322
```shell
317323
ilab model serve --model-path models/mixtral-8x7b-instruct-v0.1.Q4_K_M.gguf
318324
```
319325

320-
nce the model is served and ready, you'll see the following output:
326+
Once the model is served and ready, you'll see the following output:
321327

322328
```shell
323329
(venv) $ ilab model serve
@@ -330,7 +336,10 @@ Press CTRL+C to shut down the server.
330336
!!! note
331337
If multiple `ilab` clients try to connect to the same InstructLab server at the same time, the 1st will connect to the server while the others will start their own temporary server. This will require additional resources on the host machine.
332338

333-
- Serve a non-default Safetensors model (e.g. granite-7b-lab). NOTE: this requires a GPU.
339+
- Serve a non-default Safetensors model (e.g. granite-7b-lab).
340+
341+
!!! tip
342+
`vllm` requires a GPU for the best success.
334343

335344
Ensure vllm is installed:
336345

@@ -384,3 +393,4 @@ Before you start adding new skills and knowledge to your model, you can check it
384393
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── elapsed 12.008 seconds ─╯
385394
```
386395
396+
Nice! Now that we have InstructLab set up correctly, and we're talking to the model, now lets fine tune it with Lab 4!

docs/lab-4/README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ ilab model chat
1414
/q
1515
```
1616

17+
18+
TODO: WE NEED TO PUT IN A BLURB ABOUT GRANITE HERE
19+
20+
1721
## Prepare to train your model
1822

1923
!!! note
@@ -310,7 +314,7 @@ After you've built a good knowledge submission like above, the `qna.yaml`, the `
310314
finally the hosted `.md` file, you need to tell the teacher model to build questions around
311315
your seeded ones. Lets do that now.
312316

313-
1. If you haven't yet, you'll need to pull down the default teacher model, this is done with this command:
317+
1) If you haven't yet, you'll need to pull down the default teacher model, this is done with this command:
314318

315319
```bash
316320
ilab model download
@@ -324,17 +328,18 @@ ilab serve --model-path models/merlinite-7b-lab-Q4_K_M.gguf
324328
# in another terminal
325329
ilab model chat
326330
```
331+
327332
After the model is working as expected, ie running "who is batman?" close out the `ilab serve` and `ilab model chat`.
328333

329-
2. Next we need to generate the data, this is done with the following command:
334+
2) Next we need to generate the data, this is done with the following command:
330335

331336
```bash
332337
ilab data generate
333338
```
334339

335340
This can take some time, take note of the time in the right hand corner, this is building 1000 questions off of your initial 15.
336341

337-
3. After this is complete, now we'll need to train the actual model. If this isn't a Mac M3, this will take **at least an hour**, so
342+
3) After this is complete, now we'll need to train the actual model. If this isn't a Mac M3, this will take **at least an hour**, so
338343
hopefully you can take a lunch break or something while this is running.
339344

340345
```bash
@@ -343,12 +348,13 @@ ilab model train --model-dir instructlab/granite-7b-lab --tokenizer-dir models/g
343348

344349
This takes the granite model, leverages the tokenized version of it, and runs the SDG from the `generate` command against it.
345350

346-
4. When this is completed, you'll need to test this model, which is the following command:
351+
4) When this is completed, you'll need to test this model, which is the following command:
352+
347353
```bash
348354
ilab model test --model-dir instructlab-granite-7b-lab-mlx-q
349355
```
350356

351-
5. Now to run the command on the Mac M3, or Apple hardware you'll need to convert it to a `gguf`, that is this next command.
357+
5) Now to run the command on the Mac M3, or Apple hardware you'll need to convert it to a `gguf`, that is this next command.
352358

353359
!!! note
354360
You won't need to do this if you are running on Linux (or maybe Windows remember that's unsupported at the moment)
@@ -357,7 +363,7 @@ ilab model test --model-dir instructlab-granite-7b-lab-mlx-q
357363
ilab model convert --model-dir instructlab-granite-7b-lab-mlx-q
358364
```
359365

360-
6. Finally run the new model with `ilab model serve`.
366+
6) Finally run the new model with `ilab model serve`.
361367

362368
```bash
363369
ilab model serve --model-path instructlab-granite-7b-lab-trained/instructlab-granite-7b-lab-Q4_K_M.gguf
@@ -371,5 +377,4 @@ though your submission is great for the upstream model, and extremely valuable t
371377
When the full run from the upstream happens, the PR you submit with the new (or corrected) knowledge will be "baked in" better then the quantization
372378
method you use here, which will give much higher percentage of retrieval.
373379

374-
375380
<img src="https://count.asgharlabs.io/count?p=/lab4_opensource_ai_page>

0 commit comments

Comments
 (0)