Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'GenerationConfig' object has no attribute 'alignment_heads' #585

Closed
ben-8878 opened this issue Nov 27, 2023 · 2 comments
Closed

Comments

@ben-8878
Copy link

ben-8878 commented Nov 27, 2023

command:
ct2-transformers-converter --model models/whisper-large-v2-finetune --output_dir models/whisper-large-v2-finetune-fast --copy_files tokenizer.json preprocessor_config.json --quantization float16

Errror:
Traceback (most recent call last):
File "/home/ybZhang/miniconda3/envs/whisper/bin/ct2-transformers-converter", line 8, in
sys.exit(main())
File "/home/ybZhang/miniconda3/envs/whisper/lib/python3.9/site-packages/ctranslate2/converters/transformers.py", line 1955, in main
converter.convert_from_args(args)
File "/home/ybZhang/miniconda3/envs/whisper/lib/python3.9/site-packages/ctranslate2/converters/converter.py", line 50, in convert_from_args
return self.convert(
File "/home/ybZhang/miniconda3/envs/whisper/lib/python3.9/site-packages/ctranslate2/converters/converter.py", line 89, in convert
model_spec = self._load()
File "/home/ybZhang/miniconda3/envs/whisper/lib/python3.9/site-packages/ctranslate2/converters/transformers.py", line 141, in _load
spec = loader(model, tokenizer)
File "/home/ybZhang/miniconda3/envs/whisper/lib/python3.9/site-packages/ctranslate2/converters/transformers.py", line 194, in call
self.set_config(spec.config, model, tokenizer)
File "/home/ybZhang/miniconda3/envs/whisper/lib/python3.9/site-packages/ctranslate2/converters/transformers.py", line 918, in set_config
config.alignment_heads = gen_config.alignment_heads
AttributeError: 'GenerationConfig' object has no attribute 'alignment_heads'

@minhthuc2502
Copy link
Collaborator

Created MR for ctranslate2. The MR will be merged soon. OpenNMT/CTranslate2#1565

@ben-8878
Copy link
Author

it work, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants