alphageometry icon indicating copy to clipboard operation
alphageometry copied to clipboard

AttributeError: "DecoderOnlyLanguageModel" object has no attribute "num_heads" when I use "alphageometry" mode?

Open blablakhonluong opened this issue 2 years ago • 2 comments

How to fix this problem when I use alphageometry mode? Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/content/alphageometry/alphageometry.py", line 645, in app.run(main) File "/usr/local/lib/python3.10/dist-packages/absl/app.py", line 308, in run _run_main(main, args) File "/usr/local/lib/python3.10/dist-packages/absl/app.py", line 254, in _run_main sys.exit(main(argv)) File "/content/alphageometry/alphageometry.py", line 631, in main model = get_lm(_CKPT_PATH.value, _VOCAB_PATH.value) File "/content/alphageometry/alphageometry.py", line 203, in get_lm return lm.LanguageModelInference(vocab_path, ckpt_init, mode='beam_search') File "/content/alphageometry/lm_inference.py", line 66, in init self.n = imodel.num_heads File "/usr/local/lib/python3.10/dist-packages/flax/linen/module.py", line 718, in getattr raise AttributeError( AttributeError: "DecoderOnlyLanguageModel" object has no attribute "num_heads"

blablakhonluong avatar Jan 19 '24 09:01 blablakhonluong

what's your DATA path and gin_search_paths?

Make sure to copy 3 files in your DATA folder: ag_ckpt_vocab

khangich avatar Jan 20 '24 01:01 khangich

what's your DATA path and gin_search_paths?

Make sure to copy 3 files in your DATA folder: ag_ckpt_vocab

3 files are checkpoint_10999999, geometry.757.model and geometry.757.vocab? I download and copy to ag_ckpt_vocab folder, but have the same error

asyvn avatar Jan 20 '24 04:01 asyvn