Instructions to use Nextcloud-AI/opus-mt-ar-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Nextcloud-AI/opus-mt-ar-it 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="Nextcloud-AI/opus-mt-ar-it")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Nextcloud-AI/opus-mt-ar-it") model = AutoModelForSeq2SeqLM.from_pretrained("Nextcloud-AI/opus-mt-ar-it", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 293 Bytes
59a2e7b a9cd988 59a2e7b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | {
"bad_words_ids": [
[
63293
]
],
"bos_token_id": 0,
"decoder_start_token_id": 63293,
"eos_token_id": 0,
"forced_eos_token_id": 0,
"max_length": 512,
"num_beams": 4,
"pad_token_id": 63293,
"renormalize_logits": true,
"transformers_version": "4.32.0.dev0"
}
|