Improve model card: Add pipeline tag, paper, and project page links
Browse filesThis PR improves the model card for the `Unbabel/Tower-Plus-2B` model by:
- Adding the `pipeline_tag: text-generation` to the metadata, which enhances discoverability on the Hugging Face Hub (e.g., at https://huggingface.co/models?pipeline_tag=text-generation).
- Including a direct link to the research paper "[Tower+: Bridging Generality and Translation Specialization in Multilingual LLMs](https://huggingface.co/papers/2506.17080)", providing users with easy access to its technical details and findings.
- Adding a link to the official project page ([Unbabel Tower+ Collection](https://huggingface.co/collections/Unbabel/tower-plus-6846ca452a10c0905dc03c0f)), offering further context and related resources for the Tower+ models.
README.md
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
---
|
| 2 |
base_model: google/gemma-2-2B
|
| 3 |
-
license: cc-by-nc-sa-4.0
|
| 4 |
language:
|
| 5 |
- de
|
| 6 |
- nl
|
|
@@ -25,8 +24,14 @@ language:
|
|
| 25 |
- ro
|
| 26 |
- fi
|
| 27 |
library_name: transformers
|
|
|
|
|
|
|
| 28 |
---
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |

|
| 31 |
|
| 32 |
# Model Description:
|
|
@@ -71,7 +76,9 @@ sampling_params = SamplingParams(
|
|
| 71 |
max_tokens=8192,
|
| 72 |
)
|
| 73 |
llm = LLM(model="Unbabel/Tower-Plus-2B", tensor_parallel_size=1)
|
| 74 |
-
messages = [{"role": "user", "content": "Translate the following English source text to Portuguese (Portugal)
|
|
|
|
|
|
|
| 75 |
outputs = llm.chat(messages, sampling_params)
|
| 76 |
# Make sure your prompt_token_ids look like this
|
| 77 |
print (outputs[0].outputs[0].text)
|
|
@@ -89,7 +96,9 @@ from transformers import pipeline
|
|
| 89 |
|
| 90 |
pipe = pipeline("text-generation", model="Unbabel/Tower-Plus-2B", device_map="auto")
|
| 91 |
# We use the tokenizer’s chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
|
| 92 |
-
messages = [{"role": "user", "content": "Translate the following English source text to Portuguese (Portugal)
|
|
|
|
|
|
|
| 93 |
input_ids = pipe.tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True)
|
| 94 |
outputs = pipe(messages, max_new_tokens=256, do_sample=False)
|
| 95 |
print(outputs[0]["generated_text"])
|
|
|
|
| 1 |
---
|
| 2 |
base_model: google/gemma-2-2B
|
|
|
|
| 3 |
language:
|
| 4 |
- de
|
| 5 |
- nl
|
|
|
|
| 24 |
- ro
|
| 25 |
- fi
|
| 26 |
library_name: transformers
|
| 27 |
+
license: cc-by-nc-sa-4.0
|
| 28 |
+
pipeline_tag: text-generation
|
| 29 |
---
|
| 30 |
|
| 31 |
+
This repository contains the model presented in the paper [Tower+: Bridging Generality and Translation Specialization in Multilingual LLMs](https://huggingface.co/papers/2506.17080).
|
| 32 |
+
|
| 33 |
+
You can find the official project page and other related models in the [Unbabel Tower+ Collection](https://huggingface.co/collections/Unbabel/tower-plus-6846ca452a10c0905dc03c0f).
|
| 34 |
+
|
| 35 |

|
| 36 |
|
| 37 |
# Model Description:
|
|
|
|
| 76 |
max_tokens=8192,
|
| 77 |
)
|
| 78 |
llm = LLM(model="Unbabel/Tower-Plus-2B", tensor_parallel_size=1)
|
| 79 |
+
messages = [{"role": "user", "content": "Translate the following English source text to Portuguese (Portugal):
|
| 80 |
+
English: Hello world!
|
| 81 |
+
Portuguese (Portugal): "}]
|
| 82 |
outputs = llm.chat(messages, sampling_params)
|
| 83 |
# Make sure your prompt_token_ids look like this
|
| 84 |
print (outputs[0].outputs[0].text)
|
|
|
|
| 96 |
|
| 97 |
pipe = pipeline("text-generation", model="Unbabel/Tower-Plus-2B", device_map="auto")
|
| 98 |
# We use the tokenizer’s chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
|
| 99 |
+
messages = [{"role": "user", "content": "Translate the following English source text to Portuguese (Portugal):
|
| 100 |
+
English: Hello world!
|
| 101 |
+
Portuguese (Portugal): "}]
|
| 102 |
input_ids = pipe.tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True)
|
| 103 |
outputs = pipe(messages, max_new_tokens=256, do_sample=False)
|
| 104 |
print(outputs[0]["generated_text"])
|