Improve Model Card: Update pipeline_tag, add library_name, and correct language tag
Browse filesThis PR enhances the model card by:
* **Updating the `pipeline_tag`**: Changed from `translation` to `text-generation`. While the model is used for translation, it functions as a large language model (LLM) for text generation, making `text-generation` a more accurate and discoverable primary pipeline tag on the Hugging Face Hub.
* **Adding `library_name`**: Added `library_name: transformers` to the metadata. Evidence from the `Quickstart` code snippet (using `transformers.AutoModelForCausalLM` and `AutoTokenizer`) confirms compatibility with the Hugging Face Transformers library, enabling the automated "how to use" widget.
* **Correcting `language` tag**: Corrected `false` to `no` (Norwegian) in the `language` metadata, aligning with the "Support Languages" table in the model card and GitHub README, which lists Norwegian as a supported language.
These changes improve the model's discoverability and usability for users.
|
@@ -1,4 +1,6 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
- zh
|
|
@@ -60,10 +62,9 @@ language:
|
|
| 60 |
- ur
|
| 61 |
- uz
|
| 62 |
- yue
|
| 63 |
-
base_model:
|
| 64 |
-
- Qwen/Qwen3-4B-Base
|
| 65 |
license: apache-2.0
|
| 66 |
-
pipeline_tag:
|
|
|
|
| 67 |
---
|
| 68 |
|
| 69 |
## LMT
|
|
@@ -95,7 +96,9 @@ model_name = "NiuTrans/LMT-60-8B"
|
|
| 95 |
tokenizer = AutoTokenizer.from_pretrained(model_name, padding_side='left')
|
| 96 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 97 |
|
| 98 |
-
prompt = "Translate the following text from English into Chinese
|
|
|
|
|
|
|
| 99 |
messages = [{"role": "user", "content": prompt}]
|
| 100 |
text = tokenizer.apply_chat_template(
|
| 101 |
messages,
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model:
|
| 3 |
+
- Qwen/Qwen3-4B-Base
|
| 4 |
language:
|
| 5 |
- en
|
| 6 |
- zh
|
|
|
|
| 62 |
- ur
|
| 63 |
- uz
|
| 64 |
- yue
|
|
|
|
|
|
|
| 65 |
license: apache-2.0
|
| 66 |
+
pipeline_tag: text-generation
|
| 67 |
+
library_name: transformers
|
| 68 |
---
|
| 69 |
|
| 70 |
## LMT
|
|
|
|
| 96 |
tokenizer = AutoTokenizer.from_pretrained(model_name, padding_side='left')
|
| 97 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 98 |
|
| 99 |
+
prompt = "Translate the following text from English into Chinese.
|
| 100 |
+
English: The concept came from China where plum blossoms were the flower of choice.
|
| 101 |
+
Chinese: "
|
| 102 |
messages = [{"role": "user", "content": prompt}]
|
| 103 |
text = tokenizer.apply_chat_template(
|
| 104 |
messages,
|