Spaces:
Running
Running
Adding comparison section
Browse files- notebooks/sft.json +13 -1
notebooks/sft.json
CHANGED
|
@@ -62,7 +62,19 @@
|
|
| 62 |
},
|
| 63 |
{
|
| 64 |
"cell_type": "markdown",
|
| 65 |
-
"source": "## 4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
},
|
| 67 |
{
|
| 68 |
"cell_type": "code",
|
|
|
|
| 62 |
},
|
| 63 |
{
|
| 64 |
"cell_type": "markdown",
|
| 65 |
+
"source": "## 4. Compare model output vs original"
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"cell_type": "code",
|
| 69 |
+
"source": "from transformers import pipeline, AutoTokenizer\n\nmy_model = trainer.model\ntokenizer = AutoTokenizer.from_pretrained(model_name)\n\nmy_pipe = pipeline('text-generation', model=my_model, tokenizer=tokenizer)\noriginal_pipe = pipeline('text-generation', model=model_name)"
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"cell_type": "code",
|
| 73 |
+
"source": "print(original_pipe('Hello'))\nprint(my_pipe('Hello'))"
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"cell_type": "markdown",
|
| 77 |
+
"source": "## 5. Push model to hub (Optional)"
|
| 78 |
},
|
| 79 |
{
|
| 80 |
"cell_type": "code",
|