Downloads · 30 days
11
3% of all-time downloads
kd13/nano-translate-v1
nano-translate-v1 is a translation model from kd13. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as mit.
This model is a custom LSTM-based sequence-to-sequence (seq2seq) model for English-to-Hindi machine translation, implemented in PyTorch and wrapped in the Hugging Face PreTrainedModel API.
Downloads · 30 days
11
3% of all-time downloads
All-time downloads
346
Public
Parameters
220M
880 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors880 MB · 100%
From the Hugging Face model README
This model is a custom LSTM-based sequence-to-sequence (seq2seq) model for English-to-Hindi machine translation, implemented in PyTorch and wrapped in the Hugging Face PreTrainedModel API.
The architecture is strongly inspired by the 2014 seq2seq paper, especially the idea of reversing the source sequence before encoding. In preprocessing, the English input tokens are reversed while preserving BOS/EOS token positions when present. The target Hindi sequence is kept in normal order.
Encoder:
Decoder:
Vocabulary / Tokenization:
kd13/nano-translate-v152000Special tokens:
pad_token_id, bos_token_id, and eos_token_idDuring training:
This model does not include:
It is a pure recurrent encoder-decoder baseline in the spirit of early neural machine translation systems.
This model has several important limitations:
No attention mechanism
The decoder relies only on the final encoder hidden and cell states. This can make translation harder for long or information-dense sentences.
Performance may degrade on long sequences
Although LSTMs are stronger than vanilla RNNs, fixed-size context transfer from encoder to decoder can still bottleneck long-sentence translation quality.
No explicit attention/alignment interpretability
Because the model has no attention layer, it does not provide token-to-token alignment information.
The model was trained on:
cfilt/iitb-english-hinditrainvalidationtestThe source language is English (en) and the target language is Hindi (hi).
DataCollatorForSeq2Seqfp16243211AdamW0.0051e-5(0.9, 0.98)8% of total training stepsmax_grad_norm = 3.0ignore_index = -100)The best checkpoint is selected based on lowest validation loss across training epochs.
The training script records:
train_loss for each epochval_loss for each epochbest_epochbest_val_loss



