Instructions to use SoMiyagawa/ainu-2-japanese with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SoMiyagawa/ainu-2-japanese 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="SoMiyagawa/ainu-2-japanese")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("SoMiyagawa/ainu-2-japanese") model = AutoModelForSeq2SeqLM.from_pretrained("SoMiyagawa/ainu-2-japanese", device_map="auto") - Notebooks
- Google Colab
- Kaggle
「.」がコーパスにないので,「.」を使わないようにしてください(.を使うといつも「そう言って」みたいなエラー翻訳が出ます)。英数字しか対応していません。(カタカナ表記でもいつか学習させてみます。)
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("SoMiyagawa/ainu-2-japanese")
model = AutoModelForSeq2SeqLM.from_pretrained("SoMiyagawa/ainu-2-japanese")
Model Trained Using AutoTrain
- Problem type: Translation
- Model ID: 40582105303
- CO2 Emissions (in grams): 52.2078
Validation Metrics
- Loss: 1.638
- SacreBLEU: 10.448
- Gen len: 14.110
- Downloads last month
- 6