Skip to content

Commit

Permalink
fix: stop word update (janhq#1457)
Browse files Browse the repository at this point in the history
* fix: stop word update

* fix: enable stop settings

---------

Co-authored-by: hahuyhoang411 <[email protected]>
  • Loading branch information
louis-jan and hahuyhoang411 authored Jan 11, 2024
1 parent 163bc72 commit 19153c4
Show file tree
Hide file tree
Showing 26 changed files with 31 additions and 9 deletions.
2 changes: 1 addition & 1 deletion extensions/model-extension/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions models/capybara-34b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/codeninja-1.0-7b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": ["<|end_of_turn|>"],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/deepseek-coder-1.3b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/deepseek-coder-34b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/dolphin-2.7-mixtral-8x7b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/llama2-chat-70b-q4/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/llama2-chat-7b-q4/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/mistral-ins-7b-q4/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/mixtral-8x7b-instruct/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/noromaid-7b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/openchat-3.5-7b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": ["<|end_of_turn|>"],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/openhermes-neural-7b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/phi-2-3b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/phind-34b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/solar-10.7b-slerp/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/starling-7b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": ["<|end_of_turn|>"],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/stealth-v1.2-7b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
3 changes: 2 additions & 1 deletion models/tinyllama-1.1b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
1 change: 1 addition & 0 deletions models/trinity-v1.2-7b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/tulu-2-70b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/wizardcoder-13b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/yarn-mistral-7b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
1 change: 1 addition & 0 deletions models/yi-34b/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"top_p": 0.95,
"stream": true,
"max_tokens": 4096,
"stop": [],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down
9 changes: 3 additions & 6 deletions web/containers/CardSidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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 (
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion web/hooks/useUpdateModelParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 19153c4

Please sign in to comment.