[WIP] Getting started with InstructLab on Apple Silicon Mac
Wew lad do i want to get started with AI. Ultimately, I would like to explore using AI to identify patterns and unlock insights in speech and social networks. I want to study the internet and everything that entails and I think the first project to put my mind to would be an AI model that understands what I’m calling “dialectic english”, a flavor who language whose Exoteric meanings (meaning on it’s face) mean something completely different from it’s intent (meaning behind the face)
I’m going to attempt to write this article as post with steps and context so that you the reader can have an easier time getting started Procedurally and Conceptually. I will be using
Before we begin: Knowledge vs Skill
In short, InstructLab is a tool that lets you take any model and train it for your own purposes. You create YAML files with context, questions and answers that are then used to train the model your choose on the topics you created taxonomies for. There are 2 kinds of taxonomies you can create for your project: Knowledge taxonomies and Skill taxonomies.
Grounded vs Not
When you see Grounded in the documentation, this means that the Knowledge or skill provides context for itself.
Skills
Skills are actions, they are performative. When you teach a model a skill, you’re teching it how to DO something. For the Purposes of InstructLab there are two kinds of skills you can contribute, Freeform Compositional and Grounded Compositional, which basically means compositional skills with and without context.
When you create a Freeform compositional skill, you’re essentially stacking a capability on top of the model’s existing knowledge. A knowledge already knows how to sleep, but it might not know how to speak like Yoda, so feed it examples of speaking like Yoda and it will “learn” to do so without needing to know Yoda is a functional character from the StarWars Franchies (RIP) and the implications of that.
When you create a grounded compositional skill, the models needs data that defines what it’s doing and how, where our freefrom compsitional skill only needs the how. Explaining one of the examples from the docs to myself, say you are trying to teach a model to generate a Sudoku. You have to “show” the model what a sudoku grid looks like, and how you play sudoku (explain the rules are) and then your model will be able to regurgitate that confluence of information to produce new sudoku puzzles.
Ungrounded Compositional Skill Example
version: 2
task_description: 'Teach the model how to rhyme.'
created_by: juliadenham
seed_examples:
- question: What are 5 words that rhyme with horn?
answer: warn, torn, born, thorn, and corn.
- question: What are 5 words that rhyme with cat?
answer: bat, gnat, rat, vat, and mat.
- question: What are 5 words that rhyme with poor?
answer: door, shore, core, bore, and tore.
- question: What are 5 words that rhyme with bank?
answer: tank, rank, prank, sank, and drank.
- question: What are 5 words that rhyme with bake?
answer: wake, lake, steak, make, and quake.
Grounded Compositional Skill Example
version: 2
task_description: |
This skill provides the ability to read a markdown-formatted table.
created_by: mairin # Use your GitHub username; only one creator supported
seed_examples:
- context: |
| **Breed** | **Size** | **Barking** | **Energy** |
|----------------|--------------|-------------|------------|
| Afghan Hound | 25-27 in | 3/5 | 4/5 |
| Labrador | 22.5-24.5 in | 3/5 | 5/5 |
| Cocker Spaniel | 14.5-15.5 in | 3/5 | 4/5 |
| Poodle (Toy) | <= 10 in | 4/5 | 4/5 |
question: |
Which breed has the most energy?
answer: |
The breed with the most energy is the Labrador.
- context: |
| **Name** | **Date** | **Color** | **Letter** | **Number** |
|----------|----------|-----------|------------|------------|
| George | Mar 5 | Green | A | 1 |
| Gráinne | Dec 31 | Red | B | 2 |
| Abigail | Jan 17 | Yellow | C | 3 |
| Bhavna | Apr 29 | Purple | D | 4 |
| Rémy | Sep 9 | Blue | E | 5 |
question: |
What is Gráinne's letter and what is her color?
answer: |
Gráinne's letter is B and her color is red.
- context: |
| Banana | Apple | Blueberry | Strawberry |
|--------|------------|-----------|------------|
| Yellow | Red, Green | Blue | Red |
| Large | Medium | Small | Small |
| Peel | Peel | No peel | No peel |
question: |
Which fruit is blue, small, and has no peel?
answer: |
The blueberry is blue, small, and has no peel.
Knowledge
So that’s Skills, but what about Knowledge? Well, knowledge is facts and data supported by Documents added to a model for the purposes of helping a model. more accurately answer questions.
Statement of Outcomes
Getting started with InstructLab
Install and Configure
Chat with a model
Manually download and consume a model
Creating Taxonomies
Training Your Model
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Archives
Calendar
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Leave a Reply