peft tensorboard safetensors llama generated_from_trainer base_model:NousResearch/Llama-2-7b-hf 4-bit bitsandbytes region:us
---
library_name: peft
tags:
- generated_from_trainer
base_model: NousResearch/Llama-2-7b-hf
model-index:
- name: qlora-out_2
  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. -->

[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
<details><summary>See axolotl config</summary>

axolotl version: `0.4.0`
```yaml
base_model: NousResearch/Llama-2-7b-hf
model_type: LlamaForCausalLM
tokenizer_type: LlamaTokenizer
is_llama_derived_model: true

load_in_8bit: false
load_in_4bit: true
strict: false

# datasets:
#   - path: mhenrichsen/alpaca_2k_test
#     type: alpaca
# dataset_prepared_path:
# val_set_size: 0.05
datasets:
  - path: /home/ubuntu/Project_Files/Finetune/Data/json_files/combined_sentences.json
    type: completion
    ds_type: json
dataset_prepared_path: last_run_prepared
val_set_size: 0.05
output_dir: ./qlora-out_2

adapter: qlora
lora_model_dir:

sequence_len: 4096
sample_packing: true
pad_to_sequence_len: true

lora_r: 32
lora_alpha: 16
lora_dropout: 0.05
lora_target_modules:
lora_target_linear: true
lora_fan_in_fan_out:

wandb_project:
wandb_entity:
wandb_watch:
wandb_name:
wandb_log_model:

gradient_accumulation_steps: 4
micro_batch_size: 4
num_epochs: 2
optimizer: paged_adamw_32bit
lr_scheduler: cosine
learning_rate: 0.0002

train_on_inputs: false
group_by_length: false
bf16: auto
fp16:
tf32: false

gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true

warmup_steps: 10
evals_per_epoch: 10
eval_table_size:
saves_per_epoch: 2
debug:
deepspeed:
weight_decay: 0.0
fsdp:
fsdp_config:
special_tokens:

```

</details><br>

# qlora-out_2

This model is a fine-tuned version of [NousResearch/Llama-2-7b-hf](https://huggingface.co/NousResearch/Llama-2-7b-hf) on the None dataset.
It achieves the following results on the evaluation set:
- Loss: 0.5346

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- distributed_type: multi-GPU
- num_devices: 4
- gradient_accumulation_steps: 4
- total_train_batch_size: 64
- total_eval_batch_size: 16
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 10
- num_epochs: 2

### Training results

| Training Loss | Epoch | Step | Validation Loss |
|:-------------:|:-----:|:----:|:---------------:|
| 3.7065        | 0.0   | 1    | 3.7244          |
| 0.6608        | 0.1   | 95   | 0.5627          |
| 0.6181        | 0.2   | 190  | 0.5419          |
| 0.6037        | 0.3   | 285  | 0.5333          |
| 0.5919        | 0.4   | 380  | 0.5290          |
| 0.5845        | 0.5   | 475  | 0.5295          |
| 0.5779        | 0.6   | 570  | 0.5274          |
| 0.5754        | 0.7   | 665  | 0.5292          |
| 0.5724        | 0.8   | 760  | 0.5300          |
| 0.5702        | 0.9   | 855  | 0.5256          |
| 0.5662        | 1.0   | 950  | 0.5284          |
| 0.5665        | 1.09  | 1045 | 0.5313          |
| 0.5643        | 1.19  | 1140 | 0.5325          |
| 0.5599        | 1.29  | 1235 | 0.5291          |
| 0.5607        | 1.39  | 1330 | 0.5318          |
| 0.5584        | 1.49  | 1425 | 0.5323          |
| 0.5574        | 1.59  | 1520 | 0.5324          |
| 0.5568        | 1.69  | 1615 | 0.5329          |
| 0.5586        | 1.8   | 1710 | 0.5346          |
| 0.5572        | 1.9   | 1805 | 0.5346          |


### Framework versions

- PEFT 0.8.2
- Transformers 4.38.0.dev0
- Pytorch 2.1.2+cu121
- Datasets 2.16.1
- Tokenizers 0.15.0