You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running command: /home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/bin/python -m spacy quantize-transformer --max-mse-loss 0.000003 models/hu_core_news_trf_xl-3.5.0 models/hu_core_news_trf_xl-3.5.0-quantized
Traceback (most recent call last):
File "/home/a100/anaconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/a100/anaconda3/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/lib/python3.8/site-packages/spacy/__main__.py", line 4, in <module>
setup_cli()
File "/home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/lib/python3.8/site-packages/spacy/cli/_util.py", line 74, in setup_cli
command(prog_name=COMMAND)
File "/home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/lib/python3.8/site-packages/typer/main.py", line 497, in wrapper
return callback(**use_params) # type: ignore
File "/home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/lib/python3.8/site-packages/curated_transformers/cli/quantize.py", line 43, in quantize_cli
nlp_quantize_dynamic(
File "/home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/lib/python3.8/site-packages/curated_transformers/cli/quantize.py", line 75, in nlp_quantize_dynamic
quantize_dynamic(
File "/home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/lib/python3.8/site-packages/curated_transformers/cli/quantize.py", line 108, in quantize_dynamic
quantized_model = torch.quantization.quantize_dynamic(
File "/home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/lib/python3.8/site-packages/torch/ao/quantization/quantize.py", line 447, in quantize_dynamic
model = copy.deepcopy(model)
File "/home/a100/anaconda3/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/a100/anaconda3/lib/python3.8/copy.py", line 272, in _reconstruct
y.__setstate__(state)
File "/home/a100/gszabo/roberta/hu_core_news_trf_xl/.venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1237, in __setstate__
self.__dict__.update(state)
ValueError: dictionary update sequence element #0 has length 12; 2 is required
My spacy environment:
## Info about spaCy
- **spaCy version:** 3.5.1
- **Platform:** Linux-5.4.0-136-generic-x86_64-with-glibc2.10
- **Python version:** 3.8.5
In principle the torch.quantization.quantize_dynamic() function is the source of the error. Have you ever encountered something similar or do you know a solution to this?
The text was updated successfully, but these errors were encountered:
I tried the quantization in our own project and got this error:
We have 3 separated config, one tagger, one parser and one ner. After that we use an assemble step to merge these together. And I tried to quantize this assembled model and got that error.
config files: https://gist.github.com/SzaboGergo01/5ca9abeaaf199a686d8b41335e9fe261
My spacy environment:
In principle the
torch.quantization.quantize_dynamic()
function is the source of the error. Have you ever encountered something similar or do you know a solution to this?The text was updated successfully, but these errors were encountered: