Your model has some issues.
Your code has some issues. First, the GitHub version of the code cannot be configured properly—there are numerous conflicts after installing the requirements.txt. Second, the Hugging Face (HF) code fails to run, and no detailed environment configuration instructions are provided here. Despite my best efforts to set it up, I'm still encountering errors. How should I proceed?
My environment configuration and error messages are as follows:
root@bb9a5dbb2a79:/home/Share_Space/HyperRT# /usr/bin/python3 /home/Share_Space/HyperRT/test.py
Traceback (most recent call last):
File "/home/Share_Space/HyperRT/test.py", line 21, in
model = AutoModelForCausalLM.from_pretrained(
File "/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py", line 553, in from_pretrained
model_class = get_class_from_dynamic_module(
File "/usr/local/lib/python3.10/dist-packages/transformers/dynamic_module_utils.py", line 552, in get_class_from_dynamic_module
return get_class_in_module(class_name, final_module, force_reload=force_download)
File "/usr/local/lib/python3.10/dist-packages/transformers/dynamic_module_utils.py", line 249, in get_class_in_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/root/.cache/huggingface/modules/transformers_modules/chandar-lab/NovoMolGen_300M_SMILES_AtomWise/500f1c025a03cd79e474e9eb492a990db32d9326/modeling_novomolgen.py", line 137, in
class NovoMolGen(GPTLMHeadModel):
TypeError: NoneType takes no arguments
root@bb9a5dbb2a79:/home/Share_Space/HyperRT# pip list
Package Version
absl-py 2.1.0
aiohappyeyeballs 2.3.5
aiohttp 3.10.1
aiosignal 1.3.1
annotated-types 0.7.0
anyio 4.4.0
apex 0.1
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
asciitree 0.3.3
asttokens 2.4.1
astunparse 1.6.3
async-lru 2.0.4
async-timeout 4.0.3
attrs 24.2.0
audioread 3.0.1
babel 2.16.0
beautifulsoup4 4.12.3
black 24.8.0
bleach 6.1.0
blis 0.7.11
cachetools 5.4.0
catalogue 2.0.10
certifi 2024.7.4
cffi 1.17.0
charset-normalizer 3.3.2
click 8.1.7
cloudpathlib 0.18.1
cloudpickle 3.0.0
cmake 3.30.2
comm 0.2.2
confection 0.1.5
contourpy 1.2.1
cuda-python 12.5.0
cudf 24.6.0
cugraph 24.6.0
cugraph-dgl 24.6.0
cugraph-equivariant 24.6.0
cugraph-pyg 24.6.0
cugraph-service-client 24.6.0
cugraph-service-server 24.6.0
cuml 24.6.0
cupy-cuda12x 13.2.0
cycler 0.12.1
cymem 2.0.8
Cython 3.0.11
dask 2024.5.1
dask-cuda 24.6.0
dask-cudf 24.6.0
dask-expr 1.1.1
debugpy 1.8.5
decorator 5.1.1
defusedxml 0.7.1
distributed 2024.5.1
distributed-ucxx 0.38.0
dm-tree 0.1.8
einops 0.8.0
entrypoints 0.4
exceptiongroup 1.2.2
execnet 2.1.1
executing 2.0.1
expecttest 0.1.3
fasteners 0.19
fastjsonschema 2.20.0
fastrlock 0.8.2
filelock 3.15.4
flash_attn 2.4.2
fonttools 4.53.1
fqdn 1.5.1
frozenlist 1.4.1
fsspec 2024.6.1
gast 0.6.0
grpcio 1.62.1
h11 0.14.0
hf-xet 1.1.10
httpcore 1.0.5
httpx 0.27.0
huggingface-hub 0.35.3
hypothesis 5.35.1
idna 3.7
igraph 0.11.6
importlib_metadata 7.2.1
iniconfig 2.0.0
intel-openmp 2021.4.0
ipykernel 6.29.5
ipython 8.26.0
isoduration 20.11.0
isort 5.13.2
jedi 0.19.1
Jinja2 3.1.4
joblib 1.4.2
json5 0.9.25
jsonpointer 3.0.0
jsonschema 4.23.0
jsonschema-specifications 2023.12.1
jupyter_client 8.6.2
jupyter_core 5.7.2
jupyter-events 0.10.0
jupyter-lsp 2.2.5
jupyter_server 2.14.2
jupyter_server_terminals 0.5.3
jupyterlab 4.2.4
jupyterlab_code_formatter 3.0.2
jupyterlab_pygments 0.3.0
jupyterlab_server 2.27.3
jupyterlab-tensorboard-pro 4.0.0
jupytext 1.16.4
kiwisolver 1.4.5
kvikio 24.6.0
langcodes 3.4.0
language_data 1.2.0
lazy_loader 0.4
librmm 24.6.0
librosa 0.10.1
lightning 2.5.5
lightning-thunder 0.2.0.dev0
lightning-utilities 0.11.6
lintrunner 0.12.5
llvmlite 0.42.0
locket 1.0.0
looseversion 1.3.0
marisa-trie 1.2.0
Markdown 3.7
markdown-it-py 3.0.0
MarkupSafe 2.1.5
matplotlib 3.9.2
matplotlib-inline 0.1.7
mdit-py-plugins 0.4.1
mdurl 0.1.2
mistune 3.0.2
mkl 2021.1.1
mkl-devel 2021.1.1
mkl-include 2021.1.1
mock 5.1.0
mpmath 1.3.0
msgpack 1.0.8
multidict 6.0.5
murmurhash 1.0.10
mypy-extensions 1.0.0
nbclient 0.10.0
nbconvert 7.16.4
nbformat 5.10.4
nest-asyncio 1.6.0
networkx 3.3
ninja 1.11.1.1
notebook 7.2.1
notebook_shim 0.2.4
numba 0.59.1
numcodecs 0.11.0
numpy 1.24.4
nvfuser 0.2.6a0+1d02b13
nvidia-cudnn-frontend 1.5.2
nvidia-dali-cuda120 1.40.0
nvidia-modelopt 0.15.0
nvidia-nvimgcodec-cu12 0.3.0.5
nvidia-pyindex 1.0.9
nvtx 0.2.5
nx-cugraph 24.6.0
onnx 1.16.0
opencv 4.7.0
opt-einsum 3.3.0
optree 0.12.1
overrides 7.7.0
packaging 23.2
pandas 2.2.2
pandocfilters 1.5.1
parso 0.8.4
partd 1.4.2
pathspec 0.12.1
pexpect 4.9.0
pillow 10.4.0
pip 24.2
platformdirs 4.2.2
pluggy 1.5.0
ply 3.11
polygraphy 0.49.12
pooch 1.8.2
preshed 3.0.9
prometheus_client 0.20.0
prompt_toolkit 3.0.47
protobuf 3.20.3
psutil 6.0.0
ptyprocess 0.7.0
PuLP 2.9.0
pure_eval 0.2.3
pyarrow 16.1.0
pybind11 2.13.4
pybind11_global 2.13.4
pycocotools 2.0+nv0.8.0
pycparser 2.22
pydantic 2.8.2
pydantic_core 2.20.1
Pygments 2.18.0
pylibcugraph 24.6.0
pylibcugraphops 24.6.0
pylibraft 24.6.0
pylibwholegraph 24.6.0
pynvjitlink 0.2.3
pynvml 11.4.1
pyparsing 3.1.2
pytest 8.1.1
pytest-flakefinder 1.1.0
pytest-rerunfailures 14.0
pytest-shard 0.1.2
pytest-xdist 3.6.1
python-dateutil 2.9.0.post0
python-hostlist 1.23.0
python-json-logger 2.0.7
pytorch-lightning 2.5.5
pytorch-triton 3.0.0+dedb7bdf3
pytz 2023.4
PyYAML 6.0.2
pyzmq 26.1.0
raft-dask 24.6.0
rapids-dask-dependency 24.6.0a0
referencing 0.35.1
regex 2024.7.24
requests 2.32.3
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rich 13.7.1
rmm 24.6.0
rpds-py 0.20.0
safetensors 0.6.2
scikit-learn 1.5.1
scipy 1.14.0
Send2Trash 1.8.3
setuptools 70.3.0
shellingham 1.5.4
six 1.16.0
smart-open 7.0.4
sniffio 1.3.1
sortedcontainers 2.4.0
soundfile 0.12.1
soupsieve 2.6
soxr 0.4.0
spacy 3.7.5
spacy-legacy 3.0.12
spacy-loggers 1.0.5
srsly 2.4.8
stack-data 0.6.3
sympy 1.13.1
tabulate 0.9.0
tbb 2021.13.1
tblib 3.0.0
tensorboard 2.16.2
tensorboard-data-server 0.7.2
tensorrt 10.3.0
terminado 0.18.1
texttable 1.7.0
thinc 8.2.5
threadpoolctl 3.5.0
thriftpy2 0.5.0
tinycss2 1.3.0
tokenizers 0.20.3
tomli 2.0.1
toolz 0.12.1
torch 2.5.0a0+872d972e41.nv24.8
torch_tensorrt 2.5.0a0
torchmetrics 1.8.2
torchvision 0.20.0a0
tornado 6.2
tqdm 4.66.5
traitlets 5.14.3
transformer_engine 1.9.0+ba36f90
transformers 4.46.2
treelite 4.1.2
typer 0.12.4
types-dataclasses 0.6.6
types-python-dateutil 2.9.0.20240316
typing_extensions 4.12.2
tzdata 2024.1
ucx-py 0.38.0
ucxx 0.38.0
uri-template 1.3.0
urllib3 2.0.7
wasabi 1.1.3
wcwidth 0.2.13
weasel 0.4.1
webcolors 24.8.0
webencodings 0.5.1
websocket-client 1.8.0
Werkzeug 3.0.3
wheel 0.44.0
wrapt 1.16.0
xdoctest 1.0.2
xgboost 2.0.3
yarl 1.9.4
zarr 2.18.2
zict 3.0.0
zipp 3.19.2
Hello. This is a problem with Flash attention not installed properly. We have provided detailed installation instructions in the GitHub repository: https://github.com/chandar-lab/NovoMolGen/tree/main. Ensure that you properly set the CUDA environment variables before building Flash Attention. If you do not wish to use the flash attention variant, you can always use the HuggingFace implementation by changing the revision flag to "hf-checkpoint" while loading the model.