File tree Expand file tree Collapse file tree 13 files changed +51
-54
lines changed Expand file tree Collapse file tree 13 files changed +51
-54
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ lastOf:
1111- def: raw_output
1212 model: ollama_chat/granite3.2:2b
1313 parameters:
14- #stop_sequences: "\n\n"
1514 temperature: 0
1615
1716- lang: python
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ text:
130130
131131
132132 parameters:
133- stop_sequences: "Question"
133+ stop: [ "Question"]
134134 temperature: 0
135135 - "\n\n***Executing the above PDL code:\n\n"
136136 - lang: python
Original file line number Diff line number Diff line change 6868 input: ${teacher_input}
6969 parameters:
7070 temperature: 0
71- stop_sequences: "${teacher_stop_token}"
71+ stop: [ "${teacher_stop_token}"]
7272 max_new_tokens: ${prompt_data.max_new_tokens}
7373 parser:
7474 regex: '### Question [0-9]+:\s*([^#\n]+)'
@@ -156,7 +156,7 @@ defs:
156156 model: ${teacher_model}
157157 input: ${teacher_input}
158158 parameters:
159- stop_sequences: "${teacher_stop_token}"
159+ stop: [ "${teacher_stop_token}"]
160160 max_new_tokens: ${prompt_data.max_new_tokens}
161161 temperature: 0
162162 parser:
@@ -252,7 +252,7 @@ defs:
252252 model: ${teacher_model}
253253 input: ${teacher_input}
254254 parameters:
255- stop_sequences: ${ ([teacher_stop_token] + prompt_data.additional_stop_tokens) | join(',') }
255+ stop: [" ${ ([teacher_stop_token] + prompt_data.additional_stop_tokens) | join(',') }"]
256256 max_new_tokens: ${prompt_data.max_new_tokens}
257257 temperature: 0
258258 parsed_answer:
@@ -339,7 +339,7 @@ defs:
339339 model: ${teacher_model}
340340 input: ${teacher_input}
341341 parameters:
342- stop_sequences: "${teacher_stop_token}"
342+ stop: [ "${teacher_stop_token}"]
343343 max_new_tokens: ${prompt_data.max_new_tokens}
344344 temperature: 0
345345 parser:
Original file line number Diff line number Diff line change 347347 },
348348 {
349349 "cell_type" : " code" ,
350- "execution_count" : 3 ,
350+ "execution_count" : null ,
351351 "id" : " dfef7096-b7a6-4966-8356-a306e701974b" ,
352352 "metadata" : {
353353 "scrolled" : true
395395 " - def: thought\n " ,
396396 " model: replicate/ibm-granite/granite-3.1-8b-instruct\n " ,
397397 " parameters:\n " ,
398- " stop_sequences: \" Act:\"\n " ,
398+ " stop: [ \" Act:\" ] \n " ,
399399 " temperature: 0\n " ,
400400 " - def: rawAction\n " ,
401401 " model: replicate/ibm-granite/granite-3.1-8b-instruct\n " ,
402402 " parameters:\n " ,
403- " stop_sequences: \"\\ n\"\n " ,
403+ " stop: [ \"\\ n\" ] \n " ,
404404 " temperature: 0\n " ,
405405 " - def: action\n " ,
406406 " lang: python\n " ,
Original file line number Diff line number Diff line change 1212 },
1313 {
1414 "cell_type" : " code" ,
15- "execution_count" : 4 ,
15+ "execution_count" : null ,
1616 "id" : " f3c62df1-0347-4711-acd7-3892cfd5df30" ,
1717 "metadata" : {},
1818 "outputs" : [
3232 " - \" Hello\\ n\"\n " ,
3333 " - model: \" replicate/ibm-granite/granite-3.1-8b-instruct\"\n " ,
3434 " parameters:\n " ,
35- " stop_sequences: \" !\"\n " ,
35+ " stop: [ \" !\" ] \n " ,
3636 " "
3737 ]
3838 },
Original file line number Diff line number Diff line change 1212 },
1313 {
1414 "cell_type" : " code" ,
15- "execution_count" : 2 ,
15+ "execution_count" : null ,
1616 "id" : " f3c62df1-0347-4711-acd7-3892cfd5df30" ,
1717 "metadata" : {},
1818 "outputs" : [
166166 " - Hello,\n " ,
167167 " - model: \" replicate/ibm-granite/granite-3.1-8b-instruct\"\n " ,
168168 " parameters:\n " ,
169- " stop_sequences: \" !\" "
169+ " stop: [ \" !\" ] "
170170 ]
171171 },
172172 {
Original file line number Diff line number Diff line change 4646 },
4747 {
4848 "cell_type" : " code" ,
49- "execution_count" : 2 ,
49+ "execution_count" : null ,
5050 "id" : " f3c62df1-0347-4711-acd7-3892cfd5df30" ,
5151 "metadata" : {},
5252 "outputs" : [
7575 " - \" What is the meaning of life?\\ n\"\n " ,
7676 " - model: replicate/ibm-granite/granite-3.2-8b-instruct\n " ,
7777 " parameters:\n " ,
78- " stop_sequences: \" !\"\n " ,
78+ " stop: [ \" !\" ] \n " ,
7979 " include_stop_sequence: true"
8080 ]
8181 },
153153 ]
154154 },
155155 {
156- "name" : " stdin " ,
156+ "name" : " stdout " ,
157157 "output_type" : " stream" ,
158158 "text" : [
159159 " >>> What is APR?\n "
169169 ]
170170 },
171171 {
172- "name" : " stdin " ,
172+ "name" : " stdout " ,
173173 "output_type" : " stream" ,
174174 "text" : [
175175 " >>> say it like a poem\n "
200200 ]
201201 },
202202 {
203- "name" : " stdin " ,
203+ "name" : " stdout " ,
204204 "output_type" : " stream" ,
205205 "text" : [
206206 " >>> quit\n "
Original file line number Diff line number Diff line change 44 "text" : [
55 "Hello\n " ,
66 {
7- "model" : "ollama_chat/granite3.2:8b" ,
8- "parameters" : {"stop_sequences" : "!" },
7+ "model" : "ollama_chat/granite3.2:2b" ,
8+ "parameters" : {
9+ "stop" : ["!" ],
10+ },
911 },
1012 ]
1113}
Original file line number Diff line number Diff line change 66 text = [
77 "Hello\n " ,
88 LitellmModelBlock (
9- model = "ollama_chat/granite3.2:8b " ,
10- parameters = LitellmParameters (stop_sequences = "!" ), # pyright: ignore
9+ model = "ollama_chat/granite3.2:2b " ,
10+ parameters = LitellmParameters (stop = [ "!" ] ), # pyright: ignore
1111 ),
1212 ]
1313 )
Original file line number Diff line number Diff line change 33HELLO = """
44text:
55- "Hello\n "
6- - model: ollama_chat/granite3.2:8b
6+ - model: ollama_chat/granite3.2:2b
77 parameters:
8- stop_sequences: '!'
8+ stop: [ '!']
99"""
1010
1111
You can’t perform that action at this time.
0 commit comments