Update README.md
Browse files
README.md
CHANGED
|
@@ -9,23 +9,6 @@ This is a translation model based on the MT5 architecture. It has been fine-tune
|
|
| 9 |
## Model Details
|
| 10 |
|
| 11 |
- **Architecture:** MT5
|
| 12 |
-
- **Model Size:** 582M parameters
|
| 13 |
- **File Format:** safetensors
|
| 14 |
-
- **Tensor Type:** F32
|
| 15 |
|
| 16 |
-
## Example Usage
|
| 17 |
|
| 18 |
-
You can use the model with the Hugging Face Transformers library:
|
| 19 |
-
|
| 20 |
-
```python
|
| 21 |
-
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 22 |
-
|
| 23 |
-
tokenizer = AutoTokenizer.from_pretrained("TristanN01/VEC-MT5")
|
| 24 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("TristanN01/VEC-MT5")
|
| 25 |
-
|
| 26 |
-
input_text = "Translate this sentence from English to Thai."
|
| 27 |
-
inputs = tokenizer(input_text, return_tensors="pt")
|
| 28 |
-
|
| 29 |
-
outputs = model.generate(**inputs)
|
| 30 |
-
translated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 31 |
-
print(translated_text)
|
|
|
|
| 9 |
## Model Details
|
| 10 |
|
| 11 |
- **Architecture:** MT5
|
|
|
|
| 12 |
- **File Format:** safetensors
|
|
|
|
| 13 |
|
|
|
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|