updated eval

This commit is contained in:
bstadt 2023-03-28 20:22:48 +00:00
parent 6d98aef302
commit 37cc5c8c39
3 changed files with 6 additions and 16 deletions

View File

@ -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?

View File

@ -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')

BIN
figs/perplexity_hist.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB