Enable repitition_penalty setting for petals
This commit is contained in:
parent
cf0fa4d5fc
commit
70c2f5928a
|
@ -503,16 +503,16 @@ const chatSettingsList: ChatSetting[] = [
|
|||
type: 'number',
|
||||
hide: hideModelSetting
|
||||
},
|
||||
// {
|
||||
// key: 'repititionPenalty',
|
||||
// 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.',
|
||||
// min: 0,
|
||||
// max: 1000,
|
||||
// step: 0.1,
|
||||
// type: 'number',
|
||||
// hide: isNotPetals
|
||||
// },
|
||||
{
|
||||
key: 'repititionPenalty',
|
||||
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.',
|
||||
min: 0,
|
||||
max: 1000,
|
||||
step: 0.1,
|
||||
type: 'number',
|
||||
hide: hideModelSetting
|
||||
},
|
||||
{
|
||||
key: 'startSequence',
|
||||
name: 'Start Sequence',
|
||||
|
|
|
@ -149,8 +149,8 @@ export const chatRequest = async (
|
|||
stop_sequence: stopSequence,
|
||||
do_sample: 1, // enable top p and the like
|
||||
temperature,
|
||||
top_p: topP
|
||||
// repitition_penalty: chatSettings.repititionPenalty
|
||||
top_p: topP,
|
||||
repitition_penalty: chatSettings.repititionPenalty
|
||||
} as any
|
||||
if (stopSequencesC.length) petalsRequest.extra_stop_sequences = stopSequencesC
|
||||
// Update token count
|
||||
|
|
Loading…
Reference in New Issue