Infer
infer(prompt, ckpt_dir, temperature, top_k, top_p, max_new_tokens, tensor_parallel_size, pipeline_model_parallel_size, context_parallel_size, output_file=None, ckpt_format='torch_dist', seed=None)
Inference workflow for Evo2.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prompt
|
str
|
Prompt to generate text from Evo2. |
required |
ckpt_dir
|
str
|
Path to checkpoint directory containing pre-trained Evo2 model. |
required |
temperature
|
float
|
Temperature during sampling for generation. |
required |
top_k
|
int
|
Top K during sampling for generation. |
required |
top_p
|
float
|
Top P during sampling for generation. |
required |
max_new_tokens
|
int
|
Maximum number of tokens to generate. |
required |
tensor_parallel_size
|
int
|
Order of tensor parallelism. |
required |
pipeline_model_parallel_size
|
int
|
Order of pipeline parallelism. |
required |
context_parallel_size
|
int
|
Order of context parallelism. |
required |
output_file
|
str
|
Output file containing the generated text produced by the Evo2 model. |
None
|
ckpt_format
|
CheckpointFormats
|
Checkpoint format to use. |
'torch_dist'
|
seed
|
int
|
Random seed for generation. |
None
|
Returns:
Type | Description |
---|---|
None |
Source code in bionemo/evo2/run/infer.py
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 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
|
main()
Main function for Evo2 inference.
Source code in bionemo/evo2/run/infer.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
|
parse_args()
Parse arguments for Evo2 inference.
Source code in bionemo/evo2/run/infer.py
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 |
|