fix: disable flash_attn if vulkan is enabled (#3080)
Signed-off-by: James <namnh0122@gmail.com>
This commit is contained in:
parent
a91fe5c584
commit
d2284070fc
@ -7,6 +7,7 @@ import { toaster } from '@/containers/Toast'
|
||||
|
||||
import { LAST_USED_MODEL_ID } from './useRecommendedModel'
|
||||
|
||||
import { vulkanEnabledAtom } from '@/helpers/atoms/AppConfig.atom'
|
||||
import { downloadedModelsAtom } from '@/helpers/atoms/Model.atom'
|
||||
import { activeThreadAtom } from '@/helpers/atoms/Thread.atom'
|
||||
|
||||
@ -34,6 +35,7 @@ export function useActiveModel() {
|
||||
const downloadedModels = useAtomValue(downloadedModelsAtom)
|
||||
const setLoadModelError = useSetAtom(loadModelErrorAtom)
|
||||
const [pendingModelLoad, setPendingModelLoad] = useAtom(pendingModelLoadAtom)
|
||||
const isVulkanEnabled = useAtomValue(vulkanEnabledAtom)
|
||||
|
||||
const downloadedModelsRef = useRef<Model[]>([])
|
||||
|
||||
@ -90,6 +92,11 @@ export function useActiveModel() {
|
||||
}
|
||||
}
|
||||
|
||||
if (isVulkanEnabled) {
|
||||
// @ts-expect-error flash_attn is newly added and will be migrate to cortex in the future
|
||||
model.settings['flash_attn'] = false
|
||||
}
|
||||
|
||||
localStorage.setItem(LAST_USED_MODEL_ID, model.id)
|
||||
const engine = EngineManager.instance().get(model.engine)
|
||||
return engine
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user