-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
539 lines (430 loc) · 22.7 KB
/
index.html
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="./static/css/index.css">
<script src="./static/js/index.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma-carousel@4.0.4/dist/css/bulma-carousel.min.css" />
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<!-- <link rel="stylesheet" href="https://themesguide.github.io/top-hat/dist/minco/theme.min.css"> -->
<title>Instruction Tuning with GPT-4</title>
</head>
<style>
body {padding-top: 100px;}
/* This text is in Gill Sans */
.box{
width: 12%;
/* height: 100px; */
}
.img-overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
text-align: left;
}
.citation {
display: block;
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 1.42857143;
word-break: break-all;
word-wrap: break-word;
color: #333;
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
}
.class {
font-family: Calibri,Candara,Segoe,Segoe UI,Optima,Arial,sans-serif;
}
.myhead{
background-color:#e9ecef;
border-radius: .3rem;
margin-bottom: 1rem;
padding: 2rem 2rem;
margin-top: -1rem;
}
li {
margin-bottom: 10px; /* increase bottom margin of <li> elements by 10px */
}
</style>
<body>
<nav class="navbar fixed-top navbar-expand-lg navbar-dark" id="navbar1" style="background-color: #242582;">
<div class="container">
<a class="navbar-brand mr-1 mb-1 mt-0" href="../">GPT-4-LLM</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsingNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="#github">Contact Us</a>
</li>
</ul>
</div>
</nav>
<main>
<div class="container">
<div class="myhead">
<h2 style="font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif">Instruction Tuning with GPT-4</h2>
<a class="btn btn-primary" href="https://arxiv.org/abs/2304.03277" role="button" >Paper »</a>
<a class="btn btn-info" href="https://github.com/Instruction-Tuning-with-GPT-4/GPT-4-LLM" role="button">Github »</a>
<!-- <a class="btn btn-secondary" href="#" role="button">Demo (Soon) »</a> -->
</div>
<!-- <div style="text-align: center;">
<img src="./images/gpt4llama_logo.png" alt="a beautiful painting of a llama following the instructions of the AI robot, by studio ghibli, octane render, brilliantly coloured" width="300" height="300">
</div> -->
<section style="text-align: center!important">
<div id="slider">
<div class="arousel-image">
<div>
<img class="carousel-image" src="./images/gpt4llama_logo.png" alt="" />
</div>
</div>
<div class="arousel-image">
<div>
<img class="carousel-image" src="./images/gpt4llm_logo_images/gpt4llm_image_1.png" alt="" />
</div>
</div>
<div class="arousel-image">
<div>
<img class="carousel-image" src="./images/gpt4llm_logo_images/gpt4llm_image_2.png" alt="" />
</div>
</div>
<div class="arousel-image">
<div>
<img class="carousel-image" src="./images/gpt4llm_logo_images/gpt4llm_image_3.png" alt="" />
</div>
</div>
<div class="arousel-image">
<div>
<img class="carousel-image" src="./images/gpt4llm_logo_images/gpt4llm_image_4.png" alt="" />
</div>
</div>
<div class="arousel-image">
<div>
<img class="carousel-image" src="./images/gpt4llm_logo_images/gpt4llm_image_5.png" alt="" />
</div>
</div>
<div class="arousel-image">
<div>
<img class="carousel-image" src="./images/gpt4llm_logo_images/gpt4llm_image_6.png" alt="" />
</div>
</div>
<div class="arousel-image">
<div>
<img class="carousel-image" src="./images/gpt4llm_logo_images/gpt4llm_image_7.png" alt="" />
</div>
</div>
<div class="arousel-image">
<div>
<img class="carousel-image" src="./images/gpt4llm_logo_images/gpt4llm_image_8.png" alt="" />
</div>
</div>
<div class="arousel-image">
<div>
<img class="carousel-image" src="./images/gpt4llm_logo_images/gpt4llm_image_9.png" alt="" />
</div>
</div>
<div class="arousel-image">
<div>
<img class="carousel-image" src="./images/gpt4llm_logo_images/gpt4llm_image_10.png" alt="" />
</div>
</div>
<div class="arousel-image">
<div>
<img class="carousel-image" src="./images/gpt4llm_logo_images/gpt4llm_image_11.png" alt="" />
</div>
</div>
</div>
</section>
<script src="script.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bulma-carousel@4.0.3/dist/js/bulma-carousel.min.js"></script>
<script>
bulmaCarousel.attach('#slider', {
slidesToScroll: 1,
slidesToShow: 1,
infinite: true,
autoplay: true,
});
</script>
<p style="color:gray; text-align: center;">GPT-4-LLM
(<em>generated by <a href="https://gligen.github.io/">GLIGEN</a></em>)</p>
<!-- <div class="col-md-12">
<img class='img-fluid' src="{{url_for('static', filename='model.png')}}">
</div> -->
<div class="col-md-12" style="font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif">
<!-- <h3 class=".display-3">Pre-training-fine-tuning paradigm for building task-oritend dialog systems </h3> -->
<p>Large Language Models (LLMs) have shown impressive generalization capabilities such as in-
context-learning and chain-of-thoughts reasoning. To enable LLMs to follow natural language instructions and complete real-world tasks, researchers have been exploring methods of instruction-tuning of LLMs. To advance the state of the art of instruction-tuning for LLMs, we present the first attempt to use <a href="https://openai.com/research/gpt-4" target="_blank">GPT-4</a> to generate instruction-following data for LLM finetuning.
<h3 class=".display-3">GPT-4 Data</h3>
We release the following data assets:
<!-- <ul>
<li>English Instruction-Following Data: For the 52K instructions collected in Alpaca, one English GPT-4 answer is provided for each. We leave it as future work to follow an iterative process to construct our own instruction set using GPT-4 and self-instruct.</li>
<li>Chinese Instruction-Following Data: We use ChatGPT to translate the 52K instructions into Chinese and ask GPT-4 to answer them in Chinese. This allows us to build a Chinese instruction-following model based on LLaMA, and study cross-language generalization ability of instruction-tuning. </li>
<li>Comparison Data: We ask GPT-4 to rate its own response from 1 to 10. Furthermore, we ask GPT-4 to compare and rate the responses from the three models, including GPT-4, GPT-3.5 and OPT-IML. This is used to train reward models.</li>
<li>Answers on Unnatural Instructions: The GPT-4 answers are decoded on the core dataset of 68K instruction-input-output triplets. The subset is used to quantify the gap between GPT-4 and our instruction-tuned models at scale.</li>
</ul> -->
<ul>
<li><b>English Instruction-Following Data:</b> for the 52K instructions collected in <a href="https://github.com/tatsu-lab/stanford_alpaca">Alpaca</a>, one English GPT-4 answer is provided for each. Explore and compare the data stats of <a href="https://instruction-tuning-with-gpt-4.github.io/gpt4_alpaca_verb_noun_output.html">GPT-4 answers</a> and <a href="https://instruction-tuning-with-gpt-4.github.io/gpt3_alpaca_verb_noun_output.html">GPT-3 answers</a>. </li>
<li><b>Chinese Instruction-Following Data:</b> we use ChatGPT to translate the 52K instructions into Chinese and ask GPT-4 to answer them in Chinese. </li>
<li><b>Comparison Data:</b> we ask GPT-4 to rate its own response from 1 to 10. Furthermore, we ask GPT-4 to compare and rate the responses from the three models, including GPT-4, GPT-3.5 and OPT-IML. This is used to train reward models.</li>
<li><b>Answers on Unnatural Instructions:</b> the GPT-4 answers are decoded on the core dataset of 68K instruction-input-output triplets. The subset is used to quantify the gap between GPT-4 and our instruction-tuned models at scale.</li>
</ul>
</p>
<div style="text-align: center;">
<img src="./images/gpt4llama_flow.png" alt="llama following the instructions" width="80%">
</div>
<!-- <img class='img-fluid' src="{{url_for('static', filename='input.png')}}"> -->
<div style="padding-left: 13%;">
</div>
<h3 class=".display-3">How Good is the Data?</h3>
<p>
Evaluating the performance of self-instruct tuned models on GPT-4 data for tasks that have not been seen before remains a difficult task. Our objective is to assess their capability to comprehend and follow instructions for various tasks. To accomplish this, we utilize the following three types of evaluations.Our empirical investigation confirms that the utilization of GPT-4-generated data is an efficient and effective approach for LLM instruction-tuning than other machine generated data.
</p>
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item" style="margin-left: 2px;">
<a class="nav-link active" data-toggle="tab" href="#human" role="tab" aria-controls="human" style="background-color:azure;">Human Evaluation</a>
</li>
<li class="nav-item" style="margin-left: 10px;">
<a class="nav-link" data-toggle="tab" href="#gpt4" role="tab" aria-controls="gpt4" style="background-color:azure;">GPT-4 Evaluation</a>
</li>
<li class="nav-item" style="margin-left: 10px;">
<a class="nav-link" data-toggle="tab" href="#unnatural" role="tab" aria-controls="unnatural" style="background-color:azure;">Unnatural Instruction Evaluation</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="human" role="tabpanel">
<br>
Human evaluation was performed on model generation results using Amazon Mechanical Turk following Helpfulness, Honestness and Harmlessness criteria by <a href="https://arxiv.org/abs/2112.00861">Anthropic AI</a>. The results are summarized as follows:
<ul>
<li>Two instruction-tuned LLaMA models were compared, fine-tuned on data generated by GPT-4 and GPT-3 respectively.</li>
<li>LLaMA-GPT-4 performs substantially better than LLaMA-GPT-3 in the "Helpfulness" criterion.</li>
<li>LLaMA-GPT-4 performs similarly to the original GPT-4 in all three criteria, suggesting a promising direction for developing state-of-the-art instruction-following LLMs.</li>
</ul>
<div style="text-align: center;">
<img src="./images/pie_llama_gpt3_vs_llam_gpt4.png" alt="" width="60%">
</div>
<p style="color:gray; text-align: center;">
LLaMA-GPT4 vs Alpaca (i.e., LLaMA-GPT3)
</p>
<div style="text-align: center;">
<img src="./images/pie_llama_gpt4_vs_gpt4.png" alt="" width="60%">
</div>
<p style="color:gray; text-align: center;">
LLaMA-GPT4 vs GPT-4
</p>
</div>
<div class="tab-pane" id="gpt4" role="tabpanel">
<br>
Inspired by <a href="https://github.com/lm-sys/FastChat">Vicuna</a>, GPT-4 was used to evaluate the quality of responses generated by different chatbot models on 80 unseen questions. The responses from LLaMA-GPT-4 (7B) and GPT-4 were collected, and the release answers from other models were obtained from a previous study. GPT-4 was asked to rate the quality of responses between two models using a scale of 1 to 10, and the results were compared against a strong competing model (ChatGPT and GPT-4). <br><br>
<ul>
<li>The evaluation showed that the feedback data and reward model were effective in improving the performance of LLaMA.</li>
<li>LLaMA-GPT-4 outperformed LLaMA and Alpaca, but there was still a performance gap with large commercial chatbots like GPT-4.</li>
<li>The findings demonstrate the potential of instruction-tuning to enhance the performance of AI chatbots.</li>
</ul>
<div style="text-align: center;">
<img src="./images/GPT-4-Evaluations.png" alt="" width="60%">
</div>
<p style="color:gray; text-align: center;">
Evaluations Scores from GPT-4
</p>
</div>
<div class="tab-pane" id="unnatural" role="tabpanel">
<br>
<ul>
<li>Alpaca outperforms LLaMA-GPT4 and GPT-4 in terms of average ROUGE-L scores.</li>
<li>LLaMA-GPT4 and GPT-4 gradually perform better than Alpaca when the ground truth response length increases.</li>
<li>LLaMA-GPT4 can closely follow the behavior of GPT-4 across different subsets.</li>
<li>LLaMA-GPT4 and GPT-4 tend to generate responses that contain simple ground truth answers but add extra words to make the response more chat-like, which may lead to lower ROUGE-L scores.</li>
</ul>
<div style="text-align: center;">
<img src="./images/un_natural_instruction_evaluations.png" alt="" width="60%">
</div>
<p style="color:gray; text-align: center;">
ROUGE-L on Unnatural Instructions.
</p>
</div>
<!-- <div class="tab-pane" id="settings" role="tabpanel">..4.</div> -->
</div>
<h3 class=".display-3">Sample Responses Comparison </h3>
<p>
</p>
<ul class="nav nav-tabs" id="exampleTab" role="tablist">
<li class="nav-item" style="margin-left: 2px;">
<a class="nav-link active" data-toggle="tab" href="#llamagpt3gpt4" role="tab" aria-controls="human" style="background-color:azure;">LLaMA-GPT-4 vs LLaMA-Alpaca</a>
</li>
<li class="nav-item" style="margin-left: 10px;">
<a class="nav-link" data-toggle="tab" href="#llamagpt4gpt4" role="tab" aria-controls="gpt4" style="background-color:azure;">LLaMA-GPT-4 vs GPT-4</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="llamagpt3gpt4" role="tabpanel">
<br>
<select id="llamagpt3gpt4-selector" class="form-control">
<option value="" selected>--Select--</option>
</select>
<br>
<div class="card">
<h5 class="card-header">Instructions and Inputs</h5>
<div class="card-body">
<p class="card-text" id="llamagpt3gpt4input"></p>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="card">
<h5 class="card-header">LLaMA-GPT-4</h5>
<div class="card-body">
<p class="card-text" id="llamagpt3gpt4left"></p>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<h5 class="card-header">LLaMA-GPT-3</h5>
<div class="card-body">
<p class="card-text" id="llamagpt3gpt4right"></p>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="llamagpt4gpt4" role="tabpanel">
<br>
<select id="llamagpt4gpt4-selector" class="form-control">
<option value="" selected>--Select--</option>
</select>
<br>
<div class="card">
<h5 class="card-header">Instructions and Inputs</h5>
<div class="card-body">
<p class="card-text" id="llamagpt4gpt4input"></p>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="card">
<h5 class="card-header">LLaMA-GPT-4</h5>
<div class="card-body">
<p class="card-text" id="llamagpt4gpt4left"></p>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<h5 class="card-header">GPT-4</h5>
<div class="card-body">
<p class="card-text" id="llamagpt4gpt4right"></p>
</div>
</div>
</div>
</div>
</div>
</div>
<h3 class=".display-3">Citation</h3>
If the paper inspires you and the data is used in your research, please cite us:
<pre class="citation">@article{peng2023instruction,
title={Instruction Tuning with GPT-4},
author={Peng, Baolin and Li, Chunyuan and He, Pengcheng and Galley, Michel and Gao, Jianfeng},
journal={arXiv preprint arXiv:2304.03277},
year={2023}
}
</pre>
</div>
<div class="col-md-12" style="font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif">
<h3 class=".display-3">Release and License</h3>
The data is intended solely for research and non-commercial purposes. Its use is subject to the Terms of Use for data generated by OpenAI. If you discover any potential violations, please contact us. Additionally, the code is governed by the Apache License 2.0.
<br>
<br>
</div>
<div class="col-md-12" style="font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif">
<h3 class=".display-3">The Team </h3>
<a href="https://scholar.google.com/citations?user=u1CNjgwAAAAJ&hl=en" target="_blank">Baolin Peng</a><sup>*</sup>,
<a href="https://chunyuan.li/" target="_blank">Chunyuan Li</a><sup>*</sup>,
<a href="https://scholar.google.com/citations?user=TS1RoxAAAAAJ&hl=en" target="_blank">Pengcheng He</a><sup>*</sup>,
<a href="https://www.microsoft.com/en-us/research/people/mgalley/" target="_blank">Michel Galley</a>,
<a href="https://www.microsoft.com/en-us/research/people/jfgao/" target="_blank">Jianfeng Gao</a>
<br>
<sup>*</sup> Equal contribution
</div>
<div class="col-md-12" style="font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif">
<br>
<h3 class=".display-3">Acknowledgement </h3>
We thank Guoyin Wang, Haotian Liu and Hao Cheng for valuable discussions and insightful experience sharing on instruction-tuning language models.
We thank the LLaMA team for giving us access to their models.
<br>
<br>
</div>
</div>
</main>
<script>
$(document).ready(function() {
for (var i = 0; i < 100; i++) {
$('#llamagpt3gpt4-selector').append($('<option>', {
value: i,
text: "Example " + i.toString()
}));
}
});
$(document).ready(function() {
$('#llamagpt3gpt4-selector').on('change', function() {
var contentId = $(this).val();
if (contentId) {
$.ajax({
url: 'https://pfupbk-8000.csb.app/llamag3g4/' + contentId,
type: 'GET',
success: function(response) {
$('#llamagpt3gpt4input').html(response.instruction);
$('#llamagpt3gpt4left').html(response.left);
$('#llamagpt3gpt4right').html(response.right);
},
error: function(error) {
console.log(error);
}
});
} else {
$('.card-text').text('');
}
});
});
$(document).ready(function() {
for (var i = 0; i < 100; i++) {
$('#llamagpt4gpt4-selector').append($('<option>', {
value: i,
text: "Example " + i.toString()
}));
}
});
$(document).ready(function() {
$('#llamagpt4gpt4-selector').on('change', function() {
var contentId = $(this).val();
if (contentId) {
$.ajax({
url: 'https://pfupbk-8000.csb.app/llamag4g4/' + contentId,
type: 'GET',
success: function(response) {
$('#llamagpt4gpt4input').html(response.instruction);
$('#llamagpt4gpt4left').html(response.left);
$('#llamagpt4gpt4right').html(response.right);
},
error: function(error) {
console.log(error);
}
});
} else {
$('.card-text').text('');
}
});
});
</script>
</body>
</html>