Translation
Transformers
PyTorch
TensorFlow
Safetensors
marian
text2text-generation
opus-mt-tc
Eval Results (legacy)
Instructions to use Helsinki-NLP/opus-mt-tc-base-gmw-gmw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Helsinki-NLP/opus-mt-tc-base-gmw-gmw 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-tc-base-gmw-gmw")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-tc-base-gmw-gmw") model = AutoModelForSeq2SeqLM.from_pretrained("Helsinki-NLP/opus-mt-tc-base-gmw-gmw") - Notebooks
- Google Colab
- Kaggle
Add TF weights
Browse files- config.json +4 -1
- tf_model.h5 +3 -0
config.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"activation_dropout": 0.0,
|
| 3 |
"activation_function": "swish",
|
| 4 |
"architectures": [
|
|
@@ -18,6 +19,7 @@
|
|
| 18 |
"decoder_layerdrop": 0.0,
|
| 19 |
"decoder_layers": 6,
|
| 20 |
"decoder_start_token_id": 35451,
|
|
|
|
| 21 |
"dropout": 0.1,
|
| 22 |
"encoder_attention_heads": 8,
|
| 23 |
"encoder_ffn_dim": 2048,
|
|
@@ -35,9 +37,10 @@
|
|
| 35 |
"num_hidden_layers": 6,
|
| 36 |
"pad_token_id": 35451,
|
| 37 |
"scale_embedding": true,
|
|
|
|
| 38 |
"static_position_embeddings": true,
|
| 39 |
"torch_dtype": "float16",
|
| 40 |
-
"transformers_version": "4.
|
| 41 |
"use_cache": true,
|
| 42 |
"vocab_size": 35452
|
| 43 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "/tmp/Helsinki-NLP/opus-mt-tc-base-gmw-gmw",
|
| 3 |
"activation_dropout": 0.0,
|
| 4 |
"activation_function": "swish",
|
| 5 |
"architectures": [
|
|
|
|
| 19 |
"decoder_layerdrop": 0.0,
|
| 20 |
"decoder_layers": 6,
|
| 21 |
"decoder_start_token_id": 35451,
|
| 22 |
+
"decoder_vocab_size": 35452,
|
| 23 |
"dropout": 0.1,
|
| 24 |
"encoder_attention_heads": 8,
|
| 25 |
"encoder_ffn_dim": 2048,
|
|
|
|
| 37 |
"num_hidden_layers": 6,
|
| 38 |
"pad_token_id": 35451,
|
| 39 |
"scale_embedding": true,
|
| 40 |
+
"share_encoder_decoder_embeddings": true,
|
| 41 |
"static_position_embeddings": true,
|
| 42 |
"torch_dtype": "float16",
|
| 43 |
+
"transformers_version": "4.22.0.dev0",
|
| 44 |
"use_cache": true,
|
| 45 |
"vocab_size": 35452
|
| 46 |
}
|
tf_model.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1f6daeba663e3a4f79b6533c42eefbae22dc7581fad3598d466492caa0ed9512
|
| 3 |
+
size 251827856
|