Convert LaBSE model from TensorFlow to PyTorch.
Project description
LaBSE
Project
This project is an implementation to convert Google's LaBSE model from TensorFlow to PyTorch. It also offers extensions to convert the smaller-LaBSE model from TensorFlow to PyTorch.
The models are uploaded to the HuggingFace Model Hub in the PyTorch, HF-compatible TensorFlow and Flax formats, alongwith a compatible tokenizer.
Export
To convert and export the models:
poetry install
poetry run convert_labse --output_path /path/to/models
To update the models on the HuggingFace Model Hub:
# Clone the already uploaded models.
cd /path/to/model
git clone https://huggingface.co/setu4993/LaBSE.git
# Export models anew and update.
cd /path/to/repo
poetry install
poetry run convert_labse --output_path /path/to/model/LaBSE --huggingface_path
Model Cards
See the model-cards
directory for a copy of the model cards.
License
This repository and the conversion code is licensed under the MIT license, but the model is distributed with an Apache-2.0 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for convert_labse_tf_pt-2.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84178413dffabb56c9d4956f0aa9ca6f1d4c417383b079b610ea5832276baa5e |
|
MD5 | f69fe62e077f3d922f51ed684c65200c |
|
BLAKE2b-256 | 3e6b5e2538dea2bc400ea5c6241051e857ca4ab59fedfeb8a7bc4a8dbf40f159 |
Hashes for convert_labse_tf_pt-2.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80c032d3fcea3b1d4ad57dcc7f311e6cae2a84749008249b883fbc688218d221 |
|
MD5 | 0cdd0ec15c02e5ce7e696bd02dcfc3cf |
|
BLAKE2b-256 | 9fc39ddbe98d0197ef34d1be5a8136394029c24849c6c7ee2f93764d566df6c4 |