Enable repitition_penalty setting for petals

This commit is contained in:
Webifi 2023-08-20 13:11:20 -05:00
parent cf0fa4d5fc
commit 70c2f5928a
2 changed files with 12 additions and 12 deletions

View File

@ -503,16 +503,16 @@ const chatSettingsList: ChatSetting[] = [
type: 'number', type: 'number',
hide: hideModelSetting hide: hideModelSetting
}, },
// { {
// key: 'repititionPenalty', key: 'repititionPenalty',
// name: 'Repitition Penalty', name: 'Repitition Penalty',
// title: 'Number between 1.0 and infinity. Penalize new tokens based on whether they appear in the text so far, increasing the model\'s likelihood to talk about new topics.', title: 'Number between 1.0 and infinity. Penalize new tokens based on whether they appear in the text so far, increasing the model\'s likelihood to talk about new topics.',
// min: 0, min: 0,
// max: 1000, max: 1000,
// step: 0.1, step: 0.1,
// type: 'number', type: 'number',
// hide: isNotPetals hide: hideModelSetting
// }, },
{ {
key: 'startSequence', key: 'startSequence',
name: 'Start Sequence', name: 'Start Sequence',

View File

@ -149,8 +149,8 @@ export const chatRequest = async (
stop_sequence: stopSequence, stop_sequence: stopSequence,
do_sample: 1, // enable top p and the like do_sample: 1, // enable top p and the like
temperature, temperature,
top_p: topP top_p: topP,
// repitition_penalty: chatSettings.repititionPenalty repitition_penalty: chatSettings.repititionPenalty
} as any } as any
if (stopSequencesC.length) petalsRequest.extra_stop_sequences = stopSequencesC if (stopSequencesC.length) petalsRequest.extra_stop_sequences = stopSequencesC
// Update token count // Update token count