mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #1327] [Bug] failed to run the model on two A770 cards with ktransformers 0.3.1 #894
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#894
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @luningxie on GitHub (May 20, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1327
Checklist
Describe the bug
I followed the tutorial which stress the new feature of using intel arc display card.
the compilation of ktransformers is ok. when i download the deepseek-R1-q4-k-m gguf and run the command:
"python ~/ktransformers/ktransformers/local_chat.py --model_path /home/deepseek/documents/deepseek --gguf_path /home/deepseek/documents/deepseek/DeepSeek-R1-Q4_K_M --optimize_config_path ktransformers/optimize/optimize_rules/xpu/DeepSeek-V3-Chat.yaml --cpu_infer 33 --device xpu --max_new_tokens 200"
there is a wrong message:
Traceback (most recent call last):
File "/home/deepseek/ktransformers/ktransformers/local_chat.py", line 190, in
fire.Fire(local_chat)
File "/home/deepseek/miniconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 135, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/deepseek/miniconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 468, in _Fire
component, remaining_args = _CallAndUpdateTrace(
^^^^^^^^^^^^^^^^^^^^
File "/home/deepseek/miniconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 684, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/deepseek/ktransformers/ktransformers/local_chat.py", line 77, in local_chat
config = AutoConfig.from_pretrained(model_path, trust_remote_code=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/deepseek/miniconda3/envs/ktransformers/lib/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 1123, in from_pretrained
config_class = get_class_from_dynamic_module(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/deepseek/miniconda3/envs/ktransformers/lib/python3.11/site-packages/transformers/dynamic_module_utils.py", line 570, in get_class_from_dynamic_module
return get_class_in_module(class_name, final_module, force_reload=force_download)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/deepseek/miniconda3/envs/ktransformers/lib/python3.11/site-packages/transformers/dynamic_module_utils.py", line 269, in get_class_in_module
return getattr(module, class_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
"AttributeError: module 'transformers_modules.deepseek.configuration_deepseek' has no attribute 'DeepseekV3Config'. Did you mean: 'DeepseekV2Config'?
Reproduction
"python ~/ktransformers/ktransformers/local_chat.py --model_path /home/deepseek/documents/deepseek --gguf_path /home/deepseek/documents/deepseek/DeepSeek-R1-Q4_K_M --optimize_config_path ktransformers/optimize/optimize_rules/xpu/DeepSeek-V3-Chat.yaml --cpu_infer 33 --device xpu --max_new_tokens 200"
using the model of DeepSeek-R1-Q4_K_M, with gguf form.
Environment
ubuntu 22.04.05
intel 8480, one cpu
384g ddr5
@aubreyli commented on GitHub (May 21, 2025):
It looks like your environment was messed up.
Can you please check if this folder
/home/deepseek/documents/deepseek/has
configuration_deepseek.pyand this file has the following line?
class DeepseekV3Config(PretrainedConfig):@luningxie commented on GitHub (May 21, 2025):
Problem solved. I copy the configuration_deepseek_v3.py to the model path, and rename it to configuration_deepseek.py.
It worked but very slowly.
prompt eval count: 6 token(s)
prompt eval duration: 6.846642971038818s
prompt eval rate: 0.8763418839539168 tokens/s
eval count: 77 token(s)
eval duration: 64.9632203578949s
eval rate: 1.1852860676516983 tokens/s
I have already used the Best Known Config (BKC) to obtain best performance
echo "performance" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo 0 | sudo tee /sys/devices/system/cpu/cpu*/power/energy_perf_bias
sudo xpu-smi config -d 0 -t 0 --frequencyrange 2400,2400
@aubreyli commented on GitHub (May 21, 2025):
Can you please close this ticket and file a new one for another issue? Thanks!