Skip to content

Commit d80916f

Browse files
authored
Streaming result by default, fixed examples for granite 3.1 (#428)
* Streaming result by default, fix examples for granite 3.1 Signed-off-by: Mandana Vaziri <[email protected]>
1 parent 4c8e5b3 commit d80916f

22 files changed

+212
-2996
lines changed

examples/demo/1-gen-data.pdl

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,21 @@ text:
1010
def: model_output
1111
spec: {name: str, age: int}
1212
input:
13-
text:
14-
- for:
15-
question: ${ data.questions }
16-
answer: ${ data.answers }
17-
repeat: |
18-
${ question }
19-
${ answer }
20-
- >
21-
Question: Create a JSON object with fields 'name' and 'age'
22-
and set them appropriately. Write the age in letters.
13+
array:
14+
- role: user
15+
content:
16+
text:
17+
- for:
18+
question: ${ data.questions }
19+
answer: ${ data.answers }
20+
repeat: |
21+
${ question }
22+
${ answer }
23+
- >
24+
Question: Generate only a JSON object with fields 'name' and 'age' and set them appropriately. Write the age all in letters. Only generate a single JSON object and nothing else.
2325
parser: yaml
2426
parameters:
25-
stop_sequences: "\n"
27+
stop_sequences: "Question"
2628
temperature: 0
2729

2830

examples/demo/data.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ questions:
55
Question: Write a YAML object with 3 fields 'number' and 'street' and 'town' set to '10', 'Miller Road', 'Armonk' respectively.
66
77
answers:
8-
- a: 0
9-
b: 0
8+
- { "a": 0, "b": 0 }
109

11-
- number: 10
12-
street: miller Road
13-
town: armonk
10+
- { "number": 10, "street": "miller Road", "town": "armonk" }

examples/gsm8k/README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/gsm8k/math.pdl

Lines changed: 0 additions & 86 deletions
This file was deleted.

examples/gsm8k/math_no_sd.pdl

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)