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.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a8c298f693584b03a150f5450cf918729909ea9b7765efbbe907daaeda12734 |
|
MD5 | a353542a0d863e9817804eec8ac368c3 |
|
BLAKE2b-256 | 1fc5ba7f0edb7aab2fb7f82db060547668cb1ed0d7219c0a9e5036d4cf486b6e |
Hashes for convert_labse_tf_pt-2.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d2e8ab226a79b3f8f89a9b879228d2541ac4d7a5b9132a9b153fb853469d346 |
|
MD5 | 0d75639c3f6215693c93c5f964d541b3 |
|
BLAKE2b-256 | c7bdff9fdb0a0b1e62e673d08301a221beddeeb667f61633d2a48b2af43dc4df |