mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-16 00:28:10 +08:00
parent
a655dcebaf
commit
a7ff095399
@ -4,7 +4,6 @@ import torch
|
|||||||
from typing import TYPE_CHECKING, Tuple
|
from typing import TYPE_CHECKING, Tuple
|
||||||
from transformers import InfNanRemoveLogitsProcessor, LogitsProcessorList
|
from transformers import InfNanRemoveLogitsProcessor, LogitsProcessorList
|
||||||
from transformers.utils import (
|
from transformers.utils import (
|
||||||
is_torch_bf16_cpu_available,
|
|
||||||
is_torch_bf16_gpu_available,
|
is_torch_bf16_gpu_available,
|
||||||
is_torch_cuda_available,
|
is_torch_cuda_available,
|
||||||
is_torch_npu_available,
|
is_torch_npu_available,
|
||||||
@ -13,7 +12,7 @@ from transformers.utils import (
|
|||||||
|
|
||||||
_is_fp16_available = is_torch_npu_available() or is_torch_cuda_available()
|
_is_fp16_available = is_torch_npu_available() or is_torch_cuda_available()
|
||||||
try:
|
try:
|
||||||
_is_bf16_available = is_torch_bf16_gpu_available() or is_torch_bf16_cpu_available()
|
_is_bf16_available = is_torch_bf16_gpu_available()
|
||||||
except:
|
except:
|
||||||
_is_bf16_available = False
|
_is_bf16_available = False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user