Translation
Transformers
PyTorch
Safetensors
English
Welsh
marian
text2text-generation
welsh
cymraeg
legislation
nmt
mt-models-api-name:legislation
Instructions to use techiaith/mt-dspec-legislation-en-cy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use techiaith/mt-dspec-legislation-en-cy with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="techiaith/mt-dspec-legislation-en-cy")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("techiaith/mt-dspec-legislation-en-cy") model = AutoModelForSeq2SeqLM.from_pretrained("techiaith/mt-dspec-legislation-en-cy", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "_from_model_config": true, | |
| "bos_token_id": 0, | |
| "decoder_start_token_id": 50000, | |
| "eos_token_id": 0, | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "pad_token_id": 50000, | |
| "transformers_version": "5.2.0", | |
| "use_cache": true | |
| } | |