openpecha / nllb_600M_bi_boen_3

huggingface.co
Total runs: 48
24-hour runs: 15
7-day runs: 17
30-day runs: 4
Model's Last Updated: December 10 2024
translation

Introduction of nllb_600M_bi_boen_3

Model Details of nllb_600M_bi_boen_3

NLLB 600m Tibetan

State of the art

import torch
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline

def translate(text, source_lang, target_lang, model_name="TenzinGayche/nllb_600M_bi_boen_3"):
    # Define flores codes
    flores_codes = {
        "Standard Tibetan": "bod_Tibt",
        "English": "eng_Latn"
    }

    # Convert language names to flores codes
    source = flores_codes[source_lang]
    target = flores_codes[target_lang]

    # Load model and tokenizer
    model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
    tokenizer = AutoTokenizer.from_pretrained("facebook/nllb-200-distilled-600M")

    # Check if a GPU is available and set device accordingly
    device = 0 if torch.cuda.is_available() else -1

    # Create translator pipeline
    translator = pipeline('translation', model=model, tokenizer=tokenizer, 
                          src_lang=source, tgt_lang=target, device=device)

    # Perform translation
    output = translator(text, max_length=400)

    # Extract translated text
    translated_text = output[0]['translation_text']

    return translated_text

# Example usage
if __name__ == "__main__":
    input_text = "Hello, how are you?"
    source_language = "English"
    target_language = "Standard Tibetan"
    
    result = translate(input_text, source_language, target_language)
    print(f"Original: {input_text}")
    print(f"Translated: {result}")

Runs of openpecha nllb_600M_bi_boen_3 on huggingface.co

48
Total runs
15
24-hour runs
14
3-day runs
17
7-day runs
4
30-day runs

More Information About nllb_600M_bi_boen_3 huggingface.co Model

nllb_600M_bi_boen_3 huggingface.co

nllb_600M_bi_boen_3 huggingface.co is an AI model on huggingface.co that provides nllb_600M_bi_boen_3's model effect (), which can be used instantly with this openpecha nllb_600M_bi_boen_3 model. huggingface.co supports a free trial of the nllb_600M_bi_boen_3 model, and also provides paid use of the nllb_600M_bi_boen_3. Support call nllb_600M_bi_boen_3 model through api, including Node.js, Python, http.

nllb_600M_bi_boen_3 huggingface.co Url

https://huggingface.co/openpecha/nllb_600M_bi_boen_3

openpecha nllb_600M_bi_boen_3 online free

nllb_600M_bi_boen_3 huggingface.co is an online trial and call api platform, which integrates nllb_600M_bi_boen_3's modeling effects, including api services, and provides a free online trial of nllb_600M_bi_boen_3, you can try nllb_600M_bi_boen_3 online for free by clicking the link below.

openpecha nllb_600M_bi_boen_3 online free url in huggingface.co:

https://huggingface.co/openpecha/nllb_600M_bi_boen_3

nllb_600M_bi_boen_3 install

nllb_600M_bi_boen_3 is an open source model from GitHub that offers a free installation service, and any user can find nllb_600M_bi_boen_3 on GitHub to install. At the same time, huggingface.co provides the effect of nllb_600M_bi_boen_3 install, users can directly use nllb_600M_bi_boen_3 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

nllb_600M_bi_boen_3 install url in huggingface.co:

https://huggingface.co/openpecha/nllb_600M_bi_boen_3

Url of nllb_600M_bi_boen_3

nllb_600M_bi_boen_3 huggingface.co Url

Provider of nllb_600M_bi_boen_3 huggingface.co

openpecha
ORGANIZATIONS

Other API from openpecha

huggingface.co

Total runs: 30
Run Growth: 19
Growth Rate: 65.52%
Updated:April 05 2024
huggingface.co

Total runs: 11
Run Growth: 10
Growth Rate: 90.91%
Updated:January 27 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 17 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 17 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 05 2025