Translation
Transformers
PyTorch
English
Chinese
mbart
text2text-generation
fine tune
fine_tune
mbart-50
Instructions to use Normal1919/mbart-large-50-one-to-many-lil-fine-tune with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Normal1919/mbart-large-50-one-to-many-lil-fine-tune 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="Normal1919/mbart-large-50-one-to-many-lil-fine-tune")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Normal1919/mbart-large-50-one-to-many-lil-fine-tune") model = AutoModelForSeq2SeqLM.from_pretrained("Normal1919/mbart-large-50-one-to-many-lil-fine-tune", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
dcc5339
1
Parent(s): 89390d1
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,46 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- zh
|
| 6 |
+
library_name: transformers
|
| 7 |
+
tags:
|
| 8 |
+
- translation
|
| 9 |
+
- fine tune
|
| 10 |
+
- fine_tune
|
| 11 |
+
widget:
|
| 12 |
+
- text: >-
|
| 13 |
+
I {i}should{/i} say that I feel a little relieved to find out that
|
| 14 |
+
{i}this{/i} is why you’ve been hanging out with Kaori lately, though. She’s
|
| 15 |
+
really pretty and I got jealous and...I’m sorry.
|
| 16 |
---
|
| 17 |
+
|
| 18 |
+
# Normal1919/mbart-large-50-one-to-many-lil-fine-tune
|
| 19 |
+
|
| 20 |
+
* base model: mbart-large-50
|
| 21 |
+
* pretrained_ckpt: facebook/mbart-large-50-one-to-many-mmt
|
| 22 |
+
* This model was trained for [rpy dl translate](https://github.com/O5-7/rpy_dl_translate)
|
| 23 |
+
|
| 24 |
+
## Model description
|
| 25 |
+
* source group: English
|
| 26 |
+
* target group: Chinese
|
| 27 |
+
* model: transformer
|
| 28 |
+
* source language(s): eng
|
| 29 |
+
* target language(s): cjy_Hans cjy_Hant cmn cmn_Hans cmn_Hant gan lzh lzh_Hans nan wuu yue yue_Hans yue_Hant
|
| 30 |
+
* fine_tune: On the basis of mbart-large-50-one-to-many-mmt checkpoints, train English original text with renpy text features (including but not limited to {i} [text] {/i}) to Chinese with the same reserved flag, as well as training for English name retention for LIL
|
| 31 |
+
|
| 32 |
+
## How to use
|
| 33 |
+
```python
|
| 34 |
+
>>> from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
|
| 35 |
+
>>> mode_name = 'Normal1919/mbart-large-50-one-to-many-lil-fine-tune'
|
| 36 |
+
>>> model = MBartForConditionalGeneration.from_pretrained(mode_name)
|
| 37 |
+
>>> tokenizer = MBart50TokenizerFast.from_pretrained(mode_name, src_lang="en_XX", tgt_lang="zh_CN")
|
| 38 |
+
>>> translation = pipeline("Marian-NMT-en-zh-lil-fine-tune", model=model, tokenizer=tokenizer)
|
| 39 |
+
>>> translation('I {i} should {/i} say that I feel a little relieved to find out that {i}this {/i} is why you’ve been hanging out with Kaori lately, though. She’s really pretty and I got jealous and...I’m sorry', max_length=400)
|
| 40 |
+
[{'我{i}应该{/i}说发现{i}这{/i}是你最近和Kaori出去的原因,我有点松了一口气。她很漂亮,我嫉妒,而且......我很抱歉。'}]
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## Contact
|
| 44 |
+
|
| 45 |
+
517205163@qq.com or
|
| 46 |
+
a4564563@gmail.com
|