docs: add clean inference Colab
Browse files- colab_clean_inference.ipynb +21 -0
colab_clean_inference.ipynb
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"nbformat": 4,
|
| 3 |
+
"nbformat_minor": 5,
|
| 4 |
+
"metadata": {
|
| 5 |
+
"kernelspec": {
|
| 6 |
+
"display_name": "Python 3",
|
| 7 |
+
"language": "python",
|
| 8 |
+
"name": "python3"
|
| 9 |
+
}
|
| 10 |
+
},
|
| 11 |
+
"cells": [
|
| 12 |
+
{
|
| 13 |
+
"cell_type": "code",
|
| 14 |
+
"source": "%pip -q install --upgrade --force-reinstall huggingface_hub\n[...]"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"cell_type": "code",
|
| 18 |
+
"source": "def harmony(d,u):\n return f\"<|im_start|>developer\\n{d}\\n<|im_end|>\\n<|im_start|>user\\n{u}\\n<|im_end|>\\n<|im_start|>assistant\\n\"\n[...output code...]"
|
| 19 |
+
}
|
| 20 |
+
]
|
| 21 |
+
}
|