From 37cc5c8c39aae302ad49d1626805b714529f36c7 Mon Sep 17 00:00:00 2001 From: bstadt Date: Tue, 28 Mar 2023 20:22:48 +0000 Subject: [PATCH] updated eval --- configs/eval/generate_llama.yaml | 14 -------------- eval_figures.py | 8 ++++++-- figs/perplexity_hist.png | Bin 0 -> 15322 bytes 3 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 configs/eval/generate_llama.yaml create mode 100644 figs/perplexity_hist.png diff --git a/configs/eval/generate_llama.yaml b/configs/eval/generate_llama.yaml deleted file mode 100644 index 15a114c2..00000000 --- a/configs/eval/generate_llama.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# model/tokenizer -model_name: "zpn/llama-7b" -tokenizer_name: "zpn/llama-7b" - - -max_new_tokens: 512 -temperature: 0.001 -prompt: | - #this code prints a string reversed - my_string = "hello how are you" - print(len(my_string)) - - - My code above does not work. Can you help me? diff --git a/eval_figures.py b/eval_figures.py index 0126bda4..e1b50bbe 100644 --- a/eval_figures.py +++ b/eval_figures.py @@ -4,7 +4,7 @@ import numpy as np from matplotlib import pyplot as plt plt.figure() -for fpath in glob.glob('./eval_data/*multi*.pkl'): +for fpath in glob.glob('./eval_data/*.pkl'): parts = fpath.split('__') model_name = parts[1].replace('model-', '').replace('.pkl', '') lora_name = parts[2].replace('lora-', '').replace('.pkl', '') @@ -13,7 +13,11 @@ for fpath in glob.glob('./eval_data/*multi*.pkl'): perplexities = data['perplexities'] perplexities = np.nan_to_num(perplexities, 100) perplexities = np.clip(perplexities, 0, 100) - plt.hist(perplexities, label='{}-{}'.format(model_name, lora_name), alpha=.5) + if 'nomic' in fpath: + label = 'GPT4all-lora' + else: + label = 'alpaca-lora' + plt.hist(perplexities, label=label, alpha=.5) plt.xlabel('Perplexity') plt.ylabel('Frequency') diff --git a/figs/perplexity_hist.png b/figs/perplexity_hist.png new file mode 100644 index 0000000000000000000000000000000000000000..be3780b07bea2c62e34b20e68cf763bd3415de4f GIT binary patch literal 15322 zcmeHuXINC(*5(0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