Hugging Face's logo Hugging Face
    • Models
    • Datasets
    • Pricing
      • Website
        • Metrics
        • Languages
        • Organizations
      • Community
        • Forum
        • Blog
        • GitHub
      • Documentation
        • Model Hub doc
        • Inference API doc
        • Transformers doc
        • Tokenizers doc
        • Datasets doc
    • We're hiring!

    • Log In
    • Sign Up
    • Account
      • Log In
      • Sign Up
    • Website
      • Models
      • Datasets
      • Metrics
      • Languages
      • Organizations
      • Pricing
    • Community
      • Forum
      • Blog
    • Documentation
      • Model Hub doc
      • Inference API doc
      • Transformers doc
      • Tokenizers doc
      • Datasets doc

    Language Technology Research Group at the University of Helsinki's picture Helsinki-NLP
    /
    opus-mt-niu-fi

    Translation
    PyTorch niu fi marian seq2seq text2text-generation
    Model card Files and versions

    How to serve this model with the Accelerated Inference API

    Try the Inference API for free, and get an organization plan to use it in your apps.
    import json
    import requests
    
    API_URL = "https://api-inference.huggingface.co/models/Helsinki-NLP/opus-mt-niu-fi"
    headers = {"Authorization": f"Bearer {API_TOKEN}"}
    
    def query(payload):
    	data = json.dumps(payload)
    	response = requests.request("POST", API_URL, headers=headers, data=data)
    	return json.loads(response.content.decode("utf-8"))
    data = query(
        {
            "inputs": "Меня зовут Вольфганг и я живу в Берлине",
        }
    )

    Quick Links

    • Inference API Documentation
    • How to get started

    How to use from the 🤗/transformers library

    from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
      
    tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-niu-fi")
    
    model = AutoModelForSeq2SeqLM.from_pretrained("Helsinki-NLP/opus-mt-niu-fi")

    Or just clone the model repo

    git lfs install
    git clone https://huggingface.co/Helsinki-NLP/opus-mt-niu-fi
    # if you want to clone without large files – just their pointers
    # prepend your git clone with the following env var:
    GIT_LFS_SKIP_SMUDGE=1
      • main
      opus-mt-niu-fi
      History: 25 commits
      system
      Update README.md 29c076a last year
      • .gitattributes 345.0B initial commit last year
      • README.md 804.0B Update README.md last year
      • config.json 1.1KB Update config.json last year
      • pytorch_model.bin 259.8MB Update pytorch_model.bin last year
      • source.spm 494.2KB Update source.spm last year
      • target.spm 871.1KB Update target.spm last year
      • tokenizer_config.json 43.0B Update tokenizer_config.json last year
      • vocab.json 1.1MB Update vocab.json last year