muyaostudio / qwen2_seq_cls

使用 Qwen2ForSequenceClassification 简单实现文本分类任务。
Apache License 2.0
19 stars 2 forks source link

请问qwen2的环境应该怎么配,老是弹出probability tensor contains either `inf`, `nan` or element < 0 #1

Open luosting opened 4 months ago

muyaostudio commented 4 months ago
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Fri_Dec_17_18:16:03_PST_2021
Cuda compilation tools, release 11.6, V11.6.55
Build cuda_11.6.r11.6/compiler.30794723_0

$ pip list
Package                       Version      
----------------------------- ------------
absl-py                       2.0.0
accelerate                    0.27.2
addict                        2.4.0
aiofiles                      23.2.1
aiohttp                       3.9.3
aioprometheus                 23.12.0
aiosignal                     1.3.1
aliyun-python-sdk-core        2.14.0
aliyun-python-sdk-kms         2.16.2
altair                        5.1.2
annotated-types               0.6.0
anyio                         3.7.1
asttokens                     2.4.1
async-timeout                 4.0.3
attrs                         23.1.0
autoawq                       0.2.4+cu121
autoawq_kernels               0.0.6
backcall                      0.2.0
backports.zoneinfo            0.2.1
beautifulsoup4                4.12.2
bitsandbytes                  0.43.0
blessed                       1.20.0
blinker                       1.6.3
cachetools                    5.3.1
certifi                       2022.12.7
cffi                          1.16.0
charset-normalizer            2.1.1
click                         8.1.7
cmake                         3.25.0
colorama                      0.4.6
comm                          0.2.2
contourpy                     1.1.1
crcmod                        1.7
cryptography                  42.0.5
cupy-cuda12x                  12.1.0
cycler                        0.12.1
datasets                      2.17.1
debugpy                       1.6.7
decorator                     5.1.1
deepspeed                     0.14.0
dill                          0.3.8
distro                        1.9.0
einops                        0.6.1
entrypoints                   0.4
evaluate                      0.4.2
exceptiongroup                1.1.3
executing                     2.0.1
fastapi                       0.104.1
fastrlock                     0.8.2
ffmpy                         0.3.1
filelock                      3.9.0
fonttools                     4.44.0
frozenlist                    1.4.1
fsspec                        2023.9.2
gast                          0.5.4
gitdb                         4.0.10
GitPython                     3.1.37
google                        3.0.0
google-auth                   2.23.3
google-auth-oauthlib          1.0.0
gpustat                       1.1.1
gradio                        4.1.2
gradio_client                 0.7.0
grpcio                        1.59.0
h11                           0.14.0
hjson                         3.1.0
httpcore                      1.0.1
httptools                     0.6.1
httpx                         0.25.1
huggingface-hub               0.21.3
idna                          3.4
importlib-metadata            6.8.0
importlib-resources           6.1.0
ipykernel                     6.29.4
ipython                       8.12.0
jedi                          0.19.1
Jinja2                        3.1.2
jmespath                      0.10.0
jsonschema                    4.19.1
jsonschema-specifications     2023.7.1
jupyter-client                7.3.4
jupyter_core                  5.7.2
kiwisolver                    1.4.5
lit                           15.0.7
Markdown                      3.5
markdown-it-py                3.0.0
MarkupSafe                    2.1.2
matplotlib                    3.7.3
matplotlib-inline             0.1.7
mdurl                         0.1.2
modelscope                    1.12.0
mpmath                        1.3.0
msgpack                       1.0.8
multidict                     6.0.5
multiprocess                  0.70.16
nest_asyncio                  1.6.0
networkx                      3.0
ninja                         1.11.1.1
numpy                         1.24.1
nvidia-cublas-cu11            11.10.3.66
nvidia-cublas-cu12            12.1.3.1
nvidia-cuda-cupti-cu11        11.7.101
nvidia-cuda-cupti-cu12        12.1.105
nvidia-cuda-nvrtc-cu11        11.7.99
nvidia-cuda-nvrtc-cu12        12.1.105
nvidia-cuda-runtime-cu11      11.7.99
nvidia-cuda-runtime-cu12      12.1.105
nvidia-cudnn-cu11             8.5.0.96
nvidia-cudnn-cu12             8.9.2.26
nvidia-cufft-cu11             10.9.0.58
nvidia-cufft-cu12             11.0.2.54
nvidia-curand-cu11            10.2.10.91
nvidia-curand-cu12            10.3.2.106
nvidia-cusolver-cu11          11.4.0.1
nvidia-cusolver-cu12          11.4.5.107
nvidia-cusparse-cu11          11.7.4.91
nvidia-cusparse-cu12          12.1.0.106
nvidia-ml-py                  12.535.108
nvidia-nccl-cu11              2.14.3
nvidia-nccl-cu12              2.18.1
nvidia-nvjitlink-cu12         12.3.101
nvidia-nvtx-cu11              11.7.91
nvidia-nvtx-cu12              12.1.105
oauthlib                      3.2.2
openai                        1.11.1
orjson                        3.9.10
oss2                          2.18.4
packaging                     23.1
pandas                        2.0.3
parso                         0.8.4
pexpect                       4.9.0
pickleshare                   0.7.5
Pillow                        9.3.0
pip                           23.2.1
pkgutil_resolve_name          1.3.10
platformdirs                  4.2.0
prompt_toolkit                3.0.47
protobuf                      4.24.4
psutil                        5.9.0
ptyprocess                    0.7.0
pure-eval                     0.2.2
py                            1.11.0
py-cpuinfo                    9.0.0
pyarrow                       13.0.0
pyarrow-hotfix                0.6
pyasn1                        0.5.0
pyasn1-modules                0.3.0
pycparser                     2.21
pycryptodome                  3.9.9
pydantic                      2.4.2
pydantic_core                 2.10.1
pydeck                        0.8.1b0
pydub                         0.25.1
Pygments                      2.16.1
pynvml                        11.5.0
pyparsing                     3.1.1
python-dateutil               2.8.2
python-dotenv                 1.0.1
python-multipart              0.0.6
pytz                          2020.5
PyYAML                        6.0.1
pyzmq                         25.1.2
quantile-python               1.1
ray                           2.9.3
referencing                   0.30.2
regex                         2023.8.8
requests                      2.28.1
requests-oauthlib             1.3.1
retry                         0.9.2
rich                          13.6.0
rpds-py                       0.10.4
rsa                           4.9
safetensors                   0.4.2
scipy                         1.10.1
semantic-version              2.10.0
sentencepiece                 0.1.99
setuptools                    68.0.0
shellingham                   1.5.4
simplejson                    3.19.2
six                           1.16.0
smmap                         5.0.1
sniffio                       1.3.0
sortedcontainers              2.4.0
soupsieve                     2.5
stack-data                    0.6.2
starlette                     0.27.0
streamlit                     1.27.2
sympy                         1.12
tenacity                      8.2.3
tensorboard                   2.14.0
tensorboard-data-server       0.7.1
tiktoken                      0.5.1
tinyec                        0.4.0
tokenizers                    0.15.2
toml                          0.10.2
tomli                         2.0.1
tomlkit                       0.12.0
toolz                         0.12.0
torch                         2.1.2
torchaudio                    2.0.1+cu117
torchvision                   0.15.1+cu117
tornado                       6.1
tqdm                          4.66.1
traitlets                     5.14.3
transformers                  4.38.2
transformers-stream-generator 0.0.4
triton                        2.1.0
typer                         0.9.0
typing_extensions             4.12.2
tzdata                        2023.3
tzlocal                       5.1
urllib3                       1.26.13
uvicorn                       0.24.0.post1
uvloop                        0.19.0
validators                    0.22.0
vllm                          0.3.2
volcengine                    1.0.108
watchdog                      3.0.0
watchfiles                    0.21.0
wcwidth                       0.2.13
websockets                    11.0.3
Werkzeug                      3.0.0
wheel                         0.41.2
xformers                      0.0.23.post1
xxhash                        3.4.1
yapf                          0.40.2
yarl                          1.9.4
zipp                          3.17.0
zstandard                     0.22.0