Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88a5d11e15 | ||
|
|
1ecb0b444b | ||
|
|
72d601370d | ||
|
|
4814b88172 | ||
|
|
cfad67a922 | ||
|
|
c28f5604ab |
@@ -17,11 +17,8 @@ import (
|
|||||||
func Cmd(args ...string) (string, error) {
|
func Cmd(args ...string) (string, error) {
|
||||||
switch platform := runtime.GOOS; platform {
|
switch platform := runtime.GOOS; platform {
|
||||||
case "windows":
|
case "windows":
|
||||||
_, err := os.Stat("cmd-helper.bat")
|
if err := os.WriteFile("./cmd-helper.bat", []byte("start /wait %*"), 0644); err != nil {
|
||||||
if err != nil {
|
return "", err
|
||||||
if err := os.WriteFile("./cmd-helper.bat", []byte("start %*"), 0644); err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
cmdHelper, err := filepath.Abs("./cmd-helper")
|
cmdHelper, err := filepath.Abs("./cmd-helper")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -46,7 +43,7 @@ func Cmd(args ...string) (string, error) {
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
exDir := filepath.Dir(ex) + "/../../../"
|
exDir := filepath.Dir(ex) + "/../../../"
|
||||||
cmd := exec.Command("osascript", "-e", `tell application 'Terminal' to do script '`+"cd "+exDir+" && "+strings.Join(args, " ")+`'`)
|
cmd := exec.Command("osascript", "-e", `tell application "Terminal" to do script "`+"cd "+exDir+" && "+strings.Join(args, " ")+`"`)
|
||||||
err = cmd.Start()
|
err = cmd.Start()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
|||||||
2
build/darwin/Info.dev.plist
vendored
2
build/darwin/Info.dev.plist
vendored
@@ -8,7 +8,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>{{.Name}}</string>
|
<string>{{.Name}}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>com.wails.{{.Name}}</string>
|
<string>dev.josStorer.RWKV-Runner</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>{{.Info.ProductVersion}}</string>
|
<string>{{.Info.ProductVersion}}</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
|
|||||||
2
build/darwin/Info.plist
vendored
2
build/darwin/Info.plist
vendored
@@ -8,7 +8,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>{{.Name}}</string>
|
<string>{{.Name}}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>com.wails.{{.Name}}</string>
|
<string>dev.josStorer.RWKV-Runner</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>{{.Info.ProductVersion}}</string>
|
<string>{{.Info.ProductVersion}}</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
|
|||||||
9
build/darwin/Readme_Install.txt
vendored
Normal file
9
build/darwin/Readme_Install.txt
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Please execute this program in an empty directory. All related dependencies will be placed in this directory.
|
||||||
|
请将本程序放在一个空目录内执行, 所有相关依赖均会放置于此目录.
|
||||||
|
このプログラムを空のディレクトリで実行してください。関連するすべての依存関係は、このディレクトリに配置されます。
|
||||||
|
|
||||||
|
Please execute the following command in the terminal to remove the permission restrictions of this app, and then this program can work properly:
|
||||||
|
请在终端执行以下命令解除本app的权限限制, 然后本程序才可以正常工作:
|
||||||
|
このアプリの権限制限を解除するために、ターミナルで以下のコマンドを実行してください。その後、このプログラムは正常に動作するようになります:
|
||||||
|
|
||||||
|
sudo xattr -r -d com.apple.quarantine ./RWKV-Runner.app
|
||||||
16
build/darwin/entitlements.plist
vendored
Normal file
16
build/darwin/entitlements.plist
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.security.app-sandbox</key>
|
||||||
|
<false/>
|
||||||
|
<key>com.apple.security.network.client</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.network.server</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.files.user-selected.read-write</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.files.downloads.read-write</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
17
build/darwin/gon-sign.json
vendored
Normal file
17
build/darwin/gon-sign.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"source": [
|
||||||
|
"./build/bin/RWKV-Runner_darwin.app"
|
||||||
|
],
|
||||||
|
"bundle_id": "dev.josStorer.RWKV-Runner",
|
||||||
|
"apple_id": {
|
||||||
|
"username": "joshua1466587594@outlook.com",
|
||||||
|
"password": ""
|
||||||
|
},
|
||||||
|
"sign": {
|
||||||
|
"application_identity": "D00A983569B4EAA2A008B963254F385F42A493FD",
|
||||||
|
"entitlements_file": "./build/darwin/entitlements.plist"
|
||||||
|
},
|
||||||
|
"zip": {
|
||||||
|
"output_path": "./build/bin/RWKV-Runner_darwin.archive.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
13
build/linux/Readme_Install.txt
vendored
Normal file
13
build/linux/Readme_Install.txt
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
Please execute this program in an empty directory. All related dependencies will be placed in this directory.
|
||||||
|
请将本程序放在一个空目录内执行, 所有相关依赖均会放置于此目录.
|
||||||
|
このプログラムを空のディレクトリで実行してください。関連するすべての依存関係は、このディレクトリに配置されます。
|
||||||
|
|
||||||
|
On Linux system, this program cannot invoke the terminal for automatic dependency installation. You must manually execute the following commands for installation so that it can be used normally:
|
||||||
|
在Linux系统下, 本程序无法调用终端自动安装依赖, 你必须手动执行以下命令进行安装, 之后方可正常使用:
|
||||||
|
Linuxシステムでは、このプログラムはターミナルを自動的に呼び出して依存関係をインストールすることができません。以下のコマンドを手動で実行する必要があります。それが完了した後に、正常に使用することができます:
|
||||||
|
|
||||||
|
chmod +x ./RWKV-Runner
|
||||||
|
./RWKV-Runner
|
||||||
|
git clone https://github.com/josStorer/RWKV-Runner --depth=1
|
||||||
|
cd RWKV-Runner/backend-python
|
||||||
|
pip3 install -r requirements.txt # or pip3 install -r requirements_without_cyac.txt
|
||||||
3
build/windows/Readme_Install.txt
vendored
Normal file
3
build/windows/Readme_Install.txt
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Please execute this program in an empty directory. All related dependencies will be placed in this directory.
|
||||||
|
请将本程序放在一个空目录内执行, 所有相关依赖均会放置于此目录.
|
||||||
|
このプログラムを空のディレクトリで実行してください。関連するすべての依存関係は、このディレクトリに配置されます。
|
||||||
@@ -140,5 +140,6 @@
|
|||||||
"Failed to switch model, please try starting the program with administrator privileges.": "切换模型失败, 请尝试以管理员权限启动程序",
|
"Failed to switch model, please try starting the program with administrator privileges.": "切换模型失败, 请尝试以管理员权限启动程序",
|
||||||
"Current Strategy": "当前Strategy",
|
"Current Strategy": "当前Strategy",
|
||||||
"MacOS is not yet supported for performing this operation, please do it manually.": "MacOS尚未支持此操作, 请手动执行",
|
"MacOS is not yet supported for performing this operation, please do it manually.": "MacOS尚未支持此操作, 请手动执行",
|
||||||
"Linux is not yet supported for performing this operation, please do it manually.": "Linux尚未支持此操作, 请手动执行"
|
"Linux is not yet supported for performing this operation, please do it manually.": "Linux尚未支持此操作, 请手动执行",
|
||||||
|
"On Linux system, you must manually install python dependencies.": "在Linux系统下, 你必须手动安装python依赖"
|
||||||
}
|
}
|
||||||
@@ -3,14 +3,15 @@ import { DialogButton } from './DialogButton';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { ArrowReset20Regular } from '@fluentui/react-icons';
|
import { ArrowReset20Regular } from '@fluentui/react-icons';
|
||||||
import commonStore from '../stores/commonStore';
|
import commonStore from '../stores/commonStore';
|
||||||
import { defaultModelConfigs } from '../pages/Configs';
|
|
||||||
|
import { defaultModelConfigs, defaultModelConfigsMac } from '../pages/defaultModelConfigs';
|
||||||
|
|
||||||
export const ResetConfigsButton: FC<{ afterConfirm?: () => void }> = ({ afterConfirm }) => {
|
export const ResetConfigsButton: FC<{ afterConfirm?: () => void }> = ({ afterConfirm }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return <DialogButton icon={<ArrowReset20Regular />} tooltip={t('Reset All Configs')} title={t('Reset All Configs')}
|
return <DialogButton icon={<ArrowReset20Regular />} tooltip={t('Reset All Configs')} title={t('Reset All Configs')}
|
||||||
contentText={t('Are you sure you want to reset all configs? This will obtain the latest preset configs, but will override your custom configs and cannot be undone.')}
|
contentText={t('Are you sure you want to reset all configs? This will obtain the latest preset configs, but will override your custom configs and cannot be undone.')}
|
||||||
onConfirm={() => {
|
onConfirm={() => {
|
||||||
commonStore.setModelConfigs(defaultModelConfigs, false);
|
commonStore.setModelConfigs(commonStore.platform != 'darwin' ? defaultModelConfigs : defaultModelConfigsMac, false);
|
||||||
commonStore.setCurrentConfigIndex(0, true);
|
commonStore.setCurrentConfigIndex(0, true);
|
||||||
afterConfirm?.();
|
afterConfirm?.();
|
||||||
}} />;
|
}} />;
|
||||||
|
|||||||
@@ -75,10 +75,16 @@ export const RunButton: FC<{ onClickRun?: MouseEventHandler, iconMode?: boolean
|
|||||||
BrowserOpenURL('https://aka.ms/vs/16/release/vc_redist.x64.exe');
|
BrowserOpenURL('https://aka.ms/vs/16/release/vc_redist.x64.exe');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
toastWithButton(t('Python dependencies are incomplete, would you like to install them?'), t('Install'), () => {
|
toast(depErrorMsg, { type: 'info', position: 'bottom-left' });
|
||||||
InstallPyDep(commonStore.settings.customPythonPath, commonStore.settings.cnMirror);
|
if (commonStore.platform != 'linux')
|
||||||
setTimeout(WindowShow, 1000);
|
toastWithButton(t('Python dependencies are incomplete, would you like to install them?'), t('Install'), () => {
|
||||||
});
|
InstallPyDep(commonStore.settings.customPythonPath, commonStore.settings.cnMirror);
|
||||||
|
setTimeout(WindowShow, 1000);
|
||||||
|
});
|
||||||
|
else
|
||||||
|
toastWithButton(t('On Linux system, you must manually install python dependencies.'), t('Check'), () => {
|
||||||
|
BrowserOpenURL('https://github.com/josStorer/RWKV-Runner/blob/master/build/linux/Readme_Install.txt');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
toast(depErrorMsg, { type: 'error' });
|
toast(depErrorMsg, { type: 'error' });
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export type ApiParameters = {
|
|||||||
frequencyPenalty: number;
|
frequencyPenalty: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Device = 'CPU' | 'CUDA' | 'Custom';
|
export type Device = 'CPU' | 'CUDA' | 'MPS' | 'Custom';
|
||||||
export type Precision = 'fp16' | 'int8' | 'fp32';
|
export type Precision = 'fp16' | 'int8' | 'fp32';
|
||||||
|
|
||||||
export type ModelParameters = {
|
export type ModelParameters = {
|
||||||
@@ -52,564 +52,6 @@ export type ModelConfig = {
|
|||||||
modelParameters: ModelParameters
|
modelParameters: ModelParameters
|
||||||
}
|
}
|
||||||
|
|
||||||
export const defaultModelConfigs: ModelConfig[] = [
|
|
||||||
{
|
|
||||||
name: 'GPU-2G-1B5-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-1B5-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 4,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: true,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-4G-1B5-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-1B5-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-4G-3B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-3B-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 24,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: true,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-4G-3B-CN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-3B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230527-ctx4096.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 24,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: true,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-4G-7B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-7B-v12-Eng98%-Other2%-20230521-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 8,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: true,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-4G-7B-CN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 8,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: true,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-6G-1B5-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-1B5-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'fp16',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-6G-3B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-3B-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-6G-3B-CN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-3B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230527-ctx4096.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-6G-7B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-7B-v12-Eng98%-Other2%-20230521-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 18,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: true,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-6G-7B-CN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 18,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: true,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-8G-3B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-3B-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'fp16',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-8G-3B-CN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-3B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230527-ctx4096.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'fp16',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-8G-7B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-7B-v12-Eng98%-Other2%-20230521-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 27,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-8G-7B-CN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 27,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-10G-7B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-7B-v12-Eng98%-Other2%-20230521-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-10G-7B-CN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-12G-14B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-14B-v12-Eng98%-Other2%-20230523-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 24,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-16G-7B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-7B-v12-Eng98%-Other2%-20230521-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'fp16',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-16G-7B-CN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'fp16',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-16G-14B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-14B-v12-Eng98%-Other2%-20230523-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 37,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-18G-14B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-14B-v12-Eng98%-Other2%-20230523-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'int8',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GPU-32G-14B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-14B-v12-Eng98%-Other2%-20230523-ctx8192.pth',
|
|
||||||
device: 'CUDA',
|
|
||||||
precision: 'fp16',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false,
|
|
||||||
useCustomCuda: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'CPU-6G-1B5-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-1B5-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
|
||||||
device: 'CPU',
|
|
||||||
precision: 'fp32',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'CPU-12G-3B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-3B-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
|
||||||
device: 'CPU',
|
|
||||||
precision: 'fp32',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'CPU-12G-3B-CN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-3B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230527-ctx4096.pth',
|
|
||||||
device: 'CPU',
|
|
||||||
precision: 'fp32',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'CPU-28G-7B-EN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-7B-v12-Eng98%-Other2%-20230521-ctx8192.pth',
|
|
||||||
device: 'CPU',
|
|
||||||
precision: 'fp32',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'CPU-28G-7B-CN',
|
|
||||||
apiParameters: {
|
|
||||||
apiPort: 8000,
|
|
||||||
maxResponseToken: 4100,
|
|
||||||
temperature: 1.2,
|
|
||||||
topP: 0.5,
|
|
||||||
presencePenalty: 0.4,
|
|
||||||
frequencyPenalty: 0.4
|
|
||||||
},
|
|
||||||
modelParameters: {
|
|
||||||
modelName: 'RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth',
|
|
||||||
device: 'CPU',
|
|
||||||
precision: 'fp32',
|
|
||||||
storedLayers: 41,
|
|
||||||
maxStoredLayers: 41,
|
|
||||||
enableHighPrecisionForLastLayer: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
export const Configs: FC = observer(() => {
|
export const Configs: FC = observer(() => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [selectedIndex, setSelectedIndex] = React.useState(commonStore.currentModelConfigIndex);
|
const [selectedIndex, setSelectedIndex] = React.useState(commonStore.currentModelConfigIndex);
|
||||||
@@ -836,6 +278,7 @@ export const Configs: FC = observer(() => {
|
|||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
<Option value="CPU">CPU</Option>
|
<Option value="CPU">CPU</Option>
|
||||||
|
{commonStore.platform === 'darwin' && <Option value="MPS">MPS</Option>}
|
||||||
<Option value="CUDA">CUDA</Option>
|
<Option value="CUDA">CUDA</Option>
|
||||||
<Option value="Custom">{t('Custom')!}</Option>
|
<Option value="Custom">{t('Custom')!}</Option>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
@@ -903,7 +346,8 @@ export const Configs: FC = observer(() => {
|
|||||||
onMouseEnter={() => setDisplayStrategyImg(true)}
|
onMouseEnter={() => setDisplayStrategyImg(true)}
|
||||||
onMouseLeave={() => setDisplayStrategyImg(false)}
|
onMouseLeave={() => setDisplayStrategyImg(false)}
|
||||||
content={
|
content={
|
||||||
<Input className="grow" placeholder="cuda:0 fp16 *20 -> cuda:1 fp16"
|
<Input className="grow"
|
||||||
|
placeholder={commonStore.platform != 'darwin' ? 'cuda:0 fp16 *20 -> cuda:1 fp16' : 'mps fp32'}
|
||||||
value={selectedConfig.modelParameters.customStrategy}
|
value={selectedConfig.modelParameters.customStrategy}
|
||||||
onChange={(e, data) => {
|
onChange={(e, data) => {
|
||||||
setSelectedConfigModelParams({
|
setSelectedConfigModelParams({
|
||||||
@@ -914,7 +358,7 @@ export const Configs: FC = observer(() => {
|
|||||||
}
|
}
|
||||||
{selectedConfig.modelParameters.device == 'Custom' && <div />}
|
{selectedConfig.modelParameters.device == 'Custom' && <div />}
|
||||||
{
|
{
|
||||||
selectedConfig.modelParameters.device != 'CPU' &&
|
selectedConfig.modelParameters.device != 'CPU' && selectedConfig.modelParameters.device != 'MPS' &&
|
||||||
<Labeled label={t('Use Custom CUDA kernel to Accelerate')}
|
<Labeled label={t('Use Custom CUDA kernel to Accelerate')}
|
||||||
desc={t('Enabling this option can greatly improve inference speed, but there may be compatibility issues. If it fails to start, please turn off this option.')}
|
desc={t('Enabling this option can greatly improve inference speed, but there may be compatibility issues. If it fails to start, please turn off this option.')}
|
||||||
content={
|
content={
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export const Settings: FC = observer(() => {
|
|||||||
} />
|
} />
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
commonStore.settings.language === 'zh' &&
|
commonStore.settings.language === 'zh' && commonStore.platform != 'linux' &&
|
||||||
<Labeled label={t('Use Tsinghua Pip Mirrors')} flex spaceBetween content={
|
<Labeled label={t('Use Tsinghua Pip Mirrors')} flex spaceBetween content={
|
||||||
<Switch checked={commonStore.settings.cnMirror}
|
<Switch checked={commonStore.settings.cnMirror}
|
||||||
onChange={(e, data) => {
|
onChange={(e, data) => {
|
||||||
|
|||||||
720
frontend/src/pages/defaultModelConfigs.ts
Normal file
720
frontend/src/pages/defaultModelConfigs.ts
Normal file
@@ -0,0 +1,720 @@
|
|||||||
|
import { ModelConfig } from './Configs';
|
||||||
|
|
||||||
|
export const defaultModelConfigsMac: ModelConfig[] = [
|
||||||
|
{
|
||||||
|
name: 'MAC-1B5-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-1B5-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
||||||
|
device: 'MPS',
|
||||||
|
precision: 'fp32',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: false,
|
||||||
|
customStrategy: 'mps fp32'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'MAC-3B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-3B-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
||||||
|
device: 'MPS',
|
||||||
|
precision: 'fp32',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: false,
|
||||||
|
customStrategy: 'mps fp32'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'MAC-3B-CN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-3B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230527-ctx4096.pth',
|
||||||
|
device: 'MPS',
|
||||||
|
precision: 'fp32',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: false,
|
||||||
|
customStrategy: 'mps fp32'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'CPU-6G-1B5-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-1B5-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
||||||
|
device: 'CPU',
|
||||||
|
precision: 'fp32',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'CPU-12G-3B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-3B-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
||||||
|
device: 'CPU',
|
||||||
|
precision: 'fp32',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'CPU-12G-3B-CN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-3B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230527-ctx4096.pth',
|
||||||
|
device: 'CPU',
|
||||||
|
precision: 'fp32',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'CPU-28G-7B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng98%-Other2%-20230521-ctx8192.pth',
|
||||||
|
device: 'CPU',
|
||||||
|
precision: 'fp32',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'CPU-28G-7B-CN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth',
|
||||||
|
device: 'CPU',
|
||||||
|
precision: 'fp32',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
export const defaultModelConfigs: ModelConfig[] = [
|
||||||
|
{
|
||||||
|
name: 'GPU-2G-1B5-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-1B5-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 4,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: true,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-4G-1B5-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-1B5-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-4G-3B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-3B-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 24,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: true,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-4G-3B-CN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-3B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230527-ctx4096.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 24,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: true,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-4G-7B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng98%-Other2%-20230521-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 8,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: true,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-4G-7B-CN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 8,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: true,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-6G-1B5-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-1B5-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'fp16',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-6G-3B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-3B-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-6G-3B-CN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-3B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230527-ctx4096.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-6G-7B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng98%-Other2%-20230521-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 18,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: true,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-6G-7B-CN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 18,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: true,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-8G-3B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-3B-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'fp16',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-8G-3B-CN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-3B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230527-ctx4096.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'fp16',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-8G-7B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng98%-Other2%-20230521-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 27,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-8G-7B-CN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 27,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-10G-7B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng98%-Other2%-20230521-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-10G-7B-CN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-12G-14B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-14B-v12-Eng98%-Other2%-20230523-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 24,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-16G-7B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng98%-Other2%-20230521-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'fp16',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-16G-7B-CN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'fp16',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-16G-14B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-14B-v12-Eng98%-Other2%-20230523-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 37,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-18G-14B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-14B-v12-Eng98%-Other2%-20230523-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'int8',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'GPU-32G-14B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-14B-v12-Eng98%-Other2%-20230523-ctx8192.pth',
|
||||||
|
device: 'CUDA',
|
||||||
|
precision: 'fp16',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false,
|
||||||
|
useCustomCuda: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'CPU-6G-1B5-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-1B5-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
||||||
|
device: 'CPU',
|
||||||
|
precision: 'fp32',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'CPU-12G-3B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-3B-v12-Eng98%-Other2%-20230520-ctx4096.pth',
|
||||||
|
device: 'CPU',
|
||||||
|
precision: 'fp32',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'CPU-12G-3B-CN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-3B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230527-ctx4096.pth',
|
||||||
|
device: 'CPU',
|
||||||
|
precision: 'fp32',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'CPU-28G-7B-EN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng98%-Other2%-20230521-ctx8192.pth',
|
||||||
|
device: 'CPU',
|
||||||
|
precision: 'fp32',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'CPU-28G-7B-CN',
|
||||||
|
apiParameters: {
|
||||||
|
apiPort: 8000,
|
||||||
|
maxResponseToken: 4100,
|
||||||
|
temperature: 1.2,
|
||||||
|
topP: 0.5,
|
||||||
|
presencePenalty: 0.4,
|
||||||
|
frequencyPenalty: 0.4
|
||||||
|
},
|
||||||
|
modelParameters: {
|
||||||
|
modelName: 'RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth',
|
||||||
|
device: 'CPU',
|
||||||
|
precision: 'fp32',
|
||||||
|
storedLayers: 41,
|
||||||
|
maxStoredLayers: 41,
|
||||||
|
enableHighPrecisionForLastLayer: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
@@ -3,8 +3,8 @@ import { GetPlatform, ReadJson } from '../wailsjs/go/backend_golang/App';
|
|||||||
import { Cache, checkUpdate, downloadProgramFiles, LocalConfig, refreshModels } from './utils';
|
import { Cache, checkUpdate, downloadProgramFiles, LocalConfig, refreshModels } from './utils';
|
||||||
import { getStatus } from './apis';
|
import { getStatus } from './apis';
|
||||||
import { EventsOn } from '../wailsjs/runtime';
|
import { EventsOn } from '../wailsjs/runtime';
|
||||||
import { defaultModelConfigs } from './pages/Configs';
|
|
||||||
import manifest from '../../manifest.json';
|
import manifest from '../../manifest.json';
|
||||||
|
import { defaultModelConfigs, defaultModelConfigsMac } from './pages/defaultModelConfigs';
|
||||||
|
|
||||||
export async function startup() {
|
export async function startup() {
|
||||||
downloadProgramFiles();
|
downloadProgramFiles();
|
||||||
@@ -54,7 +54,7 @@ async function initConfig() {
|
|||||||
configData.currentModelConfigIndex >= 0 && configData.currentModelConfigIndex < configData.modelConfigs.length)
|
configData.currentModelConfigIndex >= 0 && configData.currentModelConfigIndex < configData.modelConfigs.length)
|
||||||
commonStore.setCurrentConfigIndex(configData.currentModelConfigIndex, false);
|
commonStore.setCurrentConfigIndex(configData.currentModelConfigIndex, false);
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
commonStore.setModelConfigs(defaultModelConfigs, true);
|
commonStore.setModelConfigs(commonStore.platform != 'darwin' ? defaultModelConfigs : defaultModelConfigsMac, true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { makeAutoObservable } from 'mobx';
|
|||||||
import { getUserLanguage, isSystemLightMode, saveConfigs } from '../utils';
|
import { getUserLanguage, isSystemLightMode, saveConfigs } from '../utils';
|
||||||
import { WindowSetDarkTheme, WindowSetLightTheme } from '../../wailsjs/runtime';
|
import { WindowSetDarkTheme, WindowSetLightTheme } from '../../wailsjs/runtime';
|
||||||
import manifest from '../../../manifest.json';
|
import manifest from '../../../manifest.json';
|
||||||
import { defaultModelConfigs, ModelConfig } from '../pages/Configs';
|
import { ModelConfig } from '../pages/Configs';
|
||||||
import { Conversations } from '../pages/Chat';
|
import { Conversations } from '../pages/Chat';
|
||||||
import { ModelSourceItem } from '../pages/Models';
|
import { ModelSourceItem } from '../pages/Models';
|
||||||
import { DownloadStatus } from '../pages/Downloads';
|
import { DownloadStatus } from '../pages/Downloads';
|
||||||
@@ -11,6 +11,8 @@ import { IntroductionContent } from '../pages/Home';
|
|||||||
import { AboutContent } from '../pages/About';
|
import { AboutContent } from '../pages/About';
|
||||||
import i18n from 'i18next';
|
import i18n from 'i18next';
|
||||||
import { CompletionPreset } from '../pages/Completion';
|
import { CompletionPreset } from '../pages/Completion';
|
||||||
|
import { defaultModelConfigs, defaultModelConfigsMac } from '../pages/defaultModelConfigs';
|
||||||
|
import commonStore from './commonStore';
|
||||||
|
|
||||||
export enum ModelStatus {
|
export enum ModelStatus {
|
||||||
Offline,
|
Offline,
|
||||||
@@ -98,7 +100,8 @@ class CommonStore {
|
|||||||
|
|
||||||
createModelConfig = (config: ModelConfig = defaultModelConfigs[0], saveConfig: boolean = true) => {
|
createModelConfig = (config: ModelConfig = defaultModelConfigs[0], saveConfig: boolean = true) => {
|
||||||
if (config.name === defaultModelConfigs[0].name) {
|
if (config.name === defaultModelConfigs[0].name) {
|
||||||
config = JSON.parse(JSON.stringify(config)); // deep copy
|
// deep copy
|
||||||
|
config = JSON.parse(JSON.stringify(commonStore.platform != 'darwin' ? defaultModelConfigs[0] : defaultModelConfigsMac[0]));
|
||||||
config.name = new Date().toLocaleString();
|
config.name = new Date().toLocaleString();
|
||||||
}
|
}
|
||||||
this.modelConfigs.push(config);
|
this.modelConfigs.push(config);
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import { Button } from '@fluentui/react-components';
|
|||||||
import { Language, Languages, SettingsType } from '../pages/Settings';
|
import { Language, Languages, SettingsType } from '../pages/Settings';
|
||||||
import { ModelSourceItem } from '../pages/Models';
|
import { ModelSourceItem } from '../pages/Models';
|
||||||
import { ModelConfig, ModelParameters } from '../pages/Configs';
|
import { ModelConfig, ModelParameters } from '../pages/Configs';
|
||||||
|
import { BrowserOpenURL } from '../../wailsjs/runtime';
|
||||||
|
|
||||||
export type Cache = {
|
export type Cache = {
|
||||||
models: ModelSourceItem[]
|
models: ModelSourceItem[]
|
||||||
@@ -140,6 +141,10 @@ export const getStrategy = (modelConfig: ModelConfig | undefined = undefined) =>
|
|||||||
if (params.enableHighPrecisionForLastLayer)
|
if (params.enableHighPrecisionForLastLayer)
|
||||||
strategy += ' -> cpu fp32 *1';
|
strategy += ' -> cpu fp32 *1';
|
||||||
break;
|
break;
|
||||||
|
case 'MPS':
|
||||||
|
strategy += 'mps ';
|
||||||
|
strategy += params.precision === 'fp16' ? 'fp16' : params.precision === 'int8' ? 'fp16i8' : 'fp32';
|
||||||
|
break;
|
||||||
case 'Custom':
|
case 'Custom':
|
||||||
strategy = params.customStrategy || '';
|
strategy = params.customStrategy || '';
|
||||||
break;
|
break;
|
||||||
@@ -245,20 +250,24 @@ export async function checkUpdate(notifyEvenLatest: boolean = false) {
|
|||||||
`https://gitee.com/josc146/RWKV-Runner/releases/download/${versionTag}/${asset.name}`;
|
`https://gitee.com/josc146/RWKV-Runner/releases/download/${versionTag}/${asset.name}`;
|
||||||
toastWithButton(t('New Version Available') + ': ' + versionTag, t('Update'), () => {
|
toastWithButton(t('New Version Available') + ': ' + versionTag, t('Update'), () => {
|
||||||
DeleteFile('cache.json');
|
DeleteFile('cache.json');
|
||||||
toast(t('Downloading update, please wait. If it is not completed, please manually download the program from GitHub and replace the original program.'), {
|
if (commonStore.platform != 'darwin') {
|
||||||
type: 'info',
|
toast(t('Downloading update, please wait. If it is not completed, please manually download the program from GitHub and replace the original program.'), {
|
||||||
position: 'bottom-left',
|
type: 'info',
|
||||||
autoClose: 10000
|
position: 'bottom-left',
|
||||||
});
|
autoClose: 20000
|
||||||
setTimeout(() => {
|
|
||||||
UpdateApp(updateUrl).catch((e) => {
|
|
||||||
toast(t('Update Error') + ' - ' + e.message || e, {
|
|
||||||
type: 'error',
|
|
||||||
position: 'bottom-left',
|
|
||||||
autoClose: false
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}, 500);
|
setTimeout(() => {
|
||||||
|
UpdateApp(updateUrl).catch((e) => {
|
||||||
|
toast(t('Update Error') + ' - ' + e.message || e, {
|
||||||
|
type: 'error',
|
||||||
|
position: 'bottom-left',
|
||||||
|
autoClose: false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}, 500);
|
||||||
|
} else {
|
||||||
|
BrowserOpenURL(updateUrl);
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
autoClose: false,
|
autoClose: false,
|
||||||
position: 'bottom-left'
|
position: 'bottom-left'
|
||||||
|
|||||||
Reference in New Issue
Block a user