Config
helical.models.hyena_dna.HyenaDNAConfig
Configuration class for Hyena DNA model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name
|
Literal['hyenadna-tiny-1k-seqlen', 'hyenadna-tiny-1k-seqlen-d256']
|
The name of the model. |
"hyenadna-tiny-1k-seqlen"
|
batch_size
|
int
|
The batch size to use for all tasks. |
5
|
n_layer
|
int
|
The number of layers in the model. |
2
|
vocab_size
|
int
|
The size of the vocabulary. |
12
|
resid_dropout
|
float
|
The dropout rate for residual connections. |
0.0
|
embed_dropout
|
float
|
The dropout rate for embedding layer. |
0.1
|
fused_mlp
|
bool
|
Whether to use fused MLP. |
False
|
fused_dropout_add_ln
|
bool
|
Whether to use fused dropout and layer normalization. |
True
|
residual_in_fp32
|
bool
|
Whether to use FP32 for residual connections. |
True
|
checkpoint_mixer
|
bool
|
Whether to use checkpointing for mixer layers. |
False
|
checkpoint_mlp
|
bool
|
Whether to use checkpointing for MLP layers. |
False
|
pad_vocab_size_multiple
|
int
|
The multiple to pad the vocabulary size. |
8
|
return_hidden_state
|
bool
|
Whether to return the hidden state. |
True
|
device
|
Literal['cpu', 'cuda']
|
The device to use. |
"cpu"
|
layer
|
dict
|
Dictionary containing layer-specific parameters. |
{"_name_": "hyena", "emb_dim": 5, "filter_order": 64, "local_order": 3, "l_max": 1026, "modulate": True, "w": 10, "lr": 6e-4, "wd": 0.0, "lr_pos_emb": 0.0}
|
Attributes:
Name | Type | Description |
---|---|---|
model_map |
dict
|
A dictionary mapping model names to their corresponding configuration parameters. |
config |
dict
|
A dictionary containing the configuration parameters for the Hyena DNA model. |
Raises:
Type | Description |
---|---|
ValueError
|
If the specified model name is not found in the available models. |
Source code in helical/models/hyena_dna/hyena_dna_config.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|