Views
No views yet

1model = AutoModel.from_pretrained("ubaada/original-transformer", trust_remote_code=True)
2tokenizer = AutoTokenizer.from_pretrained("ubaada/original-transformer")
3text = 'This is my cat'
4output = model.generate(**tokenizer(text, return_tensors="pt", add_special_tokens=True, truncation=True, max_length=100))
5tokenizer.decode(output[0], skip_special_tokens=True, clean_up_tokenization_spaces=True)
6# Output: ' Das ist meine Katze.'trust_remote_code=True because of custom modeling file)| Parameter | Value |
|---|---|
| Dataset | WMT14-de-en |
| Translation Pairs | 4.5M (135M tokens total) |
| Epochs | 24 |
| Batch Size | 16 |
| Accumulation Batch | 8 |
| Effective Batch Size | 128 (16 * 8) |
| Training Script | train.py |
| Optimiser | Adam (learning rate = 0.0001) |
| Loss Type | Cross Entropy |
| Final Test Loss | 1.87 |
| GPU. | RTX 4070 (12GB) |

