Add llama 3 tokenizer

This commit is contained in:
Cohee
2024-05-03 23:59:39 +03:00
parent 7bc87b6e28
commit 7bfd666321
8 changed files with 143 additions and 21 deletions

View File

@@ -932,7 +932,7 @@ function toIntArray(string) {
return string.split(',').map(x => parseInt(x)).filter(x => !isNaN(x));
}
function getModel() {
export function getTextGenModel() {
switch (settings.type) {
case OOBA:
if (settings.custom_model) {
@@ -974,7 +974,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
const canMultiSwipe = !isContinue && !isImpersonate && type !== 'quiet';
let params = {
'prompt': finalPrompt,
'model': getModel(),
'model': getTextGenModel(),
'max_new_tokens': maxTokens,
'max_tokens': maxTokens,
'logprobs': power_user.request_token_probabilities ? 10 : undefined,