Skip to content

Commit

Permalink
Added space for better infills and proper stop token
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevsnz committed Feb 3, 2024
1 parent 9288c45 commit 06eb07f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/prompts/processors/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function adaptPrompt(args: { format: ModelFormat, prefix: string, suffix:
}

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

// Codellama FIM
return {
prompt: `<PRE> ${args.prefix} <SUF>${args.suffix} <MID>`,
stop: [`<PRE>`, `<SUF>`, `<MID>`, `<END>`]
prompt: `<PRE> ${args.prefix} <SUF> ${args.suffix} <MID>`,
stop: [`<END>`, `<EOD>`, `<EOT>`]
};
}

0 comments on commit 06eb07f

Please sign in to comment.