Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,38 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- ja
|
| 6 |
+
base_model:
|
| 7 |
+
- utter-project/EuroLLM-9B
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
# Description
|
| 12 |
+
|
| 13 |
+
This is a sentence-based English-to-Japanese translation model fine-tuned from [utter-project/EuroLLM-9B](https://huggingface.co/utter-project/EuroLLM-9B).
|
| 14 |
+
|
| 15 |
+
Training data: [WMT2025 en-ja parallel corpus](https://www2.statmt.org/wmt25/mtdata/)
|
| 16 |
+
|
| 17 |
+
# Example
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
import transformers
|
| 21 |
+
import torch
|
| 22 |
+
|
| 23 |
+
model_id = "Systran/EuroLLM-9B-cpt-ft-wmt25-en-ja"
|
| 24 |
+
|
| 25 |
+
pipeline = transformers.pipeline(
|
| 26 |
+
"text-generation",
|
| 27 |
+
model=model_id,
|
| 28 |
+
model_kwargs={"torch_dtype": torch.bfloat16},
|
| 29 |
+
device_map="auto",
|
| 30 |
+
)
|
| 31 |
+
|
| 32 |
+
messages = "Please translate the following English text into Japanese.\nInput: Hello World!\nOutput: "
|
| 33 |
+
|
| 34 |
+
outputs = pipeline(
|
| 35 |
+
messages,
|
| 36 |
+
max_new_tokens=256,
|
| 37 |
+
)
|
| 38 |
+
print(outputs[0]["generated_text"][len(messages):].split("\n")[0])
|