Downloads · 30 days
4
3% of all-time downloads
chinesemusk/t5-en-de-translator
t5-en-de-translator is a machine learning model from chinesemusk. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
python from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
Downloads · 30 days
4
3% of all-time downloads
All-time downloads
123
Public
Parameters
60.5M
243 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors242 MB · 99%
From the Hugging Face model README
# T5 English ↔ German Translator
This repository hosts a fine-tuned **T5 model** for **English ↔ German translation**. The model, training notebook, and interactive demo are maintained by [@chinesemusk](https://huggingface.co/chinesemusk).
---
## Model Information
- **Architecture**: T5-small (Text-to-Text Transfer Transformer)
- **Task**: English ↔ German Translation (seq2seq)
- **Tokenizer**: SentencePiece (`spiece.model` + `tokenizer.json`)
- **Training Code**: Available in this [Google Colab / GitHub notebook](https://github.com/Deon62/Eng-German-Translator-model/blob/main/translator.ipynb)
- **Demo**: Interactive UI hosted via Gradio in my Hugging Face Space: [Kahnwald Translator Demo](https://huggingface.co/spaces/chinesemusk/Kahnwald)
---
## Use the Model
Load and run translations with just a few lines:
```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_id = "chinesemusk/t5-en-de-translator"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
text = "This is an example."
inputs = tokenizer(f"translate English to German: {text}", return_tensors="pt", truncation=True)
outputs = model.generate(**inputs, max_length=60)
print("EN:", text)
print("DE:", tokenizer.decode(outputs[0], skip_special_tokens=True))
Don't want to code? Try the model directly in your browser via this Gradio app:
Enter text, select the direction (English → German or German → English), and get translations instantly.
Purpose: Educational and prototyping usage—learn how translation fine-tuning works and test small-scale translation tasks.
Limitations:
transformers, datasets, and evaluate libraries.
---
### Summary of Inclusions:
- Clear breakdown of model architecture and task.
- GitHub link to your code/notebook for transparency and reproducibility.
- Live demo link via Hugging Face Space for interactive testing.
- Usage snippet for quick adoption.
- Caveats and purpose for better user awareness.
- Proper acknowledgments and references.