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
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

Helsinki-NLP
/
opus-mt-en-zh

Translation
Transformers
PyTorch
google-tensorflow TensorFlow
JAX
Rust
English
Chinese
marian
text2text-generation
Model card Files Files and versions
xet
Community
26

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

  • Libraries
  • Transformers

    How to use Helsinki-NLP/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="Helsinki-NLP/opus-mt-en-zh")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
    
    tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-en-zh")
    model = AutoModelForSeq2SeqLM.from_pretrained("Helsinki-NLP/opus-mt-en-zh")
  • Inference
  • Notebooks
  • Google Colab
  • Kaggle
opus-mt-en-zh
1.52 GB
Ctrl+K
Ctrl+K
  • 4 contributors
History: 33 commits
joaogante's picture
joaogante
set `renormalize_logits=True` for better performance (see `transformers` issue #4290)
408d9bc almost 3 years ago
  • .gitattributes
    391 Bytes
    allow flax almost 5 years ago
  • README.md
    2.67 kB
    metadata: add license over 4 years ago
  • config.json
    1.4 kB
    add model almost 5 years ago
  • flax_model.msgpack
    310 MB
    xet
    add model almost 5 years ago
  • generation_config.json
    293 Bytes
    set `renormalize_logits=True` for better performance (see `transformers` issue #4290) almost 3 years ago
  • metadata.json
    1.48 kB
    Update metadata.json over 5 years ago
  • pytorch_model.bin

    Detected Pickle imports (3)

    • "collections.OrderedDict",
    • "torch._utils._rebuild_tensor_v2",
    • "torch.FloatStorage"

    What is a pickle import?

    312 MB
    xet
    Update pytorch_model.bin over 5 years ago
  • rust_model.ot
    578 MB
    xet
    Addition of Rust model about 5 years ago
  • source.spm
    806 kB
    Update source.spm over 5 years ago
  • target.spm
    805 kB
    Update target.spm over 5 years ago
  • tf_model.h5
    313 MB
    xet
    Update TF weights (#3) over 3 years ago
  • tokenizer_config.json
    44 Bytes
    Update tokenizer_config.json over 5 years ago
  • vocab.json
    1.62 MB
    Update vocab.json over 5 years ago