transformers safetensors llama text-generation conversational arxiv:1910.09700 autotrain_compatible text-generation-inference endpoints_compatible region:us
---
library_name: transformers
tags: []
---

# Model Card for Model ID

한국어->영어 번역용으로 훈련한 모형입니다. llama3.2의 경우 한국어->영어 번역에 오류가 잦아 별도로 훈련시켰습니다.
아래 사항에 주의해 주세요:
- 이 모델은 문장단위 번역으로 훈련시켰습니다. 따라서 긴 텍스트의 경우 번역에 오류가 있을 수 있습니다. 또한 인풋 텍스트에 줄바꿈이 있을 경우 결과물을 추출하는데 복잡해질 수 있습니다.
- 이 모델의 주 용도는 금융/경영 관련으로 상정하고 훈련했습니다.
- 총 96만여개의 문장 페어 (금융도메인 40여만개) 를 사용하여 훈련하였습니다.
- 이하 모델카드는 시간이 나는대로 추가하겠습니다.
- 번역 시 숫자를 제멋대로 생성하는 경향이 있어 주의 부탁드립니다. 현재로서는 instruction에 "숫자는 본문의 숫자를 그대로 사용하세요" 등을 추가하는 것이 더 안정적인 것으로 보입니다.
- 영 -> 한 번역도 동시에 훈련했으나, 성능이 상당히 만족스럽지 않습니다. 한 -> 영은 상대적으로 사용가능한 수준으로 보입니다.
- 사용에 있어, 아래 코드를 참고해주세요:


  ```
  from transformers import AutoModelForCausalLM, AutoTokenizer
  import torch
  model_path = "kwoncho/Llama-3.2-1B-KO-EN-Translation"
  model = AutoModelForCausalLM.from_pretrained(
      model_path,
      torch_dtype=torch.bfloat16,
      device_map="cuda:0",
      )
  tokenizer = AutoTokenizer.from_pretrained(model_path)
  ```
- 한국어 -> 영어의 경우
  ```
  test_input = "포스코그룹은 2010년 핸콕의 로이힐 철광석 광산 지분(12.5%) 투자를 시작으로, 2022년 포스코인터내셔널과의 호주 천연가스기업 세넥스에너지 공동 인수 등 그룹 전반에 걸쳐 핸콕과의 협력 범위를 넓히고 있다. "
  prompt = f"""
    ### Instruction:
    영어로 번역하세요.
    ### Input:
    {test_input}
    ### Output:
    """
  ```

```
input_ids = tokenizer.encode(prompt, return_tensors="pt").to(model.device)
output = model.generate(
    input_ids,
    max_new_tokens=200,
    temperature=0.1,
    top_p=1,
    repetition_penalty=1.3,
    do_sample=True,
    eos_token_id=tokenizer.eos_token_id
    )
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
outputs        = generated_text.split("Output:")[1].strip().split('\n')[0].strip()
print(outputs) ### 한영 번역의 경우
"POSCO Group has begun investing in Roy Hill's iron ore mining (12.5% stake) and is expanding its cooperation with Hancock to include the acquisition of a joint venture between Posco International and Sencos Energy Australia Natural Gas Company by 2022 as part of the group overall efforts."
```





## Model Details

### Model Description

<!-- Provide a longer summary of what this model is. -->

This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.

- **Developed by:** [More Information Needed]
- **Funded by [optional]:** [More Information Needed]
- **Shared by [optional]:** [More Information Needed]
- **Model type:** [More Information Needed]
- **Language(s) (NLP):** [More Information Needed]
- **License:** [More Information Needed]
- **Finetuned from model [optional]:** [More Information Needed]

### Model Sources [optional]

<!-- Provide the basic links for the model. -->

- **Repository:** [More Information Needed]
- **Paper [optional]:** [More Information Needed]
- **Demo [optional]:** [More Information Needed]

## Uses

<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->

### Direct Use

<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->

[More Information Needed]

### Downstream Use [optional]

<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->

[More Information Needed]

### Out-of-Scope Use

<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->

[More Information Needed]

## Bias, Risks, and Limitations

<!-- This section is meant to convey both technical and sociotechnical limitations. -->

[More Information Needed]

### Recommendations

<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.

## How to Get Started with the Model

Use the code below to get started with the model.

[More Information Needed]

## Training Details

### Training Data

<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->

[More Information Needed]

### Training Procedure

<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->

#### Preprocessing [optional]

[More Information Needed]


#### Training Hyperparameters

- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->

#### Speeds, Sizes, Times [optional]

<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->

[More Information Needed]

## Evaluation

<!-- This section describes the evaluation protocols and provides the results. -->

### Testing Data, Factors & Metrics

#### Testing Data

<!-- This should link to a Dataset Card if possible. -->

[More Information Needed]

#### Factors

<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->

[More Information Needed]

#### Metrics

<!-- These are the evaluation metrics being used, ideally with a description of why. -->

[More Information Needed]

### Results

[More Information Needed]

#### Summary



## Model Examination [optional]

<!-- Relevant interpretability work for the model goes here -->

[More Information Needed]

## Environmental Impact

<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->

Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).

- **Hardware Type:** [More Information Needed]
- **Hours used:** [More Information Needed]
- **Cloud Provider:** [More Information Needed]
- **Compute Region:** [More Information Needed]
- **Carbon Emitted:** [More Information Needed]

## Technical Specifications [optional]

### Model Architecture and Objective

[More Information Needed]

### Compute Infrastructure

[More Information Needed]

#### Hardware

[More Information Needed]

#### Software

[More Information Needed]

## Citation [optional]

<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->

**BibTeX:**

[More Information Needed]

**APA:**

[More Information Needed]

## Glossary [optional]

<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->

[More Information Needed]

## More Information [optional]

[More Information Needed]

## Model Card Authors [optional]

[More Information Needed]

## Model Card Contact

[More Information Needed]