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

Exception when exporting bloomz model #1324

Open
jordimas opened this issue Jun 30, 2023 · 2 comments
Open

Exception when exporting bloomz model #1324

jordimas opened this issue Jun 30, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@jordimas
Copy link
Contributor

jordimas commented Jun 30, 2023

Operaring system: Ubuntu 22.04.2, Python 3.10.6, CTranslate2 3.16.

When exporting the bigscience/bloomz model using:

ct2-transformers-converter --force --model bigscience/bloomz --output_dir bloomz --quantization float16

The conversion process works well for other bloom models like bloomz-7b1.

Error:

Traceback (most recent call last):
File "/home/ubuntu/bloom-ctranslate2/generate/python3-env/bin/ct2-transformers-converter", line 8, in
sys.exit(main())
File "/home/ubuntu/bloom-ctranslate2/generate/python3-env/lib/python3.10/site-packages/ctranslate2/converters/transformers.py", line 1577, in main
converter.convert_from_args(args)
File "/home/ubuntu/bloom-ctranslate2/generate/python3-env/lib/python3.10/site-packages/ctranslate2/converters/converter.py", line 50, in convert_from_args
return self.convert(
File "/home/ubuntu/bloom-ctranslate2/generate/python3-env/lib/python3.10/site-packages/ctranslate2/converters/converter.py", line 104, in convert
model_spec.save(output_dir)
File "/home/ubuntu/bloom-ctranslate2/generate/python3-env/lib/python3.10/site-packages/ctranslate2/specs/model_spec.py", line 571, in save
super().save(output_dir)
File "/home/ubuntu/bloom-ctranslate2/generate/python3-env/lib/python3.10/site-packages/ctranslate2/specs/model_spec.py", line 324, in save
self._serialize(os.path.join(output_dir, "model.bin"))
File "/home/ubuntu/bloom-ctranslate2/generate/python3-env/lib/python3.10/site-packages/ctranslate2/specs/model_spec.py", line 363, in _serialize
model.write(struct.pack("I", value.nbytes))
struct.error: 'I' format requires 0 <= number <= 4294967295

@guillaumekln
Copy link
Collaborator

Bloomz has 176B parameters and CTranslate2 does not really support these large models at this time.

The error means the number of bytes used by a weight cannot be represented by a 32-bit integer.

This is not the only issue with these models. Some functional changes are also required, for example splitting the models on multiple GPUs (see #1052).

@aflah02
Copy link

aflah02 commented Jan 16, 2024

@guillaumekln Is there any update on this? Does CTranslate2 now support such larger models as well without any quantization?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants