forked from nomic-ai/gpt4all
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# model/tokenizer | ||
model_name: "zpn/llama-7b" | ||
tokenizer_name: "zpn/llama-7b" | ||
lora: true | ||
lora_path: "tloen/alpaca-lora-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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# model/tokenizer | ||
model_name: "nomic-ai/vicuna-full-multi-turn_epoch_0" | ||
tokenizer_name: "zpn/llama-7b" | ||
lora_path: "no-lora" | ||
|
||
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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# model/tokenizer | ||
model_name: "zpn/llama-7b" | ||
tokenizer_name: "zpn/llama-7b" | ||
lora: true | ||
lora_path: "nomic-ai/vicuna-lora-multi-turn_epoch_2" | ||
|
||
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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# model/tokenizer | ||
model_name: "zpn/llama-7b" | ||
tokenizer_name: "zpn/llama-7b" | ||
lora: true | ||
lora_path: "nomic-ai/vicuna-lora-multi-turn_epoch_3" | ||
|
||
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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import glob | ||
import pickle | ||
import numpy as np | ||
from matplotlib import pyplot as plt | ||
|
||
plt.figure() | ||
for fpath in glob.glob('./eval_data/*multi*.pkl'): | ||
parts = fpath.split('__') | ||
model_name = parts[1].replace('model-', '').replace('.pkl', '') | ||
lora_name = parts[2].replace('lora-', '').replace('.pkl', '') | ||
with open(fpath, 'rb') as f: | ||
data = pickle.load(f) | ||
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) | ||
|
||
plt.xlabel('Perplexity') | ||
plt.ylabel('Frequency') | ||
plt.legend() | ||
plt.savefig('figs/perplexity_hist.png') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters