Skip to content

Commit 1e2431a

Browse files
authored
Merge pull request #34 from Kevsnz/prompt-fix
Added space in prompt for better infills and proper stop token
2 parents 75256d6 + 06eb07f commit 1e2431a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/prompts/processors/models.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function adaptPrompt(args: { format: ModelFormat, prefix: string, suffix:
1919
}
2020

2121
// Stable code FIM
22-
if (args.format === 'stable-code') {
22+
if (args.format === 'stable-code') {
2323
return {
2424
prompt: `<fim_prefix>${args.prefix}<fim_suffix>${args.suffix}<fim_middle>`,
2525
stop: [`<|endoftext|>`]
@@ -28,7 +28,7 @@ export function adaptPrompt(args: { format: ModelFormat, prefix: string, suffix:
2828

2929
// Codellama FIM
3030
return {
31-
prompt: `<PRE> ${args.prefix} <SUF>${args.suffix} <MID>`,
32-
stop: [`<PRE>`, `<SUF>`, `<MID>`, `<END>`]
31+
prompt: `<PRE> ${args.prefix} <SUF> ${args.suffix} <MID>`,
32+
stop: [`<END>`, `<EOD>`, `<EOT>`]
3333
};
3434
}

0 commit comments

Comments
 (0)