Steelskull commited on
Commit
3f9518b
1 Parent(s): c87efb6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +133 -41
README.md CHANGED
@@ -1,52 +1,144 @@
1
  ---
2
- tags:
3
- - merge
4
- - mergekit
5
- - lazymergekit
6
- - TheSkullery/llama-3-cat-8b-instruct
7
- base_model:
8
- - TheSkullery/llama-3-cat-8b-instruct
9
  ---
10
 
11
- # llama-3-cat-8b-instruct-v1.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
- llama-3-cat-8b-instruct-v1.1 is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
14
- * [TheSkullery/llama-3-cat-8b-instruct](https://huggingface.co/TheSkullery/llama-3-cat-8b-instruct)
15
 
16
- ## 🧩 Configuration
17
 
18
- ```yaml
19
- merge_method: task_arithmetic
20
- dtype: bfloat16
21
- base_model: NousResearch/Meta-Llama-3-8B-Instruct
22
- models:
23
- - model: NousResearch/Meta-Llama-3-8B-Instruct
24
- - model: TheSkullery/llama-3-cat-8b-instruct
25
- parameters:
26
- weight: 1.0
27
- ```
28
 
29
- ## 💻 Usage
 
 
 
30
 
31
- ```python
32
- !pip install -qU transformers accelerate
33
 
34
- from transformers import AutoTokenizer
35
- import transformers
36
- import torch
 
37
 
38
- model = "TheSkullery/llama-3-cat-8b-instruct-v1.1"
39
- messages = [{"role": "user", "content": "What is a large language model?"}]
40
 
41
- tokenizer = AutoTokenizer.from_pretrained(model)
42
- prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
43
- pipeline = transformers.pipeline(
44
- "text-generation",
45
- model=model,
46
- torch_dtype=torch.float16,
47
- device_map="auto",
48
- )
49
-
50
- outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
51
- print(outputs[0]["generated_text"])
52
- ```
 
1
  ---
2
+ license: llama3
 
 
 
 
 
 
3
  ---
4
 
5
+ <!DOCTYPE html>
6
+ <html lang="en">
7
+ <head>
8
+ <meta charset="UTF-8">
9
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
10
+ <title>Cat-llama3-instruct Data Card</title>
11
+ <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600&display=swap" rel="stylesheet">
12
+ <style>
13
+ body {
14
+ font-family: 'Quicksand', sans-serif;
15
+ background: linear-gradient(135deg, #2E3440 0%, #1A202C 100%);
16
+ color: #D8DEE9;
17
+ margin: 0;
18
+ padding: 0;
19
+ font-size: 16px;
20
+ }
21
+ .container {
22
+ width: 80%;
23
+ max-width: 800px;
24
+ margin: 20px auto;
25
+ background-color: rgba(255, 255, 255, 0.02);
26
+ padding: 20px;
27
+ border-radius: 12px;
28
+ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
29
+ backdrop-filter: blur(10px);
30
+ border: 1px solid rgba(255, 255, 255, 0.1);
31
+ }
32
+ .header h1 {
33
+ font-size: 28px;
34
+ color: #ECEFF4;
35
+ margin: 0 0 20px 0;
36
+ text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
37
+ }
38
+ .update-section {
39
+ margin-top: 30px;
40
+ }
41
+ .update-section h2 {
42
+ font-size: 24px;
43
+ color: #88C0D0;
44
+ }
45
+ .update-section p {
46
+ font-size: 16px;
47
+ line-height: 1.6;
48
+ color: #ECEFF4;
49
+ }
50
+ .info img {
51
+ width: 100%;
52
+ border-radius: 10px;
53
+ margin-bottom: 15px;
54
+ }
55
+ a {
56
+ color: #88C0D0;
57
+ text-decoration: none;
58
+ }
59
+ a:hover {
60
+ color: #A3BE8C;
61
+ }
62
+ pre {
63
+ background-color: rgba(255, 255, 255, 0.05);
64
+ padding: 10px;
65
+ border-radius: 5px;
66
+ overflow-x: auto;
67
+ }
68
+ code {
69
+ font-family: 'Courier New', monospace;
70
+ color: #A3BE8C;
71
+ }
72
+ </style>
73
+ </head>
74
+ <body>
75
+ <div class="container">
76
+ <div class="header">
77
+ <h1>Cat-llama3-instruct</h1>
78
+ </div>
79
+ <div class="info">
80
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/64545af5ec40bbbd01242ca6/Uw0ycicMjZufSFTgXZMFd.png" alt="Model Card">
81
+ <p>Presented by:<p/>
82
+ <ul>
83
+ <li>Dataset Builder: Dr. Kal'tsit (Kat)</li>
84
+ <li>Trainer/Funding: SteelSkull</li>
85
+ <li>Facilitator: Potatooff</li>
86
+ </ul>
87
+ <p><a href="https://huggingface.co/turboderp/Cat-Llama-3-70B-instruct">70b variant of the model</a> (Trained by Dr. Kal'tsit, Posted by Turboderp), Please check it out!</p>
88
+ <h2>About:</h2>
89
+ <p>Cat-llama3-instruct is a llama 3 8b finetuned model focusing on system prompt fidelity, helpfulness and character engagement. The model aims to respect system prompt to an extreme degree, provide helpful information regardless of situations, and offer maximum character immersion (Role Play) in given scenes.</p>
90
+ <h2>Specific Aims:</h2>
91
+ <ul>
92
+ <li>System Instruction fidelity</li>
93
+ <li>Chain of Thought (COT)</li>
94
+ <li>Character immersion</li>
95
+ <li>Helpfulness for biosciences and general science</li>
96
+ </ul>
97
+ <h3>Methods</h3>
98
+ <h4>Dataset Preparation</h4>
99
+ <p>Huggingface dataset containing instruction-response pairs was systematically pulled. A GPT model was trained on high quality and helpful responses exclusively to serve as a standard model.</p>
100
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/6383dc174c48969dcf1b4fce/HovhwLIGO9cz8Az-h0tkn.png" alt="Huggingface dataset population distribution and filtration for each component">
101
+ <p>(Fig1. Huggingface dataset population distribution and filtration for each component)</p>
102
+ <p>The dataset was further filtered for length and COT responses:</p>
103
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/6383dc174c48969dcf1b4fce/-z9cZDNuGyCftdrZwR_46.png" alt="COT responses">
104
+ <p>(Fig 2. COT responses are all >50 tokens single turn)</p>
105
+ <p>Health-related data was also pulled from Chat Doctor, favoring detailed and step-by-step diagnosis:</p>
106
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/6383dc174c48969dcf1b4fce/RnXyoR6wyBDWfIy3vMvWm.png" alt="Health-related tasks">
107
+ <p>(Fig 3. Health related tasks are all >100 tokens, peaking at 450 tokens single turn)</p>
108
+ <h3>Model Training</h3>
109
+ <p>1*a100 for 6 days, 4 epochs</p>
110
+ <h2>Usage</h2>
111
+ <p>Prompt format:</p>
112
+ <pre><code> <|begin_of_text|>Below is a conversation between an user and an AI assistant. The ai assistant gives response regarding user's questions. USER: user: Given the task definition and input, reply with output. In this task, you are given a question and an answer, you would be asked to create the sentence based on the Question-Answer provided. It should be contained within the Question-Answer provided.
113
 
114
+ Question: What type of diseases in humans are caused by protozoa? Answer: protist diseases
115
+ ASSISTANT: AI: Task Explanation:
116
 
117
+ In this task, you are asked to create a sentence using the given question and the provided answer. The sentence you create should include the information from both the question and the answer in a concise and coherent manner.
118
 
119
+ Guidelines:
 
 
 
 
 
 
 
 
 
120
 
121
+ 1. Read the given question and answer carefully.
122
+ 2. Combine the information from the question and answer to create a new sentence.
123
+ 3. Make sure your new sentence contains both the question's information and the answer provided.
124
+ 4. Check your sentence for proper grammar and punctuation.
125
 
126
+ Steps to find the answer:
 
127
 
128
+ 1. Read the question: "What type of diseases in humans are caused by protozoa?"
129
+ 2. Read the answer: "protist diseases"
130
+ 3. Combine the information from the question and answer to create a new sentence: "In humans, protist diseases are caused by protozoa."
131
+ 4. Double-check the sentence for proper grammar and punctuation, and make necessary adjustments if needed.
132
 
133
+ Final Output:
 
134
 
135
+ In humans, protist diseases are caused by protozoa.</s><|end_of_text|></code></pre>
136
+ <h2>Showcases:</h2>
137
+ <p>The model does COT in grey, calculated response in black; note that this behaviour is done through system card instruction to showcase the systemcard fidelity, it is not fine tuned into the model.</p>
138
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/6383dc174c48969dcf1b4fce/6smLuiePQa8Y2H19ie-ZY.png" alt="Showcase 1">
139
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/6383dc174c48969dcf1b4fce/g9oP03RboHBBipk70GIHO.png" alt="Showcase 2">
140
+ <p>(Fig 4. Showcasing model doing COT to solve difficult tasks, extend and enrich its own answers)</p>
141
+ </div>
142
+ </div>
143
+ </body>
144
+ </html>