smallfix: not sure what the point of this indirection was
This commit is contained in:
@@ -117,9 +117,8 @@ void free_run_state(RunState* s) {
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// initialization: read from checkpoint
|
// initialization: read from checkpoint
|
||||||
|
|
||||||
void checkpoint_init_weights(TransformerWeights *w, Config* p, float* f, int shared_weights) {
|
void checkpoint_init_weights(TransformerWeights *w, Config* p, float* ptr, int shared_weights) {
|
||||||
int head_size = p->dim / p->n_heads;
|
int head_size = p->dim / p->n_heads;
|
||||||
float* ptr = f;
|
|
||||||
w->token_embedding_table = ptr;
|
w->token_embedding_table = ptr;
|
||||||
ptr += p->vocab_size * p->dim;
|
ptr += p->vocab_size * p->dim;
|
||||||
w->rms_att_weight = ptr;
|
w->rms_att_weight = ptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user