Skip to content

Commit c419a02

Browse files
authored
Replace all Replicate granite 3.0 with 3.1 (#397)
* Use granite 3.1 Signed-off-by: Ed Snible <[email protected]> * Additional usages and docs Signed-off-by: Ed Snible <[email protected]> * Default Granite 3.1 on every platform Signed-off-by: Ed Snible <[email protected]> --------- Signed-off-by: Ed Snible <[email protected]>
1 parent cbd89d6 commit c419a02

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+115
-84
lines changed

docs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ defs:
233233
parser: yaml
234234
text:
235235
- "\n${ CODE.source_code }\n"
236-
- model: replicate/ibm-granite/granite-3.0-8b-instruct
236+
- model: replicate/ibm-granite/granite-3.1-8b-instruct
237237
input:
238238
- |
239239
Here is some info about the location of the function in the repo.
@@ -298,7 +298,7 @@ defs:
298298
read: ./ground_truth.txt
299299
text:
300300
- "\n${ CODE.source_code }\n"
301-
- model: replicate/ibm-granite/granite-3.0-8b-instruct
301+
- model: replicate/ibm-granite/granite-3.1-8b-instruct
302302
def: EXPLANATION
303303
input: |
304304
Here is some info about the location of the function in the repo.
@@ -380,7 +380,7 @@ defs:
380380
TRUTH:
381381
read: ./ground_truth.txt
382382
text:
383-
- model: replicate/ibm-granite/granite-3.0-8b-instruct
383+
- model: replicate/ibm-granite/granite-3.1-8b-instruct
384384
def: EXPLANATION
385385
contribute: []
386386
input:

docs/tutorial.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Hello, world!
3636
--8<-- "./examples/tutorial/calling_llm.pdl"
3737
```
3838

39-
In this program ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/calling_llm.pdl)), the `text` starts with the word `"Hello\n"`, and we call a model (`replicate/ibm-granite/granite-3.0-8b-instruct`) with this as input prompt.
39+
In this program ([file](https://github.com/IBM/prompt-declaration-language//blob/main/examples/tutorial/calling_llm.pdl)), the `text` starts with the word `"Hello\n"`, and we call a model (`replicate/ibm-granite/granite-3.1-8b-instruct`) with this as input prompt.
4040
The model is passed a parameter `stop_sequences`.
4141

4242
A PDL program computes 2 data structures. The first is a JSON corresponding to the result of the overall program, obtained by aggregating the results of each block. This is what is printed by default when we run the interpreter. The second is a conversational background context, which is a list of role/content pairs, where we implicitly keep track of roles and content for the purpose of communicating with models that support chat APIs. The contents in the latter correspond to the results of each block. The conversational background context is what is used to make calls to LLMs via LiteLLM.
@@ -522,7 +522,7 @@ text:
522522
contribute: [context]
523523
- repeat:
524524
text:
525-
- model: replicate/ibm-granite/granite-3.0-8b-instruct
525+
- model: replicate/ibm-granite/granite-3.1-8b-instruct
526526
role: assistant
527527
- read:
528528
def: eval
@@ -553,7 +553,7 @@ The prompt that is actually submitted to the first model call (with query `What
553553
To change the template that is applied, you can specify it as a parameter of the model call:
554554

555555
```yaml
556-
model: replicate/ibm-granite/granite-3.0-8b-instruct
556+
model: replicate/ibm-granite/granite-3.1-8b-instruct
557557
parameters:
558558
roles:
559559
system:

examples/callback/repair_prompt.pdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ lastOf:
99
Please repair the code!
1010

1111
- def: raw_output
12-
model: replicate/ibm-granite/granite-3.0-8b-instruct
12+
model: replicate/ibm-granite/granite-3.1-8b-instruct
1313
parameters:
1414
#stop_sequences: "\n\n"
1515
temperature: 0

examples/chatbot/chatbot.pdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ text:
66
- repeat:
77
text:
88
# Send context to Granite model hosted at replicate.com
9-
- model: replicate/ibm-granite/granite-3.0-8b-instruct
9+
- model: replicate/ibm-granite/granite-3.1-8b-instruct
1010
# Allow the user to type 'yes', 'no', or anything else, storing
1111
# the input into a variable named `eval`. The input is also implicitly
1212
# added to the context.

examples/cldk/cldk-assistant.pdl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ text:
3636
- if: ${ query != 'quit'}
3737
then:
3838
text:
39-
- model: replicate/ibm-granite/granite-3.0-8b-instruct
39+
- model: replicate/ibm-granite/granite-3.1-8b-instruct
4040
def: PDL
4141
input: |
4242
Question: What are all the classes?
@@ -109,7 +109,7 @@ text:
109109
method = PDL_SESSION.cldk_state.get_method("org.ibm.App", "Foo(string)")
110110
result = method
111111
- "\n\nGenerate a summary of method Foo\n\n"
112-
- model: replicate/ibm-granite/granite-3.0-8b-instruct
112+
- model: replicate/ibm-granite/granite-3.1-8b-instruct
113113
```
114114

115115
Question: Generate a different comment for method Foo(string) in class org.ibm.App?
@@ -121,7 +121,7 @@ text:
121121
method = PDL_SESSION.cldk_state.get_method("org.ibm.App", "Foo(string)")
122122
result = method
123123
- "\n\nGenerate a different comment for method Foo(string)\n\n"
124-
- model: replicate/ibm-granite/granite-3.0-8b-instruct
124+
- model: replicate/ibm-granite/granite-3.1-8b-instruct
125125
```
126126

127127
If the query contains something about a field be sure to call a model.

examples/code/code-eval.pdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ text:
1212
- "\n${ CODE.source_code }\n"
1313
# Use replicate.com to invoke a Granite model with a prompt. Output AND
1414
# set the variable `EXPLANATION` to the output.
15-
- model: replicate/ibm-granite/granite-3.0-8b-instruct
15+
- model: replicate/ibm-granite/granite-3.1-8b-instruct
1616
def: EXPLANATION
1717
input: |
1818
Here is some info about the location of the function in the repo.

examples/code/code-json.pdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defs:
66
TRUTH:
77
read: ./ground_truth.txt
88
text:
9-
- model: replicate/ibm-granite/granite-3.0-8b-instruct
9+
- model: replicate/ibm-granite/granite-3.1-8b-instruct
1010
def: EXPLANATION
1111
contribute: []
1212
input:

examples/code/code.pdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ text:
88
# Output the `source_code:` of the YAML to the console
99
- "\n${ CODE.source_code }\n"
1010
# Use replicate.com to invoke a Granite model with a prompt
11-
- model: replicate/ibm-granite/granite-3.0-8b-instruct
11+
- model: replicate/ibm-granite/granite-3.1-8b-instruct
1212
input: |
1313
Here is some info about the location of the function in the repo.
1414
repo:

examples/demo/1-gen-data.pdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defs:
66
parser: yaml
77
spec: { questions: [str], answers: [obj] }
88
text:
9-
- model: replicate/ibm-granite/granite-3.0-8b-instruct
9+
- model: replicate/ibm-granite/granite-3.1-8b-instruct
1010
def: model_output
1111
spec: {name: str, age: int}
1212
input:

examples/demo/2-teacher.pdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
defs:
22
teacher_sys_prompt: You are a very knowledgeable AI Assistant that will faithfully assist the user with their task.
3-
teacher_model: replicate/ibm-granite/granite-3.0-8b-instruct
3+
teacher_model: replicate/ibm-granite/granite-3.1-8b-instruct
44
teacher_template:
55
function:
66
sys_prompt: str

0 commit comments

Comments
 (0)