safetensors generated_from_trainer base_model:meta-llama/Llama-2-7b-chat-hf region:us
---
base_model: meta-llama/Llama-2-7b-chat-hf
tags:
- generated_from_trainer
model-index:
- name: llama-2-7b-nsmc2
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# llama-2-7b-nsmc2

This model is a fine-tuned version of [meta-llama/Llama-2-7b-chat-hf](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf) on an nsmc dataset.

## Model description

llama-2모델을 nsmc데이터에 대해 미세튜닝한 모델  
영화 리뷰 데이터를 기반으로 사용자가 작성한 리뷰의 긍정 또는 부정을 파악한다.

## Intended uses & limitations

### Intended uses
사용자가 작성한 리뷰의 긍정 또는 부정 감정 분석을 제공함  

### Limitaions
영화 리뷰에 특화되어 있으며, 다른 유형에는 제한이 있을 수 있음  
Colab T4 GPU에서 테스트 되었음

## Training and evaluation data

Training data: nsmc 'train' data 중 상위 2000개의 샘플
Evaluation data: nsmc 'test' data 중 상위 1000개의 샘플

## Training procedure

trainer.train()  2:02:05 소요  
추론과정 GPU 메모리 5.7GB 사용  
300 step마다 체크포인트 저장  

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0001
- train_batch_size: 1
- eval_batch_size: 1
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 2
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.03
- training_steps: 2000
- mixed_precision_training: Native AMP

### Training results

trainable params: 19988480 || all params: 3520401408 || trainable%: 0.5677897967708119  

![image/png](https://cdn-uploads.huggingface.co/production/uploads/652384150f935fa8fd6c6779/nRxqdG8_ogIWIIY2eDYeW.png)



### 정확도

Llama2: 정확도 0.913  
|               | Positive Prediction(PP) | Negative Prediction(NP) |
|--------------------|---------------------|---------------------|
| True Positive (TP) | 441                 | 67                  |
| True Negative (TN) | 20                  | 472                 |

### Framework versions

- Transformers 4.35.2
- Pytorch 2.1.0+cu118
- Datasets 2.15.0
- Tokenizers 0.15.0
