Skip to content

Commit

Permalink
add plots
Browse files Browse the repository at this point in the history
  • Loading branch information
Samoed committed May 13, 2024
1 parent 990b69c commit a7f4cb0
Show file tree
Hide file tree
Showing 40 changed files with 22,856 additions and 9 deletions.
728 changes: 728 additions & 0 deletions notebooks/plots.ipynb

Large diffs are not rendered by default.

Binary file added notebooks/plots/bert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,184 changes: 1,184 additions & 0 deletions notebooks/plots/bert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/plots/bert_Llama-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,065 changes: 1,065 additions & 0 deletions notebooks/plots/bert_Llama-3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/plots/bert_Phi-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,093 changes: 1,093 additions & 0 deletions notebooks/plots/bert_Phi-3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/plots/chrf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
956 changes: 956 additions & 0 deletions notebooks/plots/chrf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/plots/eval_bert_f1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
940 changes: 940 additions & 0 deletions notebooks/plots/eval_bert_f1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/plots/eval_bert_metrics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,456 changes: 1,456 additions & 0 deletions notebooks/plots/eval_bert_metrics.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/plots/eval_bert_precision.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,015 changes: 1,015 additions & 0 deletions notebooks/plots/eval_bert_precision.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/plots/eval_bert_recall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,047 changes: 1,047 additions & 0 deletions notebooks/plots/eval_bert_recall.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/plots/eval_chrf_score.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,079 changes: 1,079 additions & 0 deletions notebooks/plots/eval_chrf_score.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/plots/eval_rouge1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,099 changes: 1,099 additions & 0 deletions notebooks/plots/eval_rouge1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/plots/eval_rouge2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
979 changes: 979 additions & 0 deletions notebooks/plots/eval_rouge2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/plots/eval_rougeL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
917 changes: 917 additions & 0 deletions notebooks/plots/eval_rougeL.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added notebooks/plots/eval_rougeLsum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,088 changes: 1,088 additions & 0 deletions notebooks/plots/eval_rougeLsum.svg

Large diffs are not rendered by default.

Binary file added notebooks/plots/eval_rouge_metrics.png
1,419 changes: 1,419 additions & 0 deletions notebooks/plots/eval_rouge_metrics.svg

Large diffs are not rendered by default.

Binary file added notebooks/plots/eval_score.png
891 changes: 891 additions & 0 deletions notebooks/plots/eval_score.svg

Large diffs are not rendered by default.

Binary file added notebooks/plots/loss.png
2,585 changes: 2,585 additions & 0 deletions notebooks/plots/loss.svg

Large diffs are not rendered by default.

Binary file added notebooks/plots/rouge.png
1,169 changes: 1,169 additions & 0 deletions notebooks/plots/rouge.svg

Large diffs are not rendered by default.

Binary file added notebooks/plots/rouge_Llama-3.png
1,056 changes: 1,056 additions & 0 deletions notebooks/plots/rouge_Llama-3.svg

Large diffs are not rendered by default.

Binary file added notebooks/plots/rouge_Phi-3.png
1,087 changes: 1,087 additions & 0 deletions notebooks/plots/rouge_Phi-3.svg

Large diffs are not rendered by default.

12 changes: 3 additions & 9 deletions notebooks/trainunsloth.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -802,9 +802,7 @@
" labels = np.where(labels != -100, labels, tokenizer.pad_token_id)\n",
" labels = tokenizer.batch_decode(labels, skip_special_tokens=True)\n",
" rouge_score = rouge.compute(predictions=predictions, references=labels)\n",
" bert_score = bertscore.compute(\n",
" predictions=predictions, references=[[label] for label in labels], lang=\"en\"\n",
" )\n",
" bert_score = bertscore.compute(predictions=predictions, references=[[label] for label in labels], lang=\"en\")\n",
"\n",
" chrf_score = chrf.compute(predictions=predictions, references=labels, word_order=2)\n",
"\n",
Expand Down Expand Up @@ -1077,9 +1075,7 @@
" output_texts = []\n",
" if isinstance(examples, dict):\n",
" return PROMPT.format(examples[\"prompt\"], examples[\"completion\"])\n",
" for prompt, completion in zip(\n",
" examples[\"prompt\"], examples[\"completion\"], strict=False\n",
" ):\n",
" for prompt, completion in zip(examples[\"prompt\"], examples[\"completion\"], strict=False):\n",
" text = PROMPT.format(prompt, completion)\n",
" output_texts.append(text)\n",
" return output_texts"
Expand Down Expand Up @@ -1539,9 +1535,7 @@
"used_percentage = round(used_memory / max_memory * 100, 3)\n",
"lora_percentage = round(used_memory_for_lora / max_memory * 100, 3)\n",
"print(f\"{trainer_stats.metrics['train_runtime']} seconds used for training.\")\n",
"print(\n",
" f\"{round(trainer_stats.metrics['train_runtime']/60, 2)} minutes used for training.\"\n",
")\n",
"print(f\"{round(trainer_stats.metrics['train_runtime']/60, 2)} minutes used for training.\")\n",
"print(f\"Peak reserved memory = {used_memory} GB.\")\n",
"print(f\"Peak reserved memory for training = {used_memory_for_lora} GB.\")\n",
"print(f\"Peak reserved memory % of max memory = {used_percentage} %.\")\n",
Expand Down

0 comments on commit a7f4cb0

Please sign in to comment.