Downloads · 30 days
12
100% of all-time downloads
gperdrizet/english-french-LSTM
english-french-LSTM is a machine learning model from gperdrizet. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for tf-keras. The card lists the license as mit.
This model was trained for English-to-French neural machine translation using the OPUS-100 dataset. It is one of three models trained in the gperdrizet/language-models demo repository. The demo is intended to introduc…
Downloads · 30 days
12
100% of all-time downloads
All-time downloads
12
Public
Repo size
3.1 GB
Likes
0
Public
Click a slice to open those files.
.data-00000-of-00001509 MB · 97%
From the Hugging Face model README
This model was trained for English-to-French neural machine translation using the OPUS-100 dataset. It is one of three models trained in the gperdrizet/language-models demo repository. The demo is intended to introduce students to the encoder-decoder architecture for machine translation, then walk them through the major advances which led to modern transformer models:
Recurrent only encoder-decoder
Recurrent + attention encoder-decoder
Transformer encoder-decoder
import tensorflow as tf
from huggingface_hub import snapshot_download
from transformers import MarianTokenizer
# Download all model files to cache
model_path = snapshot_download(repo_id='{{repo_id}}')
# Load inference models (SavedModel format)
encoder_model = tf.keras.models.load_model(os.path.join(model_path, 'encoder_model'))
decoder_model = tf.keras.models.load_model(os.path.join(model_path, 'decoder_model'))
# Load tokenizer
tokenizer = MarianTokenizer.from_pretrained(model_path)
Models are saved in TensorFlow SavedModel format for:
Load the training model to continue training or fine-tune:
# Load training model
training_model = tf.keras.models.load_model(os.path.join(model_path, 'training_model'))
# Continue training with new data
training_model.fit(new_encoder_input, new_decoder_target, epochs=5)
This model can be fine-tuned for other European language pairs (e.g., English-German, English-Spanish) with minimal additional training.
See the accompanying fine-tuning notebook for a complete example.
If you use this model, please cite:
@misc{english-french-lstm-test,
author = {George Perdrizet},
title = {English-French Neural Machine Translation},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/{{repo_id}}}},
}