Safetensors support for ct2-transformers-converter
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 536
- Avg merge
- 12h 12m
- Merged PRs (30d)
- 4
Description
Hi,
Is there any way to leverage the "ct2-transformers-converter" utility to convert models to the safetensor format instead of the current .bin format? I'm specifically running the following command:
ct2-transformers-converter --model Helsinki-NLP/opus-mt-gaa-de --output_dir ./ct2-opus-mt-gaa-de --force --copy_files generation_config.json tokenizer_config.json vocab.json source.spm target.spm --quantization float16
Even if there isn't a current way to do this within the CTranslate2 package, if there are other ways to convert the model weights to safetensor format and still have it work with CTranslate2; that would still be really helpful!
Thanks again for the support! :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ct2-transformers-converter entry point and trace how it reads model weights from the referenced Hugging Face model. Determine whether safetensors input can be supported while preserving CTranslate2 conversion, and define completion as a working conversion path or a documented compatible alternative.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100