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
ox696c
ktransformers
Commits
f3be33a3
Commit
f3be33a3
authored
May 15, 2025
by
Alisehen
Browse files
add xpu parameters to install.sh
parent
af9472b5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
doc/en/xpu.md
doc/en/xpu.md
+1
-3
install.sh
install.sh
+22
-0
No files found.
doc/en/xpu.md
View file @
f3be33a3
...
@@ -62,9 +62,7 @@ cd ktransformers
...
@@ -62,9 +62,7 @@ cd ktransformers
git submodule update
--init
git submodule update
--init
# Install dependencies
# Install dependencies
bash install.sh
bash install.sh
--dev
xpu
pip uninstall triton pytorch-triton-xpu
pip
install
pytorch-triton-xpu
==
3.3.0
--extra-index-url
https://download.pytorch.org/whl/xpu
# to avoid potential triton import error
```
```
## Running DeepSeek-R1 Models
## Running DeepSeek-R1 Models
...
...
install.sh
View file @
f3be33a3
#!/bin/bash
#!/bin/bash
set
-e
set
-e
# default backend
DEV
=
"cuda"
# parse --dev argument
while
[[
"$#"
-gt
0
]]
;
do
case
$1
in
--dev
)
DEV
=
"
$2
"
;
shift
;;
*
)
echo
"Unknown parameter passed:
$1
"
;
exit
1
;;
esac
shift
done
export
DEV_BACKEND
=
"
$DEV
"
echo
"Selected backend:
$DEV_BACKEND
"
# clear build dirs
# clear build dirs
rm
-rf
build
rm
-rf
build
rm
-rf
*
.egg-info
rm
-rf
*
.egg-info
...
@@ -13,6 +27,14 @@ rm -rf ~/.ktransformers
...
@@ -13,6 +27,14 @@ rm -rf ~/.ktransformers
echo
"Installing python dependencies from requirements.txt"
echo
"Installing python dependencies from requirements.txt"
pip
install
-r
requirements-local_chat.txt
pip
install
-r
requirements-local_chat.txt
pip
install
-r
ktransformers/server/requirements.txt
pip
install
-r
ktransformers/server/requirements.txt
# XPU-specific fix for triton
if
[[
"
$DEV_BACKEND
"
==
"xpu"
]]
;
then
echo
"Replacing triton for XPU backend"
pip uninstall
-y
triton pytorch-triton-xpu
||
true
pip
install
pytorch-triton-xpu
==
3.3.0
--extra-index-url
https://download.pytorch.org/whl/xpu
fi
echo
"Installing ktransformers"
echo
"Installing ktransformers"
KTRANSFORMERS_FORCE_BUILD
=
TRUE pip
install
-v
.
--no-build-isolation
KTRANSFORMERS_FORCE_BUILD
=
TRUE pip
install
-v
.
--no-build-isolation
...
...
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