Skip to content

Commit

Permalink
add D_effective plots
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangir-azerbayev committed Oct 30, 2023
1 parent d1984b0 commit 72fdb87
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
14 changes: 14 additions & 0 deletions analysis/hf_reanalysis/D_effective-raw.html

Large diffs are not rendered by default.

44 changes: 43 additions & 1 deletion analysis/hf_reanalysis/reanalysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@
"id": "e1e91ab4-ae5e-40ff-982e-713925b46922",
"metadata": {},
"source": [
"Visualize how epoch number affects the Chinchilla Scaling Law"
"Visualize how the multi-epoch training pulls away from the Chinchilla scaling law"
]
},
{
Expand Down Expand Up @@ -1026,6 +1026,48 @@
" savepath='single-epoch-runs-fitted-multiepoch-D-residuals.html'\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 42,
"id": "1e63c213-4286-468c-a0ea-93d336c98293",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"def compute_effective_data(params, L, N):\n",
" a, b, e, alpha, beta = params\n",
" \n",
" quot = np.exp(b) / (L - np.exp(e) - np.exp(a)/N**alpha)\n",
" \n",
" return np.power(quot, 1/beta)"
]
},
{
"cell_type": "code",
"execution_count": 43,
"id": "831a3693-9b00-4bca-b36e-9df1bf170374",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"runs = {\n",
" **runs, \n",
" 'D_effective': compute_effective_data(best_result.x, runs['L'], runs['N'])\n",
"}\n",
"\n",
"scaling_scatter(\n",
" runs,\n",
" x_key='D',\n",
" y_key='R',\n",
" z_key='N',\n",
" color_key='D_effective',\n",
" color_type='log',\n",
" savepath='D_effective-raw.html',\n",
")"
]
}
],
"metadata": {
Expand Down

0 comments on commit 72fdb87

Please sign in to comment.