@@ -12,6 +12,7 @@ struct BerserkModel : ChessModel {
1212 const float sigmoid_scale = 1.0 / 160.0 ;
1313 const float quant_one = 32.0 ;
1414 const float quant_two = 32.0 ;
15+ const float quant_three = 32.0 ;
1516
1617 const size_t n_features = 16 * 12 * 64 ;
1718 const size_t n_l1 = 16 ;
@@ -60,10 +61,10 @@ struct BerserkModel : ChessModel {
6061 QuantizerEntry<int16_t >(&ft->bias .values , quant_one),
6162 QuantizerEntry<int8_t >(&l1->weights .values , quant_two),
6263 QuantizerEntry<int32_t >(&l1->bias .values , quant_two),
63- QuantizerEntry<float >(&l2->weights .values , 1.0 ),
64- QuantizerEntry<float >(&l2->bias .values , quant_two ),
65- QuantizerEntry<float >(&pos_eval->weights .values , 1.0 ),
66- QuantizerEntry<float >(&pos_eval->bias .values , quant_two ),
64+ QuantizerEntry<int16_t >(&l2->weights .values , quant_three ),
65+ QuantizerEntry<int32_t >(&l2->bias .values , quant_three ),
66+ QuantizerEntry<int16_t >(&pos_eval->weights .values , quant_three ),
67+ QuantizerEntry<int32_t >(&pos_eval->bias .values , quant_three ),
6768 });
6869 }
6970
@@ -106,7 +107,7 @@ struct BerserkModel : ChessModel {
106107
107108 auto & target = m_loss->target ;
108109
109- #pragma omp parallel for schedule(static) num_threads(6 )
110+ #pragma omp parallel for schedule(static) num_threads(4 )
110111 for (int b = 0 ; b < positions->header .entry_count ; b++) {
111112 chess::Position* pos = &positions->positions [b];
112113 // fill in the inputs and target values
@@ -156,4 +157,4 @@ struct BerserkModel : ChessModel {
156157 }
157158};
158159
159- }
160+ } // namespace model
0 commit comments