-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (28 loc) · 700 Bytes
/
main.cpp
File metadata and controls
29 lines (28 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <cstdio>
#include <iostream>
#include <memory>
#include "Macro.h"
#include "BF16.h"
#include "Tensor.h"
#include "Loader.h"
#include "Model.h"
int main(int argc, char * argv[])
{
if (argc != 2) {
printf("Usage: %s [Model File Path]\n", argv[0]);
return 0;
}
Model::ModelConfig config;
config.head_dim = HeadDim;
config.hidden_size = HiddenSize;
config.intermediate_size = InterSize;
config.num_head = NumHead;
config.num_kvhead = NumKvHead;
config.num_layer = NumLayer;
config.rms_eps = RMS_EPS;
config.vocabulary_size = VocabSize;
Model * model = new Model(config);
model->load(argv[1]);
delete model;
return 0;
}