mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2025-09-08 05:29:29 +00:00
Merge pull request #1303 from rnwang04/fix_typo_and_style
fix typo and code style, and update setup.py ValueError message
This commit is contained in:
commit
09f0ddc00b
4 changed files with 5 additions and 5 deletions
|
@ -21,6 +21,7 @@ interface, RESTful APIs compliant with OpenAI and Ollama, and even a simplified
|
||||||
Our vision for KTransformers is to serve as a flexible platform for experimenting with innovative LLM inference optimizations. Please let us know if you need any other features.
|
Our vision for KTransformers is to serve as a flexible platform for experimenting with innovative LLM inference optimizations. Please let us know if you need any other features.
|
||||||
|
|
||||||
<h2 id="Updates">🔥 Updates</h2>
|
<h2 id="Updates">🔥 Updates</h2>
|
||||||
|
|
||||||
* **May 14, 2025**: Support Intel Arc GPU ([Tutorial](./en/xpu.md)).
|
* **May 14, 2025**: Support Intel Arc GPU ([Tutorial](./en/xpu.md)).
|
||||||
* **Apr 9, 2025**: Experimental support for LLaMA 4 models ([Tutorial](./en/llama4.md)).
|
* **Apr 9, 2025**: Experimental support for LLaMA 4 models ([Tutorial](./en/llama4.md)).
|
||||||
* **Apr 2, 2025**: Support Multi-concurrency. ([Tutorial](./en/balance-serve.md)).
|
* **Apr 2, 2025**: Support Multi-concurrency. ([Tutorial](./en/balance-serve.md)).
|
||||||
|
|
|
@ -41,7 +41,6 @@ Install PyTorch with XPU backend support and [IPEX-LLM](https://github.com/intel
|
||||||
pip install --pre --upgrade ipex-llm[xpu_2.6] --extra-index-url https://download.pytorch.org/whl/xpu
|
pip install --pre --upgrade ipex-llm[xpu_2.6] --extra-index-url https://download.pytorch.org/whl/xpu
|
||||||
pip uninstall torch torchvision torchaudio
|
pip uninstall torch torchvision torchaudio
|
||||||
pip install torch==2.7+xpu torchvision torchaudio --index-url https://download.pytorch.org/whl/test/xpu # install torch2.7
|
pip install torch==2.7+xpu torchvision torchaudio --index-url https://download.pytorch.org/whl/test/xpu # install torch2.7
|
||||||
pip install packaging ninja cpufeature numpy
|
|
||||||
pip uninstall intel-opencl-rt dpcpp-cpp-rt
|
pip uninstall intel-opencl-rt dpcpp-cpp-rt
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ class KGQACache(nn.Module):
|
||||||
self.v_caches = []
|
self.v_caches = []
|
||||||
|
|
||||||
|
|
||||||
def load(self, inference_context: "sched_ext.InferenceContext"):
|
def load(self, inference_context: "sched_ext.InferenceContext"):
|
||||||
print(self.config.num_hidden_layers)
|
print(self.config.num_hidden_layers)
|
||||||
for i in range(self.config.num_hidden_layers):
|
for i in range(self.config.num_hidden_layers):
|
||||||
self.k_caches.append(
|
self.k_caches.append(
|
||||||
|
|
6
setup.py
6
setup.py
|
@ -229,7 +229,7 @@ class VersionInfo:
|
||||||
elif torch.xpu.is_available():
|
elif torch.xpu.is_available():
|
||||||
backend_version = f"xpu"
|
backend_version = f"xpu"
|
||||||
else:
|
else:
|
||||||
raise ValueError("Unsupported backend: CUDA_HOME MUSA_HOME ROCM_HOME all not set.")
|
raise ValueError("Unsupported backend: CUDA_HOME MUSA_HOME ROCM_HOME all not set and XPU is not available.")
|
||||||
package_version = f"{flash_version}+{backend_version}torch{torch_version}{cpu_instruct}"
|
package_version = f"{flash_version}+{backend_version}torch{torch_version}{cpu_instruct}"
|
||||||
if full_version:
|
if full_version:
|
||||||
return package_version
|
return package_version
|
||||||
|
@ -501,7 +501,7 @@ class CMakeBuild(BuildExtension):
|
||||||
elif KTRANSFORMERS_BUILD_XPU:
|
elif KTRANSFORMERS_BUILD_XPU:
|
||||||
cmake_args += ["-DKTRANSFORMERS_USE_XPU=ON", "-DKTRANSFORMERS_USE_CUDA=OFF"]
|
cmake_args += ["-DKTRANSFORMERS_USE_XPU=ON", "-DKTRANSFORMERS_USE_CUDA=OFF"]
|
||||||
else:
|
else:
|
||||||
raise ValueError("Unsupported backend: CUDA_HOME, MUSA_HOME, and ROCM_HOME are not set.")
|
raise ValueError("Unsupported backend: CUDA_HOME, MUSA_HOME, and ROCM_HOME are not set and XPU is not available.")
|
||||||
|
|
||||||
cmake_args = get_cmake_abi_args(cmake_args)
|
cmake_args = get_cmake_abi_args(cmake_args)
|
||||||
# log cmake_args
|
# log cmake_args
|
||||||
|
@ -628,7 +628,7 @@ elif MUSA_HOME is not None:
|
||||||
elif torch.xpu.is_available(): #XPUExtension is not available now.
|
elif torch.xpu.is_available(): #XPUExtension is not available now.
|
||||||
ops_module = None
|
ops_module = None
|
||||||
else:
|
else:
|
||||||
raise ValueError("Unsupported backend: CUDA_HOME and MUSA_HOME are not set.")
|
raise ValueError("Unsupported backend: CUDA_HOME ROCM_HOME MUSA_HOME are not set and XPU is not available.")
|
||||||
|
|
||||||
if not torch.xpu.is_available():
|
if not torch.xpu.is_available():
|
||||||
ext_modules = [
|
ext_modules = [
|
||||||
|
|
Loading…
Add table
Reference in a new issue