Commit
·
a8cfebd
1
Parent(s):
241ab60
update example
Browse files
examples/fine-tune-smollm2-on-synthetic-data.ipynb
CHANGED
@@ -247,10 +247,19 @@
|
|
247 |
"text": [
|
248 |
"Device set to use mps\n"
|
249 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
}
|
251 |
],
|
252 |
"source": [
|
253 |
-
"from transformers import pipeline\n",
|
254 |
"prompt = \"What is the primary function of mitochondria within a cell?\"\n",
|
255 |
"generator = pipeline(\n",
|
256 |
" \"text-generation\",\n",
|
@@ -272,7 +281,7 @@
|
|
272 |
"\n",
|
273 |
"In practice, you would likely want to spend more time on the data quality and fine-tuning the model but the flow shows the Synthetic Data Generator is a great tool to generate synthetic data for any task.\n",
|
274 |
"\n",
|
275 |
-
"Overall, I think it is pretty cool for
|
276 |
]
|
277 |
}
|
278 |
],
|
|
|
247 |
"text": [
|
248 |
"Device set to use mps\n"
|
249 |
]
|
250 |
+
},
|
251 |
+
{
|
252 |
+
"data": {
|
253 |
+
"text/plain": [
|
254 |
+
"'The primary function of mitochondria is to generate energy for the cell. They are organelles found in eukaryotic cells that convert nutrients into ATP (adenosine triphosphate), which is the primary source of energy for cellular processes.\\nMitochondria are responsible for:\\n\\nEnergy production: Mitochondria produce ATP through a process called oxidative phosphorylation, which involves the transfer of electrons from food molecules to oxygen.\\nEnergy storage: Mitochondria store energy in the form of adenosine triphosphate (ATP), which is used by the cell for various cellular processes.\\nCellular respiration: Mitochondria also participate in cellular respiration, a'"
|
255 |
+
]
|
256 |
+
},
|
257 |
+
"execution_count": 12,
|
258 |
+
"metadata": {},
|
259 |
+
"output_type": "execute_result"
|
260 |
}
|
261 |
],
|
262 |
"source": [
|
|
|
263 |
"prompt = \"What is the primary function of mitochondria within a cell?\"\n",
|
264 |
"generator = pipeline(\n",
|
265 |
" \"text-generation\",\n",
|
|
|
281 |
"\n",
|
282 |
"In practice, you would likely want to spend more time on the data quality and fine-tuning the model but the flow shows the Synthetic Data Generator is a great tool to generate synthetic data for any task.\n",
|
283 |
"\n",
|
284 |
+
"Overall, I think it is pretty cool for a couple of hours of generation and fine-tuning on consumer hardware.\n"
|
285 |
]
|
286 |
}
|
287 |
],
|