Update README.md
Browse files
README.md
CHANGED
@@ -6,3 +6,112 @@ base_model:
|
|
6 |
- meta-llama/Llama-3.1-8B-Instruct
|
7 |
pipeline_tag: text-generation
|
8 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
- meta-llama/Llama-3.1-8B-Instruct
|
7 |
pipeline_tag: text-generation
|
8 |
---
|
9 |
+
# Llama-3-1-8b Fine-Tuned Model for Roleplay, Logic, and Reasoning
|
10 |
+
|
11 |
+
![Cover Image](https://i.ibb.co/PYCdt9n/3i-RPOp-Vn-Tb-O4-E021n6-Pljg.jpg)
|
12 |
+
|
13 |
+
## Overview
|
14 |
+
|
15 |
+
This repository provides a fine-tuned version of the **Llama-3-1-8b base model**, optimized for roleplaying, logic, and reasoning tasks. Utilizing iterative fine-tuning and self-generated chat logs, this model delivers engaging and coherent conversational experiences.
|
16 |
+
|
17 |
+
## Model Specifications
|
18 |
+
|
19 |
+
- **Parameters**: 8 Billion (8B)
|
20 |
+
- **Precision**: bf16 (Brain Floating Point 16-bit)
|
21 |
+
- **Fine-Tuning Method**: LoRa (Low-Rank Adaptation)
|
22 |
+
- **Datasets Used**:
|
23 |
+
- Roleplay Dataset
|
24 |
+
- Reasoning and Logic Dataset
|
25 |
+
- **Fine-Tuning Approach**: Iterative Fine-Tuning using self-chat logs
|
26 |
+
|
27 |
+
## Recommended Settings
|
28 |
+
|
29 |
+
To achieve optimal performance with this model, we recommend the following settings:
|
30 |
+
|
31 |
+
- **Minimum Probability (`min_p`)**: `0.05`
|
32 |
+
- **Temperature**: `1.1` or higher
|
33 |
+
|
34 |
+
> **Note**: Due to the nature of the fine-tuning, setting the temperature to `1.1` or higher helps prevent the model from repeating itself and encourages more creative and coherent responses.
|
35 |
+
|
36 |
+
## Usage Instructions
|
37 |
+
|
38 |
+
We recommend using the [oobabooga text-generation-webui](https://github.com/oobabooga/text-generation-webui) for an optimal experience. Load the model in `bf16` precision and enable `flash-attention2` for improved performance.
|
39 |
+
|
40 |
+
### Installation Steps
|
41 |
+
|
42 |
+
1. **Clone the WebUI Repository**:
|
43 |
+
|
44 |
+
```bash
|
45 |
+
git clone https://github.com/oobabooga/text-generation-webui
|
46 |
+
cd text-generation-webui
|
47 |
+
```
|
48 |
+
|
49 |
+
2. **Install Dependencies**:
|
50 |
+
|
51 |
+
```bash
|
52 |
+
pip install -r requirements.txt
|
53 |
+
```
|
54 |
+
|
55 |
+
3. **Download the Model**:
|
56 |
+
|
57 |
+
Download the fine-tuned model from [Hugging Face](#) and place it in the `models` directory.
|
58 |
+
|
59 |
+
4. **Launch the WebUI**:
|
60 |
+
|
61 |
+
```bash
|
62 |
+
python server.py --bf16 --flash-attention
|
63 |
+
```
|
64 |
+
|
65 |
+
### Sample Prompt Formats
|
66 |
+
|
67 |
+
You can interact with the model using either **chat format** or **chat-instruct format**. Here's an example:
|
68 |
+
|
69 |
+
```plaintext
|
70 |
+
Ryan is a computer engineer who works at Intel.
|
71 |
+
|
72 |
+
Ryan: Hey, how's it going Natalie?
|
73 |
+
Natalie: Good, how are things going with you, Ryan?
|
74 |
+
Ryan: Great, I'm just doing just great.
|
75 |
+
```
|
76 |
+
|
77 |
+
### Text Generation Example
|
78 |
+
|
79 |
+
![Text Generation Example](https://i.ibb.co/J5ZVCnR/Screenshot-45.png)
|
80 |
+
|
81 |
+
## Model Capabilities
|
82 |
+
|
83 |
+
Below are some examples showcasing the model's performance in various tasks:
|
84 |
+
|
85 |
+
### Instruct Log Examples
|
86 |
+
|
87 |
+
1. **Logic and Reasoning**
|
88 |
+
|
89 |
+
![Instruct Log 1](https://i.ibb.co/0ngp6zf/Screenshot-42.png)
|
90 |
+
|
91 |
+
2. **Roleplaying Scenario**
|
92 |
+
|
93 |
+
![Instruct Log 2](https://i.ibb.co/GQ8Ffn1/Screenshot-43.png)
|
94 |
+
|
95 |
+
3. **Creative Writing**
|
96 |
+
|
97 |
+
![Instruct Log 3](https://i.ibb.co/4JkCjtf/Screenshot-44.png)
|
98 |
+
|
99 |
+
## Limitations and Tips
|
100 |
+
|
101 |
+
While this model excels in chat and roleplaying scenarios, it isn't perfect. If you notice the model repeating itself or providing less coherent responses:
|
102 |
+
|
103 |
+
- **Increase the Temperature**: Setting the temperature higher (≥ `1.1`) can help generate more diverse and creative outputs.
|
104 |
+
- **Adjust `min_p` Setting**: Ensuring `min_p` is at least `0.05` can prevent low-probability tokens from being excluded, enhancing the response quality.
|
105 |
+
|
106 |
+
## Acknowledgments
|
107 |
+
|
108 |
+
- **oobabooga text-generation-webui**: A powerful interface for running and interacting with language models. [GitHub Repository](https://github.com/oobabooga/text-generation-webui)
|
109 |
+
- **Hugging Face**: For hosting the model and providing a platform for collaboration. [Website](https://huggingface.co/)
|
110 |
+
|
111 |
+
## License
|
112 |
+
|
113 |
+
[Specify the license under which the model is released, e.g., MIT License, Apache 2.0, etc.]
|
114 |
+
|
115 |
+
---
|
116 |
+
|
117 |
+
*For any issues or questions, please open an issue in this repository.*
|