File size: 2,346 Bytes
c2aa2db
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a5a5de7
c2aa2db
 
 
 
 
 
 
 
a5a5de7
c2aa2db
 
 
a5a5de7
 
 
 
 
49fddef
 
a5a5de7
49fddef
 
a5a5de7
49fddef
 
 
a5a5de7
49fddef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a5a5de7
c2aa2db
 
 
a5a5de7
c2aa2db
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a5a5de7
 
 
c2aa2db
 
 
 
 
 
 
 
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
base_model: meta-llama/Meta-Llama-3-8B-Instruct
library_name: peft
license: other
metrics:
- accuracy
tags:
- llama-factory
- lora
- generated_from_trainer
model-index:
- name: sft
  results: []
---


# Supervised Fine-Tuned Model

This model is a fine-tuned version of [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) on the open_platypus dataset.
It achieves the following results on the evaluation set:
- Loss: 0.6769
- Accuracy: 0.8116

## Model description

This model is a fine-tuned version of [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) on the open_platypus dataset.

## Intended uses & limitations

### How to use

You can use this model directly with a pipeline for text classification. Here is an example:

```python
import logging
from transformers import pipeline

# Set up logging
logging.basicConfig(filename='model_output.log', level=logging.INFO)

# Load the model using the pipeline API for text generation
model_name = "2nji/llama3-platypus"
generator = pipeline('text-generation', model=model_name)

# Example prompt
prompt = "Hello! How can AI help humans in daily life?"

# Generate response
try:
    responses = generator(prompt, max_length=50)  # Adjust max_length as needed
    response_text = responses[0]['generated_text']
    print("Model response:", response_text)

    # Log the output
    logging.info("Sent prompt: %s", prompt)
    logging.info("Received response: %s", response_text)

except Exception as e:
    logging.error("Error in generating response: %s", str(e))
```

## Training and evaluation data

The model was fine-tuned on the open_platypus dataset.

## Training procedure

### 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: 8
- total_train_batch_size: 8
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 3.0

### Training results

The model was trained on a single NVIDIA H100 GPU with the following results:
- Loss: 0.6769
- Accuracy: 0.8116


### Framework versions
- PEFT 0.11.1
- Transformers 4.42.3
- Pytorch 2.3.1+cu121
- Datasets 2.20.0
- Tokenizers 0.19.1