Metadata-Version: 2.1
Name: convert-labse-tf-pt
Version: 2.1.0
Summary: Convert LaBSE model from TensorFlow to PyTorch.
Home-page: https://github.com/setu4993/convert-labse-tf-pt
License: MIT
Keywords: transformers,bert,labse,pytorch,tensorflow
Author: Setu Shah
Author-email: setu+labse@setu.me
Requires-Python: >=3.8,<3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: ipywidgets (>=7.6.3,<8.0.0)
Requires-Dist: loguru (>=0.6.0,<0.7.0)
Requires-Dist: tensorflow-hub (>=0.12.0,<0.13.0)
Requires-Dist: transformers[flax,sentencepiece,tf,torch] (>=4.22.0,<5.0.0)
Project-URL: Repository, https://github.com/setu4993/convert-labse-tf-pt
Description-Content-Type: text/markdown

# LaBSE

## Project

This project is an implementation to convert Google's [LaBSE](https://tfhub.dev/google/LaBSE/2) model from TensorFlow to PyTorch. It also offers extensions to convert the [smaller-LaBSE model](https://tfhub.dev/jeongukjae/smaller_LaBSE_15lang/1) from TensorFlow to PyTorch.

The models are uploaded to the [HuggingFace Model Hub](https://huggingface.co/setu4993/) in the PyTorch, HF-compatible TensorFlow and Flax formats, alongwith a compatible tokenizer.

- [LaBSE](https://huggingface.co/setu4993/LaBSE)
- [smaller-LaBSE](https://huggingface.co/setu4993/smaller-LaBSE)

## Export

To convert and export the models:

```shell
poetry install
poetry run convert_labse --output_path /path/to/models
```

To update the models on the [HuggingFace Model Hub](https://huggingface.co/setu4993/LaBSE):

```shell
# 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](https://github.com/setu4993/convert-labse-tf-pt/tree/main/model-cards) 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.

