File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1111#pragma  warning(disable: 4244 4267) //  possible loss of data
1212#endif 
1313
14+ namespace  {
15+ 
1416#ifdef  LLAMA_DEFAULT_RMS_EPS
1517constexpr  float  rms_norm_eps = LLAMA_DEFAULT_RMS_EPS;
1618#else 
@@ -105,7 +107,7 @@ struct llama_hparams_lora {
105107    }
106108};
107109
108- struct  gpt_layer  {
110+ struct  llama_layer  {
109111    //  normalization
110112    struct  ggml_tensor  * attention_norm;
111113
@@ -169,7 +171,7 @@ struct llama_model {
169171    struct  ggml_tensor  * norm;
170172    struct  ggml_tensor  * output;
171173
172-     std::vector<gpt_layer > layers;
174+     std::vector<llama_layer > layers;
173175};
174176
175177struct  llama_model_lora  {
@@ -1432,7 +1434,7 @@ static struct ggml_tensor * cross_entropy_loss(
14321434                                ggml_new_f32 (ctx, eps)))))));
14331435}
14341436
1435- int  main (int  argc, char  ** argv) {
1437+ int  baby_llama_main (int  argc, char  ** argv) {
14361438    if  (argc < 1 ) {
14371439        fprintf (stderr, " usage: %s\n "  , argv[0 ]);
14381440
@@ -1637,3 +1639,9 @@ int main(int argc, char ** argv) {
16371639
16381640    return  0 ;
16391641}
1642+ 
1643+ }
1644+ 
1645+ int  main (int  argc, char  ** argv) {
1646+     return  baby_llama_main (argc, argv);
1647+ }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments