Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ktransformers
Commits
8320ae7d
Unverified
Commit
8320ae7d
authored
Mar 15, 2025
by
Jiaqi Liao
Committed by
GitHub
Mar 15, 2025
Browse files
Merge pull request #893 from SkqLiao/main
Add Local Chat Test for CI/CD
parents
6a77a3d3
bd9dc55a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
.github/workflows/install.yml
.github/workflows/install.yml
+24
-12
No files found.
.github/workflows/install.yml
View file @
8320ae7d
name
:
Install KTransformers
name
:
Install
and Test
KTransformers
run-name
:
Install KTransformers
run-name
:
Install
and Test
KTransformers
on
:
on
:
workflow_dispatch
:
workflow_dispatch
:
inputs
:
inputs
:
job_to_run
:
job_to_run
:
description
:
"
Which
job
to
run?"
description
:
"
Which
job
to
run?"
required
:
true
required
:
true
default
:
"
install"
default
:
"
install
&test
"
type
:
choice
type
:
choice
options
:
options
:
-
create&install
-
create-install-test
-
install
-
install-test
-
test
jobs
:
jobs
:
Install-KTransformers
:
Install-
Test-
KTransformers
:
runs-on
:
self-hosted
runs-on
:
self-hosted
steps
:
steps
:
-
run
:
echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
-
run
:
echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
...
@@ -22,32 +23,43 @@ jobs:
...
@@ -22,32 +23,43 @@ jobs:
-
run
:
echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
-
run
:
echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
-
name
:
Remove old conda environment
-
name
:
Remove old conda environment
continue-on-error
:
true
continue-on-error
:
true
if
:
${{
inputs.job_to_run
==
'create
&install'}}
if
:
contains(
inputs.job_to_run
,
'create
')
run
:
|
run
:
|
source /home/qujing3/anaconda3/etc/profile.d/conda.sh
source /home/qujing3/anaconda3/etc/profile.d/conda.sh
conda env remove --name ktransformers-dev -y
conda env remove --name ktransformers-dev -y
-
name
:
Create conda environment
-
name
:
Create conda environment
if
:
${{
inputs.job_to_run
==
'create
&install'}}
if
:
contains(
inputs.job_to_run
,
'create
')
run
:
|
run
:
|
source /home/qujing3/anaconda3/etc/profile.d/conda.sh
source /home/qujing3/anaconda3/etc/profile.d/conda.sh
conda create --name ktransformers-dev python=3.11
conda create --name ktransformers-dev python=3.11
conda activate ktransformers-dev
conda activate ktransformers-dev
conda install -c conda-forge libstdcxx-ng -y
conda install -c conda-forge libstdcxx-ng -y
-
name
:
Install dependencies
-
name
:
Install dependencies
if
:
${{
inputs.job_to_run
==
'create
&install'}}
if
:
contains(
inputs.job_to_run
,
'create
')
run
:
|
run
:
|
source /home/qujing3/anaconda3/etc/profile.d/conda.sh
source /home/qujing3/anaconda3/etc/profile.d/conda.sh
conda activate ktransformers-dev
conda activate ktransformers-dev
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
pip3 install packaging ninja cpufeature numpy
pip3 install packaging ninja cpufeature numpy
wget
pip install ~/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiTRUE-cp311-cp311-linux_x86_64.whl
pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.2cxx11abiTRUE-cp311-cp311-linux_x86_64.whl
-
name
:
Install KTransformers
-
name
:
Install KTransformers
if
:
contains(inputs.job_to_run, 'install')
run
:
|
run
:
|
source /home/qujing3/anaconda3/etc/profile.d/conda.sh
source /home/qujing3/anaconda3/etc/profile.d/conda.sh
conda activate ktransformers-dev
conda activate ktransformers-dev
pip3 uninstall ktransformers -y
cd ${{ github.workspace }}
cd ${{ github.workspace }}
git submodule init
git submodule init
git submodule update
git submodule update
USE_NUMA=1 bash install.sh
bash install.sh
-
name
:
Test Local Chat
run
:
|
source /home/qujing3/anaconda3/etc/profile.d/conda.sh
conda activate ktransformers-dev
export PATH=/usr/local/cuda-12.4/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-12.4/lib64:$LD_LIBRARY_PATH
export CUDA_HOME=/usr/local/cuda-12.4
cd ${{ github.workspace }}
python ktransformers/local_chat.py --model_path /home/qujing3/models/DeepSeek-R1-Q4_K_M/config --gguf_path /home/qujing3/models/DeepSeek-R1-Q4_K_M/ --max_new_tokens 100 --cache_len 1536 --cpu_infer 64 --prompt_file /home/qujing3/promptsbook.txt
DeepSeek-R1-Q4_K_M/config --gguf_path /home/qujing3/models/DeepSeek-R1-Q4_K_M/ --max_new_tokens 100 --cache_len 1536 --cpu_infer 64 --prompt_file /home/qujing3/prompts/chinese.txt
-
run
:
echo "This job's status is ${{ job.status }}."
-
run
:
echo "This job's status is ${{ job.status }}."
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment