Add min_new_tokens flag
This commit is contained in:
		
							parent
							
								
									411d458549
								
							
						
					
					
						commit
						a361f110ec
					
				| @ -7,6 +7,7 @@ import 'dotenv/config'; | |||||||
| const config = { | const config = { | ||||||
|     llmSettings: { |     llmSettings: { | ||||||
|         max_new_tokens: 128, |         max_new_tokens: 128, | ||||||
|  |         min_new_tokens: 1, | ||||||
|         temperature: 0.9, |         temperature: 0.9, | ||||||
|         repetition_penalty: 1.5, |         repetition_penalty: 1.5, | ||||||
| 	    msg_context: 8 | 	    msg_context: 8 | ||||||
| @ -22,6 +23,7 @@ async function configCommand(interaction: ChatInputCommandInteraction) | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     config.llmSettings.max_new_tokens = interaction.options.getInteger('max_new_tokens') ?? config.llmSettings.max_new_tokens; |     config.llmSettings.max_new_tokens = interaction.options.getInteger('max_new_tokens') ?? config.llmSettings.max_new_tokens; | ||||||
|  |     config.llmSettings.min_new_tokens = interaction.options.getInteger('min_new_tokens') ?? config.llmSettings.min_new_tokens; | ||||||
|     config.llmSettings.msg_context = interaction.options.getInteger('msg_context') ?? config.llmSettings.msg_context; |     config.llmSettings.msg_context = interaction.options.getInteger('msg_context') ?? config.llmSettings.msg_context; | ||||||
|     config.llmSettings.temperature = interaction.options.getNumber('temperature') ?? config.llmSettings.temperature; |     config.llmSettings.temperature = interaction.options.getNumber('temperature') ?? config.llmSettings.temperature; | ||||||
|     config.llmSettings.repetition_penalty = interaction.options.getNumber('repetition_penalty') ?? config.llmSettings.repetition_penalty; |     config.llmSettings.repetition_penalty = interaction.options.getNumber('repetition_penalty') ?? config.llmSettings.repetition_penalty; | ||||||
| @ -29,6 +31,7 @@ async function configCommand(interaction: ChatInputCommandInteraction) | |||||||
|     await interaction.reply(` |     await interaction.reply(` | ||||||
| \`\`\` | \`\`\` | ||||||
| max_new_tokens = ${config.llmSettings.max_new_tokens} | max_new_tokens = ${config.llmSettings.max_new_tokens} | ||||||
|  | min_new_tokens = ${config.llmSettings.min_new_tokens} | ||||||
| msg_context = ${config.llmSettings.msg_context} | msg_context = ${config.llmSettings.msg_context} | ||||||
| temperature = ${config.llmSettings.temperature} | temperature = ${config.llmSettings.temperature} | ||||||
| repetition_penalty = ${config.llmSettings.repetition_penalty} | repetition_penalty = ${config.llmSettings.repetition_penalty} | ||||||
| @ -50,6 +53,9 @@ export = { | |||||||
|         .addIntegerOption( |         .addIntegerOption( | ||||||
|             opt => opt.setName('max_new_tokens').setDescription('Max. new tokens (default: 128)') |             opt => opt.setName('max_new_tokens').setDescription('Max. new tokens (default: 128)') | ||||||
|         ) |         ) | ||||||
|  |         .addIntegerOption( | ||||||
|  |             opt => opt.setName('min_new_tokens').setDescription('Min. new tokens (default: 1)') | ||||||
|  |         ) | ||||||
|         .addIntegerOption( |         .addIntegerOption( | ||||||
|             opt => opt.setName('msg_context').setDescription('Num. messages in context (default: 8)') |             opt => opt.setName('msg_context').setDescription('Num. messages in context (default: 8)') | ||||||
|         ) |         ) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user