Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add install scripts #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions install-cn.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
$Env:PIP_DISABLE_PIP_VERSION_CHECK = 1
$Env:PIP_NO_CACHE_DIR = 1
function InstallFail {
Write-Output "��װʧ�ܡ�"
Read-Host | Out-Null ;
Exit
}

function Check {
param (
$ErrorInfo
)
if (!($?)) {
Write-Output $ErrorInfo
InstallFail
}
}

if (!(Test-Path -Path "venv")) {
Write-Output "���ڴ������⻷��..."
python -m venv venv
Check "�������⻷��ʧ�ܣ����� python �Ƿ�װ����Լ� python �汾��"
}

.\venv\Scripts\activate
Check "�������⻷��ʧ�ܡ�"

Write-Output "��װ������������ (�ѽ��й��ڼ��٣����޷�ʹ�ü���Դ���� install.ps1)..."
pip install torch==1.13.1+cu117 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html -i https://mirrors.bfsu.edu.cn/pypi/web/simple
Check "torch ��װʧ�ܣ���ɾ�� venv �ļ��к��������С�"
pip install numpy tokenizers prompt_toolkit -i https://pypi.tuna.tsinghua.edu.cn/simple/
Check "����������װʧ�ܡ�"

Write-Output "��װ��ϡ�"
Read-Host | Out-Null ;
12 changes: 12 additions & 0 deletions install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if (!(Test-Path -Path "venv")) {
Write-Output "Creating venv for python..."
python -m venv venv
}
.\venv\Scripts\activate

Write-Output "Installing deps..."
pip install torch==1.13.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
pip install numpy tokenizers prompt_toolkit

Write-Output "Install completed"
Read-Host | Out-Null ;
Empty file added models/Put Moderl here.txt
Empty file.
7 changes: 7 additions & 0 deletions run.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Activate python venv
.\venv\Scripts\activate

Set-Location .\v2
python chat.py

Read-Host | Out-Null ;
1 change: 1 addition & 0 deletions v2/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

elif CHAT_LANG == 'Chinese': # testNovel系列是网文模型,请只用 +gen 指令续写。test4 系列可以问答(只用了小中文语料微调,纯属娱乐)
args.MODEL_NAME = '/fsx/BlinkDL/HF-MODEL/rwkv-4-pile-7b/RWKV-4-Pile-7B-EngChn-testNovel-441-ctx2048-20230217'
# args.MODEL_NAME = '../models/RWKV-4-Pile-7B-EngChn-testNovel-1053-ctx2048-20230225'
# args.MODEL_NAME = '/fsx/BlinkDL/HF-MODEL/rwkv-4-pile-3b/RWKV-4-Pile-3B-EngChn-testNovel-711-ctx2048-20230216'
# args.MODEL_NAME = '/fsx/BlinkDL/HF-MODEL/rwkv-4-pile-1b5/RWKV-4-Pile-1B5-EngChn-testNovel-671-ctx2048-20230216'
# args.MODEL_NAME = '/fsx/BlinkDL/CODE/_PUBLIC_/RWKV-LM/RWKV-v4neo/7-run1z/rwkv-1058'
Expand Down