mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2025-09-10 06:14:58 +00:00
add XPU support for qwen3moe local chat
This commit is contained in:
parent
25893366b6
commit
adc0906967
9 changed files with 223 additions and 25 deletions
|
@ -459,9 +459,10 @@ class GGUFLoader(ModelLoader):
|
|||
if "cuda" in device.lower():
|
||||
values = GGML_DEQUANTIZE_GPU[ggml_name](data, device)
|
||||
else:
|
||||
values = GGML_DEQUANTIZE[ggml_name](data)
|
||||
values = torch.from_numpy(values).to(device)
|
||||
|
||||
np_values = np.copy(GGML_DEQUANTIZE[ggml_name](data))
|
||||
values = torch.from_numpy(np_values).to(device)
|
||||
del np_values
|
||||
|
||||
if ggml_name == "BF16":
|
||||
values = values.view(torch.bfloat16)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue