arach commited on
Commit
a88d687
·
verified ·
1 Parent(s): b8b95e5

Use lighter Colab defaults for news summarization notebook

Browse files
eval/news_summarization/notebook.ipynb CHANGED
@@ -13,7 +13,7 @@
13
  "This notebook pulls the benchmark code directly from the Hugging Face repo so it stays in sync with the HF page.\n",
14
  "\n",
15
  "Recommended first model:\n",
16
- "- `Qwen/Qwen2.5-7B-Instruct`\n"
17
  ]
18
  },
19
  {
@@ -77,11 +77,12 @@
77
  },
78
  "outputs": [],
79
  "source": [
80
- "MODEL = \"Qwen/Qwen2.5-7B-Instruct\"\n",
81
- "LIMIT = 50\n",
82
  "PROMPT_STYLE = \"simple\"\n",
83
  "DTYPE = \"bfloat16\"\n",
84
- "TRUST_REMOTE_CODE = True"
 
85
  ]
86
  },
87
  {
@@ -93,12 +94,14 @@
93
  "outputs": [],
94
  "source": [
95
  "trust_flag = \"--trust-remote-code\" if TRUST_REMOTE_CODE else \"\"\n",
 
96
  "!python eval/news_summarization/run_hf_transformers.py \\\n",
97
  " --model {MODEL} \\\n",
98
  " --limit {LIMIT} \\\n",
99
  " --prompt-style {PROMPT_STYLE} \\\n",
100
  " --dtype {DTYPE} \\\n",
101
  " --verbose \\\n",
 
102
  " {trust_flag}"
103
  ]
104
  },
@@ -111,12 +114,14 @@
111
  "outputs": [],
112
  "source": [
113
  "trust_flag = \"--trust-remote-code\" if TRUST_REMOTE_CODE else \"\"\n",
 
114
  "!python eval/news_summarization/run_hf_transformers.py \\\n",
115
  " --model {MODEL} \\\n",
116
  " --limit {LIMIT} \\\n",
117
  " --prompt-style {PROMPT_STYLE} \\\n",
118
  " --dtype {DTYPE} \\\n",
119
  " --resume \\\n",
 
120
  " {trust_flag}"
121
  ]
122
  },
 
13
  "This notebook pulls the benchmark code directly from the Hugging Face repo so it stays in sync with the HF page.\n",
14
  "\n",
15
  "Recommended first model:\n",
16
+ "- `Qwen/Qwen2.5-3B-Instruct`\n"
17
  ]
18
  },
19
  {
 
77
  },
78
  "outputs": [],
79
  "source": [
80
+ "MODEL = \"Qwen/Qwen2.5-3B-Instruct\"\n",
81
+ "LIMIT = 10\n",
82
  "PROMPT_STYLE = \"simple\"\n",
83
  "DTYPE = \"bfloat16\"\n",
84
+ "TRUST_REMOTE_CODE = False\n",
85
+ "DISABLE_BERTSCORE = True"
86
  ]
87
  },
88
  {
 
94
  "outputs": [],
95
  "source": [
96
  "trust_flag = \"--trust-remote-code\" if TRUST_REMOTE_CODE else \"\"\n",
97
+ "bertscore_flag = \"--disable-bertscore\" if DISABLE_BERTSCORE else \"\"\n",
98
  "!python eval/news_summarization/run_hf_transformers.py \\\n",
99
  " --model {MODEL} \\\n",
100
  " --limit {LIMIT} \\\n",
101
  " --prompt-style {PROMPT_STYLE} \\\n",
102
  " --dtype {DTYPE} \\\n",
103
  " --verbose \\\n",
104
+ " {bertscore_flag} \\\n",
105
  " {trust_flag}"
106
  ]
107
  },
 
114
  "outputs": [],
115
  "source": [
116
  "trust_flag = \"--trust-remote-code\" if TRUST_REMOTE_CODE else \"\"\n",
117
+ "bertscore_flag = \"--disable-bertscore\" if DISABLE_BERTSCORE else \"\"\n",
118
  "!python eval/news_summarization/run_hf_transformers.py \\\n",
119
  " --model {MODEL} \\\n",
120
  " --limit {LIMIT} \\\n",
121
  " --prompt-style {PROMPT_STYLE} \\\n",
122
  " --dtype {DTYPE} \\\n",
123
  " --resume \\\n",
124
+ " {bertscore_flag} \\\n",
125
  " {trust_flag}"
126
  ]
127
  },