Commit
·
9762a45
1
Parent(s):
229220e
Update README.md
Browse files
README.md
CHANGED
|
@@ -19,62 +19,4 @@ configs:
|
|
| 19 |
data_files:
|
| 20 |
- split: train
|
| 21 |
path: data/train-*
|
| 22 |
-
---
|
| 23 |
-
|
| 24 |
-
- Format for Instruction task
|
| 25 |
-
|
| 26 |
-
```python
|
| 27 |
-
def preprocess(
|
| 28 |
-
sample,
|
| 29 |
-
instruction_key="### Instruction:",
|
| 30 |
-
input_key="Input:",
|
| 31 |
-
response_key="### Response:",
|
| 32 |
-
end_key="<|endoftext|>"
|
| 33 |
-
):
|
| 34 |
-
|
| 35 |
-
instruction = sample['instruction']
|
| 36 |
-
input = sample['input']
|
| 37 |
-
response = sample['response']
|
| 38 |
-
|
| 39 |
-
if input:
|
| 40 |
-
return {'text': """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
|
| 41 |
-
{instruction_key}
|
| 42 |
-
{instruction}
|
| 43 |
-
{input_key}
|
| 44 |
-
{input}
|
| 45 |
-
{response_key}
|
| 46 |
-
{response}
|
| 47 |
-
{end_key}""".format(
|
| 48 |
-
instruction_key=instruction_key,
|
| 49 |
-
instruction=instruction,
|
| 50 |
-
input_key=input_key,
|
| 51 |
-
input=input,
|
| 52 |
-
response_key=response_key,
|
| 53 |
-
response=response,
|
| 54 |
-
end_key=end_key,
|
| 55 |
-
)}
|
| 56 |
-
else:
|
| 57 |
-
return {'text': """Below is an instruction that describes a task. Write a response that appropriately completes the request.
|
| 58 |
-
{instruction_key}
|
| 59 |
-
{instruction}
|
| 60 |
-
{response_key}
|
| 61 |
-
{response}
|
| 62 |
-
{end_key}""".format(
|
| 63 |
-
instruction_key=instruction_key,
|
| 64 |
-
instruction=instruction,
|
| 65 |
-
response_key=response_key,
|
| 66 |
-
response=response,
|
| 67 |
-
end_key=end_key,
|
| 68 |
-
)}
|
| 69 |
-
|
| 70 |
-
"""
|
| 71 |
-
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
|
| 72 |
-
### Instruction:
|
| 73 |
-
When did Virgin Australia start operating?
|
| 74 |
-
Input:
|
| 75 |
-
Virgin Australia, the trading name of Virgin Australia Airlines Pty Ltd, is an Australian-based airline. It is the largest airline by fleet size to use the Virgin brand. It commenced services on 31 August 2000 as Virgin Blue, with two aircraft on a single route.[3] It suddenly found itself as a major airline in Australia's domestic market after the collapse of Ansett Australia in September 2001. The airline has since grown to directly serve 32 cities in Australia, from hubs in Brisbane, Melbourne and Sydney.[4]
|
| 76 |
-
### Response:
|
| 77 |
-
Virgin Australia commenced services on 31 August 2000 as Virgin Blue, with two aircraft on a single route.
|
| 78 |
-
<|endoftext|>
|
| 79 |
-
"""
|
| 80 |
-
```
|
|
|
|
| 19 |
data_files:
|
| 20 |
- split: train
|
| 21 |
path: data/train-*
|
| 22 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|