Datasets:
Update README.md
Browse filesUpdate create_prompt method to reflect new schema.
README.md
CHANGED
@@ -59,20 +59,20 @@ def create_prompt(sample):
|
|
59 |
|
60 |
"""
|
61 |
bos_token = "<s>"
|
62 |
-
original_system_message = "
|
63 |
-
system_message = "
|
64 |
-
|
|
|
65 |
eos_token = "</s>"
|
66 |
|
67 |
full_prompt = ""
|
68 |
full_prompt += bos_token
|
69 |
-
full_prompt += "
|
70 |
-
full_prompt +=
|
71 |
-
full_prompt +=
|
72 |
-
full_prompt += eos_token
|
73 |
|
74 |
return full_prompt
|
75 |
-
|
76 |
...
|
77 |
|
78 |
from trl import SFTTrainer
|
|
|
59 |
|
60 |
"""
|
61 |
bos_token = "<s>"
|
62 |
+
original_system_message = "Below is an instruction that describes a task. Write a response that appropriately completes the request."
|
63 |
+
system_message = "Write a SQL query or use a function to answer the following question. Use the SQL dialect Presto for AWS Athena."
|
64 |
+
question = sample["question"].replace(original_system_message, "").strip()
|
65 |
+
response = sample["answer"].strip()
|
66 |
eos_token = "</s>"
|
67 |
|
68 |
full_prompt = ""
|
69 |
full_prompt += bos_token
|
70 |
+
full_prompt += "[INST] " + system_message + "\n\n"
|
71 |
+
full_prompt += question + " [/INST] "
|
72 |
+
full_prompt += response
|
73 |
+
full_prompt += eos_token + "\n"
|
74 |
|
75 |
return full_prompt
|
|
|
76 |
...
|
77 |
|
78 |
from trl import SFTTrainer
|