transformers safetensors m2m_100 text2text-generation pytorch flores-200 Medical translation ko en base_model:facebook/nllb-200-1.3B base_model:finetune:facebook/nllb-200-1.3B license:cc-by-4.0 autotrain_compatible endpoints_compatible region:us
---
base_model:
- facebook/nllb-200-1.3B
language:
- ko
- en
library_name: transformers
license: cc-by-4.0
pipeline_tag: translation
tags:
- pytorch
- flores-200
- Medical
---

* Explanation !
  
- This model is a fine-tuned version of the NLLB-200-1.3B model, specifically adapted for the medical terminology domain. All usage guidelines and copyright policies comply with those of the base model.

- The fine-tuning dataset consists of the KMA Medical Terminology Collection and the KCD-8 masterfile's Korean-English description dataset.

- It is specialized for translating Korean medical terms into English. ( ! Especially fitted for translating cause-of-death Korean text into English terms ! )

- After pushing the model, we have continuously identified mistranslations and are updating the # Woondsc/nllb-1.3B-KMA-KCD-FFTtest # model to address these issues. This model is an improved fine-tuned version specifically designed to correct additional mistranslations in the original model.

- If you are looking to build a general Korean-to-English translation model for other purposes, feel free to use this model. However, if you need better performance for Korean-to-English medical translations, we recommend using # Woondsc/nllb-1.3B-KMA-KCD-FFTtest # instead.


# Here is the example of using this model for translating Korean COD into English term . . .

```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

# Load model directly
tokenizer = AutoTokenizer.from_pretrained("Woondsc/nllb-1.3B-KMA-KCD")
model = AutoModelForSeq2SeqLM.from_pretrained("Woondsc/nllb-1.3B-KMA-KCD")

# Transformer function setting
def translate(text, model, tokenizer, target_lang="eng_Latn"):
    inputs = tokenizer(text, return_tensors="pt")
    inputs["forced_bos_token_id"] = tokenizer.convert_tokens_to_ids(target_lang)
    translated_tokens = model.generate(**inputs)
    translated_text = tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)[0]
    return translated_text

# Execute example
korean_text = "간질"
english_translation = translate(korean_text, model, tokenizer)
print("번역 결과:", english_translation)
```
