-
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 (this model !)# 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 # Woondsc/nllb-1.3B-KMA-KCD # model. However, if you need better performance for Korean-to-English medical translations, we recommend using # Woondsc/nllb-1.3B-KMA-KCD-FFTtest (this model !)# instead.
1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
3# Load model directly
4tokenizer = AutoTokenizer.from_pretrained("Woondsc/nllb-1.3B-KMA-KCD-FFTtest")
5model = AutoModelForSeq2SeqLM.from_pretrained("Woondsc/nllb-1.3B-KMA-KCD-FFTtest")
6
7# Transformer function setting
8def translate(text, model, tokenizer, target_lang="eng_Latn"):
9 inputs = tokenizer(text, return_tensors="pt")
10 inputs["forced_bos_token_id"] = tokenizer.convert_tokens_to_ids(target_lang)
11 translated_tokens = model.generate(**inputs)
12 translated_text = tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)[0]
13 return translated_text
14
15# Execute example
16korean_text = "간질"
17english_translation = translate(korean_text, model, tokenizer)
18print("번역 결과:", english_translation)