fix: stop word update (#1457)

* fix: stop word update

* fix: enable stop settings

---------

Co-authored-by: hahuyhoang411 <hahuyhoanghhh41@gmail.com>
This commit is contained in:
Louis 2024-01-11 10:03:59 +07:00 committed by GitHub
parent 163bc727db
commit 19153c4137
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 31 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@janhq/model-extension",
"version": "1.0.20",
"version": "1.0.21",
"description": "Model Management Extension provides model exploration and seamless downloads",
"main": "dist/index.js",
"module": "dist/module.js",

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": ["<|end_of_turn|>"],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -16,6 +16,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": ["<|end_of_turn|>"],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": ["<|end_of_turn|>"],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,13 +15,14 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 2048,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
"metadata": {
"author": "TinyLlama",
"tags": ["Tiny", "Foundation Model"],
"size": 1170000000
"size": 669000000
},
"engine": "nitro"
}

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},

View File

@ -5,12 +5,10 @@ import {
ChevronDownIcon,
MoreVerticalIcon,
FolderOpenIcon,
Code2Icon,
PencilIcon,
} from 'lucide-react'
import { twMerge } from 'tailwind-merge'
import { useActiveModel } from '@/hooks/useActiveModel'
import { useClickOutside } from '@/hooks/useClickOutside'
import { activeThreadAtom } from '@/helpers/atoms/Thread.atom'
@ -33,16 +31,15 @@ export default function CardSidebar({
const [more, setMore] = useState(false)
const [menu, setMenu] = useState<HTMLDivElement | null>(null)
const [toggle, setToggle] = useState<HTMLDivElement | null>(null)
const { activeModel } = useActiveModel()
const activeThread = useAtomValue(activeThreadAtom)
useClickOutside(() => setMore(false), null, [menu, toggle])
let openFolderTitle: string = 'Open Containing Folder'
if (isMac) {
openFolderTitle = 'Reveal in Finder'
openFolderTitle = 'Show in Finder'
} else if (isWindows) {
openFolderTitle = 'Reveal in File Explorer'
openFolderTitle = 'Show in File Explorer'
}
return (
@ -108,7 +105,7 @@ export default function CardSidebar({
{title === 'Model' ? (
<div className="flex flex-col">
<span className="font-medium text-black dark:text-muted-foreground">
Show in Finder
{openFolderTitle}
</span>
<span className="mt-1 text-muted-foreground">
Opens thread.json. Changes affect this thread only.

View File

@ -42,7 +42,9 @@ export default function useUpdateModelParameters() {
}
const updatedModelParams: ModelParams = {
...activeModelParams,
[name]: value,
// Explicitly set the value to an array if the name is 'stop'
// This is because the inference engine would only accept an array for the 'stop' parameter
[name]: name === 'stop' ? (value === '' ? [] : [value]) : value,
}
// update the state