asoria HF staff commited on
Commit
7e93b98
1 Parent(s): 38d2a78

Adding comparison section

Browse files
Files changed (1) hide show
  1. notebooks/sft.json +13 -1
notebooks/sft.json CHANGED
@@ -62,7 +62,19 @@
62
  },
63
  {
64
  "cell_type": "markdown",
65
- "source": "## 4. Push model to hub (Optional)"
 
 
 
 
 
 
 
 
 
 
 
 
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",