Commit
•
5c9e612
1
Parent(s):
69a533b
Update src/distilabel_dataset_generator/pipelines/sft.py
Browse files
src/distilabel_dataset_generator/pipelines/sft.py
CHANGED
@@ -116,19 +116,26 @@ User dataset description:
|
|
116 |
|
117 |
MODEL = "meta-llama/Meta-Llama-3.1-70B-Instruct"
|
118 |
DEFAULT_DATASET_DESCRIPTIONS = (
|
119 |
-
"
|
120 |
"highly proficient assistant for PyTorch and CUDA expert developers to resolve complex issues",
|
121 |
"skilled high school math assistant who helps students solve problems",
|
122 |
"attentive and well-educated customer service assistant for a clothes e-commerce platform",
|
123 |
)
|
124 |
-
DEFAULT_SYSTEM_PROMPT = "You are an AI assistant specialized in
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
DEFAULT_DATASET = pd.DataFrame(
|
126 |
{
|
127 |
"prompt": [
|
128 |
-
"
|
129 |
],
|
130 |
"completion": [
|
131 |
-
"""
|
132 |
],
|
133 |
}
|
134 |
)
|
@@ -302,4 +309,4 @@ if __name__ == "__main__":
|
|
302 |
)
|
303 |
)[0]["generation"]
|
304 |
pipeline = get_pipeline(num_rows=100, num_turns=1, system_prompt=result)
|
305 |
-
pipeline.run()
|
|
|
116 |
|
117 |
MODEL = "meta-llama/Meta-Llama-3.1-70B-Instruct"
|
118 |
DEFAULT_DATASET_DESCRIPTIONS = (
|
119 |
+
"assistant that solves complex math problems using python, it only responds with python code",
|
120 |
"highly proficient assistant for PyTorch and CUDA expert developers to resolve complex issues",
|
121 |
"skilled high school math assistant who helps students solve problems",
|
122 |
"attentive and well-educated customer service assistant for a clothes e-commerce platform",
|
123 |
)
|
124 |
+
DEFAULT_SYSTEM_PROMPT = """You are an AI assistant specialized in solving complex mathematical problems using Python.
|
125 |
+
|
126 |
+
Your purpose is to provide users with executable and well-documented Python code that accurately solves mathematical problems, ranging from simple algebra to advanced calculus, and including linear algebra, differential equations, and more.
|
127 |
+
|
128 |
+
Users will ask questions in natural language
|
129 |
+
|
130 |
+
Respond with concise Python code that is easy to understand and includes necessary libraries, comments, and variable definitions, focusing solely on providing the solution in code without explaining the math behind it.
|
131 |
+
"""
|
132 |
DEFAULT_DATASET = pd.DataFrame(
|
133 |
{
|
134 |
"prompt": [
|
135 |
+
"Find the roots of the equation y = 2x^3 - 3x^2 - 5x + 1, using the numpy library in Python."
|
136 |
],
|
137 |
"completion": [
|
138 |
+
"""```python import numpy as np # Define the coefficients of the polynomial a = 2 b = -3 c = -5 d = 1 # Create a polynomial object p = np.poly1d([a, b, c, d]) # Find the roots of the polynomial roots = np.roots(p) print("The roots of the equation are: ", roots) ``` This code uses the `np.poly1d` function to create a polynomial object from the coefficients, and then the `np.roots` function to find the roots of the polynomial. The roots are then printed to the console."""
|
139 |
],
|
140 |
}
|
141 |
)
|
|
|
309 |
)
|
310 |
)[0]["generation"]
|
311 |
pipeline = get_pipeline(num_rows=100, num_turns=1, system_prompt=result)
|
312 |
+
pipeline.run()
|