A DAG library to manage hyperparameter search and ablations
Project description
hpdag
Usage:
from hpdag import DAG,Node,Branch
dataset = Node("dataset")
lr = Node("lr")
with DAG() as dag:
datasets = Branch(
dataset("the_pile") >> lr(0.001), #for example, one dataset might require specific settings than the others
dataset( "c4") >> lr(0.01),
)
ablations = Branch( #do a type of ablation on each dataset
Node("use_glu")(True,False), #run the experiment with and without the glu
Node("positional_enc")("alibi","rotary"), #run the experiment with two different positional encodings
)
sizes = Node("size")("7b","3b") #run the experiment with two different sizes
datasets >> ablations >>sizes
print(dag)
Output:
Task(dataset=the_pile, lr=0.001, use_glu=True, size=7b)
Task(dataset=the_pile, lr=0.001, use_glu=True, size=3b)
Task(dataset=the_pile, lr=0.001, use_glu=False, size=7b)
Task(dataset=the_pile, lr=0.001, use_glu=False, size=3b)
Task(dataset=the_pile, lr=0.001, positional_enc=alibi, size=7b)
Task(dataset=the_pile, lr=0.001, positional_enc=alibi, size=3b)
Task(dataset=the_pile, lr=0.001, positional_enc=rotary, size=7b)
Task(dataset=the_pile, lr=0.001, positional_enc=rotary, size=3b)
Task(dataset=c4, lr=0.01, use_glu=True, size=7b)
Task(dataset=c4, lr=0.01, use_glu=True, size=3b)
Task(dataset=c4, lr=0.01, use_glu=False, size=7b)
Task(dataset=c4, lr=0.01, use_glu=False, size=3b)
Task(dataset=c4, lr=0.01, positional_enc=alibi, size=7b)
Task(dataset=c4, lr=0.01, positional_enc=alibi, size=3b)
Task(dataset=c4, lr=0.01, positional_enc=rotary, size=7b)
Task(dataset=c4, lr=0.01, positional_enc=rotary, size=3b)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hpdag-0.1.tar.gz
(1.5 kB
view hashes)
Built Distribution
hpdag-0.1-py3-none-any.whl
(1.5 kB
view hashes)