mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2025-09-11 15:54:37 +00:00
revert using FP16
This commit is contained in:
parent
495ae37478
commit
5b5deda420
1 changed files with 3 additions and 2 deletions
|
@ -79,8 +79,9 @@ def local_chat(
|
|||
if mode == 'long_context':
|
||||
assert config.architectures[0] == "LlamaForCausalLM", "only LlamaForCausalLM support long_context mode"
|
||||
torch.set_default_dtype(torch.float16)
|
||||
elif xpu_fp16_model(config):
|
||||
torch.set_default_dtype(torch.float16)
|
||||
# elif xpu_fp16_model(config):
|
||||
# # using FP16 may cause accuracy issues, triggering core dumped during runtime
|
||||
# torch.set_default_dtype(torch.float16)
|
||||
else:
|
||||
torch.set_default_dtype(config.torch_dtype)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue