Run this model with HF Jobs
Run Helsinki-NLP/opus-mt-pt-ca on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Helsinki-NLP/opus-mt-pt-ca. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Helsinki-NLP/opus-mt-pt-ca on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Helsinki-NLP/opus-mt-pt-ca with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Helsinki-NLP/opus-mt-pt-ca 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="Helsinki-NLP/opus-mt-pt-ca")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-pt-ca") model = AutoModelForSeq2SeqLM.from_pretrained("Helsinki-NLP/opus-mt-pt-ca", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Joao Gante commited on
Commit ·
2a765a8
1
Parent(s): 6031180
Add TF weights
Browse filesFiles changed (2)
- config.json+7
- tf_model.h5Added+3
123459 unmodified lines15161718192021222324252627281 unmodified line3031323334353615 unmodified lines525354555657585960{ "_name_or_path": "/tmp/Helsinki-NLP/opus-mt-pt-ca", "activation_dropout": 0.0, "activation_function": "swish", "add_bias_logits": false,9 unmodified lines ], "bos_token_id": 0, "classif_dropout": 0.0, "classifier_dropout": 0.0, "d_model": 512, "decoder_attention_heads": 8, "decoder_ffn_dim": 2048, "decoder_layerdrop": 0.0, "decoder_layers": 6, "decoder_start_token_id": 20553, "decoder_vocab_size": 20554, "dropout": 0.1, "encoder_attention_heads": 8, "encoder_ffn_dim": 2048,1 unmodified line "encoder_layers": 6, "eos_token_id": 0, "extra_pos_embeddings": 20554, "forced_eos_token_id": 0, "id2label": { "0": "LABEL_0", "1": "LABEL_1",15 unmodified lines "num_hidden_layers": 6, "pad_token_id": 20553, "scale_embedding": true, "share_encoder_decoder_embeddings": true, "static_position_embeddings": true, "transformers_version": "4.22.0.dev0", "use_cache": true, "vocab_size": 20554}123version https://git-lfs.github.com/spec/v1oid sha256:22f97ef54b49255da966e11be8a12a3cf350e35780a17db68fe7fb860a6d5418size 221197568config.json+7
tf_model.h5Added+3