File size: 2,227 Bytes
ec3c8f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
license: cc-by-4.0
language:
- ko
- en
base_model:
- facebook/nllb-200-1.3B
pipeline_tag: translation
library_name: transformers
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 (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.




# 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-FFTtest")
model = AutoModelForSeq2SeqLM.from_pretrained("Woondsc/nllb-1.3B-KMA-KCD-FFTtest")

# 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)
```