Instructions to use larryvrh/mt5-translation-ja_zh with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use larryvrh/mt5-translation-ja_zh 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="larryvrh/mt5-translation-ja_zh")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("larryvrh/mt5-translation-ja_zh") model = AutoModelForSeq2SeqLM.from_pretrained("larryvrh/mt5-translation-ja_zh") - Notebooks
- Google Colab
- Kaggle
Demo Usage is too slow to use
#2
by ASleepingForest - opened
It will cost more than 1 minute to finish the translation in my computer (Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz 1.80 GHz, 8GB RAM), any improvement idea?
You may want to try run it on a gpu or use fp16?