Commit 0b8e2db
runtime: configure system prompt via set_chat_template (clean Qwen3 markers, no forced think)
Lab test of inline-system-into-user-message showed the model
producing coherent narration prose ('Calling diag/summary to get
an overall picture') but NOT the <tool_call> XML the parsers
expect. The model fell out of structured-output mode because the
SYSTEM rules arrived as part of the user-role content rather than
in the canonical <|im_start|>system\\n... slot — the model's
training (174 examples with system in proper slot every time)
expects that slot to contain the rules.
Switching to rkllm_set_chat_template(handle, sys_wrapped, prefix,
postfix) with the canonical Qwen 3 markers (no forced <think>\\n
postfix — that broke generation on commit 609debc). The runtime
configures it as the model's session template; the model sees
SYSTEM in the proper slot and the trained patterns for XML output
activate.
c_char_p lifetime: byte buffers held in named locals
(sys_bytes / prefix_bytes / postfix_bytes) per the GC bug fixed in
commit dec8471.
55/55 tests pass.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 3e6448d commit 0b8e2db
1 file changed
Lines changed: 26 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1106 | 1106 | | |
1107 | 1107 | | |
1108 | 1108 | | |
1109 | | - | |
1110 | | - | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
1121 | | - | |
1122 | | - | |
1123 | | - | |
1124 | | - | |
1125 | | - | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
1126 | 1134 | | |
1127 | | - | |
| 1135 | + | |
1128 | 1136 | | |
1129 | 1137 | | |
1130 | 1138 | | |
| |||
0 commit comments