Closed Jingyao711 closed 4 months ago
Please try to load the model with:
from transformers.models.bert.configuration_bert import BertConfig
config = BertConfig.from_pretrained("zhihan1996/DNABERT-2-117M")
model = AutoModel.from_pretrained("zhihan1996/DNABERT-2-117M", trust_remote_code=True, config=config)
Hi, I am really excited about this newest DNABERT model and it's application on my project, but when I am trying to run on my computer, I encountered some issues My environment:
packages in environment at /home/tangji19/miniconda3/envs/dnabert2:
#
Name Version Build Channel
_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
accelerate 0.31.0 pypi_0 pypi aiohttp 3.9.5 pypi_0 pypi aiosignal 1.3.1 pypi_0 pypi antlr4-python3-runtime 4.9.3 pypi_0 pypi apscheduler 3.6.3 pypi_0 pypi async-timeout 4.0.3 pypi_0 pypi attrs 23.2.0 pypi_0 pypi backports-zoneinfo 0.2.1 pypi_0 pypi ca-certificates 2024.3.11 h06a4308_0
cachetools 4.2.2 pypi_0 pypi certifi 2024.6.2 pypi_0 pypi charset-normalizer 3.3.2 pypi_0 pypi cmake 3.29.3 pypi_0 pypi datasets 2.19.2 pypi_0 pypi dill 0.3.8 pypi_0 pypi einops 0.8.0 pypi_0 pypi evaluate 0.4.2 pypi_0 pypi filelock 3.14.0 pypi_0 pypi frozenlist 1.4.1 pypi_0 pypi fsspec 2024.3.1 pypi_0 pypi huggingface-hub 0.23.3 pypi_0 pypi idna 3.7 pypi_0 pypi jinja2 3.1.4 pypi_0 pypi joblib 1.4.2 pypi_0 pypi ld_impl_linux-64 2.38 h1181459_1
libffi 3.4.4 h6a678d5_1
libgcc-ng 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libstdcxx-ng 11.2.0 h1234567_1
markupsafe 2.1.5 pypi_0 pypi mpmath 1.3.0 pypi_0 pypi multidict 6.0.5 pypi_0 pypi multiprocess 0.70.16 pypi_0 pypi ncurses 6.4 h6a678d5_0
networkx 3.1 pypi_0 pypi numpy 1.24.4 pypi_0 pypi nvidia-cublas-cu11 11.10.3.66 pypi_0 pypi nvidia-cublas-cu12 12.1.3.1 pypi_0 pypi nvidia-cuda-cupti-cu12 12.1.105 pypi_0 pypi nvidia-cuda-nvrtc-cu11 11.7.99 pypi_0 pypi nvidia-cuda-nvrtc-cu12 12.1.105 pypi_0 pypi nvidia-cuda-runtime-cu11 11.7.99 pypi_0 pypi nvidia-cuda-runtime-cu12 12.1.105 pypi_0 pypi nvidia-cudnn-cu11 8.5.0.96 pypi_0 pypi nvidia-cudnn-cu12 8.9.2.26 pypi_0 pypi nvidia-cufft-cu12 11.0.2.54 pypi_0 pypi nvidia-curand-cu12 10.3.2.106 pypi_0 pypi nvidia-cusolver-cu12 11.4.5.107 pypi_0 pypi nvidia-cusparse-cu12 12.1.0.106 pypi_0 pypi nvidia-nccl-cu12 2.20.5 pypi_0 pypi nvidia-nvjitlink-cu12 12.5.40 pypi_0 pypi nvidia-nvtx-cu12 12.1.105 pypi_0 pypi omegaconf 2.3.0 pypi_0 pypi openssl 3.0.13 h7f8727e_2
packaging 24.0 pypi_0 pypi pandas 2.0.3 pypi_0 pypi peft 0.11.1 pypi_0 pypi pip 24.0 py38h06a4308_0
protobuf 5.27.1 pypi_0 pypi psutil 5.9.8 pypi_0 pypi pyarrow 16.1.0 pypi_0 pypi pyarrow-hotfix 0.6 pypi_0 pypi python 3.8.19 h955ad1f_0
python-dateutil 2.9.0.post0 pypi_0 pypi python-telegram-bot 13.15 pypi_0 pypi pytz 2024.1 pypi_0 pypi pyyaml 6.0.1 pypi_0 pypi readline 8.2 h5eee18b_0
regex 2024.5.15 pypi_0 pypi requests 2.32.3 pypi_0 pypi safetensors 0.4.3 pypi_0 pypi scikit-learn 1.3.2 pypi_0 pypi scipy 1.10.1 pypi_0 pypi sentencepiece 0.2.0 pypi_0 pypi setuptools 69.5.1 py38h06a4308_0
six 1.16.0 pypi_0 pypi sqlite 3.45.3 h5eee18b_0
sympy 1.12.1 pypi_0 pypi threadpoolctl 3.5.0 pypi_0 pypi tk 8.6.14 h39e8969_0
tokenizers 0.13.3 pypi_0 pypi torch 1.13.1 pypi_0 pypi tornado 6.1 pypi_0 pypi tqdm 4.66.4 pypi_0 pypi transformers 4.29.2 pypi_0 pypi typing-extensions 4.12.2 pypi_0 pypi tzdata 2024.1 pypi_0 pypi tzlocal 5.2 pypi_0 pypi urllib3 2.2.1 pypi_0 pypi wheel 0.43.0 py38h06a4308_0
xxhash 3.4.1 pypi_0 pypi xz 5.4.6 h5eee18b_1
yarl 1.9.4 pypi_0 pypi zlib 1.2.13 h5eee18b_1
I do not have docker in my computer so I cused run_mlm.py. However, if when use transformers=4.29.2, I faced this issue: After uninstalled triton, this issue still exists
I can solve this issue by update transformers=4.42.0.dev0, which is required by https://github.com/huggingface/transformers. However, if I use transformers=4.42.0.dev0, I encountered another issue:
ValueError: The model class you are passing has a config_class attribute that is not consistent with the config class you passed (model has <class 'transformers.models.bert.configuration_bert.BertConfig'> and you passed <class 'transformers_modules.zhihan1996.DNABERT-2-117M.1d020b803b871a976f5f3d5565f0eac8f2c7bb81.configuration_bert.BertConfig'>. Fix one of those so they match!
Can you tell me how to solve this issues? Thank you very much!