kvcache-ai / kvcache-ai/ktransformers

[question] 请问 KExpertsCPU 的weights_cpu dtype为什么是torch.float32, 而不是torch.bfloat16等其他类型?

Open
#1,380 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
19.5k
Forks
1.6k
Avg merge
19h 32m
Merged PRs (30d)
27

Description

1.请问 KExpertsCPU 的weights_cpu dtype为什么是torch.float32, 而不是torch.bfloat16等其他类型?
2.另外KExpertsCPU.forward() 内部weights: weights = weights.contiguous().to(torch.float32).cpu(), 也是使用的torch.float32, 请问这个是为什么?
请帮忙解答,谢谢。

Contributor guide

Open the contributing guide

Research direction

Start by locating KExpertsCPU and reading KExpertsCPU.forward(), focusing on weights_cpu and the conversion to torch.float32 on CPU. Document the rationale for using torch.float32 instead of torch.bfloat16 or other dtypes, addressing both questions in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.