Skip to content

Commit 47374a0

Browse files
authored
Merge pull request #36 from jbusche/jbusche-granite4
Removing all granite3 references
2 parents 90974cc + 5d29332 commit 47374a0

File tree

6 files changed

+10
-22
lines changed

6 files changed

+10
-22
lines changed

docs/lab-1.5/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ First, if you haven't already, download the Granite 4 model. Make sure that `oll
1313
```bash
1414
ollama pull granite4:micro
1515
```
16-
!!! note
17-
If the granite4:micro model isn't available yet, you can choose granite3.3:2b or granite3.3:8b
1816

1917
!!! note
2018
The download may take a few minutes depending on your internet connection. In the meantime, you can check out information about model we're using [here](https://ollama.com/library/granite4). Check out how many languages it supports and take note of its capabilities. It'll help you decide what tasks you might want to use it for in the future.

docs/lab-1/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ First, if you haven't already, download the Granite 4 model. Make sure that `oll
1313
```bash
1414
ollama pull granite4:micro
1515
```
16-
!!! note
17-
If the granite4:micro model isn't available yet, you can choose granite3.3:2b or granite3.3:8b
1816

1917
!!! note
20-
The download may take a few minutes depending on your internet connection. In the meantime, you can check out information about model we're using [here](https://ollama.com/library/granite3.3). Check out how many languages it supports and take note of its capabilities. It'll help you decide what tasks you might want to use it for in the future.
18+
The download may take a few minutes depending on your internet connection. In the meantime, you can check out information about model we're using [here](https://ollama.com/library/granite4). Check out how many languages it supports and take note of its capabilities. It'll help you decide what tasks you might want to use it for in the future.
2119

2220
Open the AnythingLLM desktop application and either click on the *Get Started* button or open up settings (the 🔧 button). For now, we are going to configure the global settings for `ollama` but you can always change it in the future.
2321

docs/lab-2/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ And you'll see a list similar to the following:
3333
```
3434
ollama list
3535
NAME ID SIZE MODIFIED
36-
granite3.3:2b 07bd1f170855 1.5 GB About a minute ago
37-
granite3.3:8b fd429f23b909 4.9 GB 2 minutes ago
38-
granite4:micro b99795f77687 2.1 GB 23 hours ago
36+
granite4:micro 4235724a127c 2.1 GB 23 hours ago
3937
```
4038
Next, use Ollama to run one of the models:
4139

docs/lab-5/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ model downloaded in `ollama`. This may take a bit, but we should have a way to c
1818
```bash
1919
ollama pull granite4:micro
2020
```
21-
!!! note
22-
If the granite4:micro model isn't available yet, you can use granite3.3:2b or granite3.3:8b
2321

2422
If you didn't know, the supported languages with `granite4` now include:
2523

docs/lab-6/README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,19 @@ Open up [Open-WebUI](http://localhost:8080/), and you should see something like
2121
If you see this that means Open-WebUI is installed correctly, and we can continue configuration, if not, please find a workshop TA or
2222
raise your hand we'll be there to help you ASAP.
2323

24-
Next as a sanity check, run the following command to confirm you have the [granite3.3:2b](https://ollama.com/library/granite3.3:2b)
24+
Next as a sanity check, run the following command to confirm you have the [granite4:micro](https://ollama.com/library/granite4:micro)
2525
model downloaded in `ollama`. This may take a bit, but we should have a way to copy it directly on your laptop.
2626

2727
```bash
28-
ollama pull granite3.3:2b
28+
ollama pull granite4:micro
2929
```
3030

31-
If you didn't know, the supported languages with `granite3.3:2b` now include:
31+
If you didn't know, the supported languages with `granite4:micro` now include:
3232

3333
- English, German, Spanish, French, Japanese, Portuguese, Arabic, Czech, Italian, Korean, Dutch, and Chinese. However, users may fine-tune this Granite model for languages beyond these 12 languages.
3434

3535
And the Capabilities also include:
3636

37-
- Thinking
3837
- Summarization
3938
- Text classification
4039
- Text extraction
@@ -43,11 +42,10 @@ And the Capabilities also include:
4342
- Code related tasks
4443
- Function-calling tasks
4544
- Multilingual dialog use cases
46-
- Fill-in-the-middle
47-
- Long-context tasks including long document/meeting summarization, long document QA, etc.
45+
- Fill-In-the-Middle (FIM) code completions
4846

4947

50-
Next click on the down arrow at the top and select the "granite3.3:2b" if it's not already selected.
48+
Next click on the down arrow at the top and select the "granite4:micro" if it's not already selected.
5149

5250
![model selection](../images/openwebui_model_selection.png)
5351

@@ -58,9 +56,7 @@ List all the past and current CEOs of the IBM corporation in order of their term
5856
For example:
5957
![Small LLM CEO list](../images/small_llm_ceo_list.png)
6058

61-
At first glance, the list looks pretty good. But if you know your IBM CEOs, you'll notice that it misses a few of them, and sometimes adds new names that weren't ever IBM CEOs!
62-
(Note: the larger granite3.3:8b does a much better job on the IBM CEOs, you can try it later)
63-
But we can provide the small LLM with a RAG document that supplements the model's missing information with a correct list, so it will generate a better answer.
59+
At first glance, the list looks pretty good. But if you know your IBM CEOs, you'll notice that it misses a few of them, and sometimes adds new names that weren't ever IBM CEOs! Retrieval Augmented Generation (RAG) allows us to provide the small LLM with a RAG document that supplements the model's missing information with a correct list, so it will generate a better answer.
6460

6561
Click on the "New Chat" icon to clear the context. Then download a small text file with the correct list of IBM CEOs to your Downloads folder:
6662

docs/lab-7/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@ def write_email(m: mellea.MelleaSession, name: str, notes: str) -> str:
236236
return str(email_candidate.result)
237237
else:
238238
return email_candidate.sample_generations[0].value
239-
240-
239+
241240
m = mellea.start_session()
242241
print(
243242
write_email(
@@ -255,6 +254,7 @@ We create 3 requirements:
255254
- First requirement (r1) will be validated by LLM-as-a-judge on the output of the instruction. This is the default behavior.
256255
- Second requirement (r2) uses a function that takes the output of a sampling step and returns a boolean value indicating successful or unsuccessful validation. While the validation_fn parameter requires to run validation on the full session context, Mellea provides a wrapper for simpler validation functions (simple_validate(fn: Callable[[str], bool])) that take the output string and return a boolean as seen in this case.
257256
- Third requirement is a check(). Checks are only used for validation, not for generation. Checks aim to avoid the "do not think about B" effect that often primes models (and humans) to do the opposite and "think" about B.
257+
- We also demonstrate in the m = mellea.start_session() how you can specify a different Ollama model, in case you want to try something other than Mellea's ibm/granite4:micro default.
258258
259259
Run this in your local instance, and you'll see it working, and ideally no purple elephants! :)
260260

0 commit comments

Comments
 (0)