Instructions to use BubbleSheep/Hgn_trans_en2zh with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BubbleSheep/Hgn_trans_en2zh 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="BubbleSheep/Hgn_trans_en2zh")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("BubbleSheep/Hgn_trans_en2zh") model = AutoModelForSeq2SeqLM.from_pretrained("BubbleSheep/Hgn_trans_en2zh") - Notebooks
- Google Colab
- Kaggle
YAML Metadata Error:"datasets[0]" with value "THUOCL清华大学开放中文词库" is not valid. If possible, use a dataset id from https://hf.co/datasets.
Model Details
- Model Description: This model has been pre-trained for English-Chinese Translation, and use datasets of THUOCL to fine tune the model.
- source group: English
- target group: Chinese
- Parent Model: Helsinki-NLP/opus-mt-en-zh, see https://huggingface.co/Helsinki-NLP/opus-mt-en-zh
- Model Type: Translation
Training Data
- 清华大学中文开放词库(THUOCL)
- Data link: http://thuocl.thunlp.org/
How to Get Started With the Model
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("BubbleSheep/Hgn_trans_en2zh")
model = AutoModelForSeq2SeqLM.from_pretrained("BubbleSheep/Hgn_trans_en2zh")
- Downloads last month
- 661