Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

ronghua
/
opus-mt-en-zh

Translation
Transformers
English
Chinese
marian
text2text-generation
Model card Files Files and versions
xet
Community

Instructions to use ronghua/opus-mt-en-zh with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use ronghua/opus-mt-en-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="ronghua/opus-mt-en-zh")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
    
    tokenizer = AutoTokenizer.from_pretrained("ronghua/opus-mt-en-zh")
    model = AutoModelForSeq2SeqLM.from_pretrained("ronghua/opus-mt-en-zh", device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
opus-mt-en-zh
3.24 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 3 commits
ronghua's picture
ronghua
Upload 9 files
a414f2d almost 3 years ago
  • .gitattributes
    391 Bytes
    Upload 9 files almost 3 years ago
  • README.md
    2.67 kB
    Upload README.md almost 3 years ago
  • config.json
    1.4 kB
    Upload 9 files almost 3 years ago
  • generation_config.json
    293 Bytes
    Upload 9 files almost 3 years ago
  • metadata.json
    1.48 kB
    Upload 9 files almost 3 years ago
  • source.spm
    806 kB
    Upload 9 files almost 3 years ago
  • target.spm
    805 kB
    Upload 9 files almost 3 years ago
  • tokenizer_config.json
    44 Bytes
    Upload 9 files almost 3 years ago
  • vocab.json
    1.62 MB
    Upload 9 files almost 3 years ago