loubnabnl HF staff commited on
Commit
a1f21e6
·
verified ·
1 Parent(s): 0480c11

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +71 -139
README.md CHANGED
@@ -7,16 +7,55 @@ metrics:
7
  - recall
8
  - accuracy
9
  model-index:
10
- - name: classifier-llama3-python-500k
11
  results: []
12
  ---
13
 
14
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
15
- should probably proofread and complete it, then remove this comment. -->
16
 
17
- # classifier-llama3-python-500k
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
- This model is a fine-tuned version of [bigcode/starencoder](https://huggingface.co/bigcode/starencoder) on an unknown dataset.
20
  It achieves the following results on the evaluation set:
21
  - Loss: 0.4216
22
  - Precision: 0.5822
@@ -26,150 +65,43 @@ It achieves the following results on the evaluation set:
26
  - F1 Binary Minimum3: 0.8018
27
  - F1 Binary Minimum2: 0.9438
28
 
29
- ## Model description
30
-
31
- More information needed
32
 
33
- ## Intended uses & limitations
34
-
35
- More information needed
36
-
37
- ## Training and evaluation data
38
 
39
- More information needed
40
-
41
- ## Training procedure
42
 
43
  ### Training hyperparameters
44
 
45
  The following hyperparameters were used during training:
46
- - learning_rate: 0.0001
47
- - train_batch_size: 16
48
  - eval_batch_size: 256
49
  - seed: 0
50
  - distributed_type: multi-GPU
51
- - num_devices: 8
52
  - total_train_batch_size: 128
53
- - total_eval_batch_size: 2048
54
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
55
  - lr_scheduler_type: linear
56
  - lr_scheduler_warmup_steps: 200
57
- - num_epochs: 30
58
-
59
- ### Training results
60
-
61
- | Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 Macro | Accuracy | F1 Binary Minimum3 | F1 Binary Minimum2 |
62
- |:-------------:|:-------:|:------:|:---------------:|:---------:|:------:|:--------:|:--------:|:------------------:|:------------------:|
63
- | No log | 0 | 0 | 7.4938 | 0.0265 | 0.2 | 0.0468 | 0.1326 | 0 | 0 |
64
- | 0.4898 | 0.2880 | 1000 | 0.4759 | 0.5180 | 0.3927 | 0.4073 | 0.5474 | 0.7902 | 0.9395 |
65
- | 0.4733 | 0.5760 | 2000 | 0.4696 | 0.5338 | 0.3984 | 0.4131 | 0.5493 | 0.7767 | 0.9400 |
66
- | 0.4761 | 0.8641 | 3000 | 0.4571 | 0.5266 | 0.4080 | 0.4235 | 0.5573 | 0.7893 | 0.9410 |
67
- | 0.4473 | 1.1521 | 4000 | 0.4589 | 0.5171 | 0.4061 | 0.4202 | 0.5522 | 0.7806 | 0.9389 |
68
- | 0.4472 | 1.4401 | 5000 | 0.4686 | 0.5557 | 0.4135 | 0.4280 | 0.5503 | 0.7991 | 0.9416 |
69
- | 0.4399 | 1.7281 | 6000 | 0.4508 | 0.5605 | 0.4184 | 0.4359 | 0.5599 | 0.7988 | 0.9421 |
70
- | 0.4511 | 2.0161 | 7000 | 0.4467 | 0.5597 | 0.4183 | 0.4357 | 0.5615 | 0.7927 | 0.9402 |
71
- | 0.445 | 2.3041 | 8000 | 0.4441 | 0.5395 | 0.4167 | 0.4326 | 0.5618 | 0.7913 | 0.9412 |
72
- | 0.4554 | 2.5922 | 9000 | 0.4486 | 0.5640 | 0.4197 | 0.4372 | 0.5609 | 0.7999 | 0.9415 |
73
- | 0.4499 | 2.8802 | 10000 | 0.4428 | 0.5702 | 0.4225 | 0.4405 | 0.5633 | 0.7990 | 0.9419 |
74
- | 0.4492 | 3.1682 | 11000 | 0.4651 | 0.5714 | 0.4279 | 0.4459 | 0.5549 | 0.8015 | 0.9420 |
75
- | 0.4459 | 3.4562 | 12000 | 0.4401 | 0.5690 | 0.4190 | 0.4368 | 0.5646 | 0.7986 | 0.9418 |
76
- | 0.4469 | 3.7442 | 13000 | 0.4428 | 0.5753 | 0.4189 | 0.4378 | 0.5625 | 0.7976 | 0.9405 |
77
- | 0.459 | 4.0323 | 14000 | 0.4385 | 0.5729 | 0.4229 | 0.4415 | 0.5661 | 0.7955 | 0.9421 |
78
- | 0.4543 | 4.3203 | 15000 | 0.4418 | 0.5721 | 0.4220 | 0.4404 | 0.5629 | 0.8009 | 0.9408 |
79
- | 0.442 | 4.6083 | 16000 | 0.4488 | 0.5803 | 0.4207 | 0.4388 | 0.5595 | 0.8028 | 0.9412 |
80
- | 0.4525 | 4.8963 | 17000 | 0.4469 | 0.5712 | 0.4174 | 0.4338 | 0.5597 | 0.8005 | 0.9399 |
81
- | 0.4539 | 5.1843 | 18000 | 0.4371 | 0.5867 | 0.4183 | 0.4372 | 0.5659 | 0.7996 | 0.9421 |
82
- | 0.4527 | 5.4724 | 19000 | 0.4371 | 0.5707 | 0.4269 | 0.4450 | 0.5653 | 0.7920 | 0.9413 |
83
- | 0.455 | 5.7604 | 20000 | 0.4364 | 0.5712 | 0.4288 | 0.4494 | 0.5664 | 0.7982 | 0.9416 |
84
- | 0.4519 | 6.0484 | 21000 | 0.4371 | 0.5805 | 0.4274 | 0.4479 | 0.5667 | 0.8012 | 0.9421 |
85
- | 0.4293 | 6.3364 | 22000 | 0.4351 | 0.5841 | 0.4214 | 0.4412 | 0.5669 | 0.7989 | 0.9424 |
86
- | 0.4441 | 6.6244 | 23000 | 0.4360 | 0.5707 | 0.4272 | 0.4456 | 0.5667 | 0.7933 | 0.9413 |
87
- | 0.4376 | 6.9124 | 24000 | 0.4360 | 0.5652 | 0.4262 | 0.4450 | 0.5652 | 0.7933 | 0.9412 |
88
- | 0.4357 | 7.2005 | 25000 | 0.4382 | 0.5716 | 0.4244 | 0.4441 | 0.5647 | 0.8009 | 0.9411 |
89
- | 0.4513 | 7.4885 | 26000 | 0.4382 | 0.5764 | 0.4245 | 0.4425 | 0.5629 | 0.7857 | 0.9410 |
90
- | 0.422 | 7.7765 | 27000 | 0.4344 | 0.5736 | 0.4256 | 0.4456 | 0.5670 | 0.7967 | 0.9418 |
91
- | 0.4317 | 8.0645 | 28000 | 0.4343 | 0.5799 | 0.4209 | 0.4406 | 0.5658 | 0.7995 | 0.9413 |
92
- | 0.4458 | 8.3525 | 29000 | 0.4339 | 0.5793 | 0.4307 | 0.4521 | 0.5686 | 0.8015 | 0.9431 |
93
- | 0.4591 | 8.6406 | 30000 | 0.4382 | 0.5869 | 0.4260 | 0.4470 | 0.5655 | 0.8031 | 0.9420 |
94
- | 0.4313 | 8.9286 | 31000 | 0.4364 | 0.5717 | 0.4352 | 0.4577 | 0.5681 | 0.8022 | 0.9426 |
95
- | 0.4201 | 9.2166 | 32000 | 0.4328 | 0.5686 | 0.4326 | 0.4540 | 0.5691 | 0.7958 | 0.9420 |
96
- | 0.4433 | 9.5046 | 33000 | 0.4378 | 0.5778 | 0.4339 | 0.4554 | 0.5674 | 0.8036 | 0.9428 |
97
- | 0.4404 | 9.7926 | 34000 | 0.4339 | 0.5855 | 0.4292 | 0.4516 | 0.5692 | 0.8021 | 0.9434 |
98
- | 0.4324 | 10.0806 | 35000 | 0.4318 | 0.5695 | 0.4316 | 0.4533 | 0.5685 | 0.7985 | 0.9424 |
99
- | 0.4393 | 10.3687 | 36000 | 0.4365 | 0.5804 | 0.4307 | 0.4529 | 0.5672 | 0.8040 | 0.9425 |
100
- | 0.4334 | 10.6567 | 37000 | 0.4304 | 0.5780 | 0.4308 | 0.4525 | 0.5700 | 0.7996 | 0.9424 |
101
- | 0.4396 | 10.9447 | 38000 | 0.4311 | 0.5691 | 0.4329 | 0.4547 | 0.5708 | 0.8001 | 0.9427 |
102
- | 0.4398 | 11.2327 | 39000 | 0.4362 | 0.5732 | 0.4356 | 0.4579 | 0.5681 | 0.8040 | 0.9426 |
103
- | 0.4568 | 11.5207 | 40000 | 0.4305 | 0.5814 | 0.4299 | 0.4516 | 0.5700 | 0.7998 | 0.9424 |
104
- | 0.4459 | 11.8088 | 41000 | 0.4307 | 0.5793 | 0.4339 | 0.4562 | 0.5705 | 0.8017 | 0.9427 |
105
- | 0.4326 | 12.0968 | 42000 | 0.4326 | 0.5821 | 0.4331 | 0.4559 | 0.5693 | 0.8026 | 0.9431 |
106
- | 0.4343 | 12.3848 | 43000 | 0.4320 | 0.5751 | 0.4347 | 0.4578 | 0.5702 | 0.8026 | 0.9430 |
107
- | 0.4247 | 12.6728 | 44000 | 0.4292 | 0.5768 | 0.4360 | 0.4592 | 0.5713 | 0.8011 | 0.9429 |
108
- | 0.4285 | 12.9608 | 45000 | 0.4414 | 0.5789 | 0.4342 | 0.4566 | 0.5652 | 0.8054 | 0.9425 |
109
- | 0.4304 | 13.2488 | 46000 | 0.4305 | 0.5767 | 0.4354 | 0.4584 | 0.5709 | 0.8028 | 0.9432 |
110
- | 0.4211 | 13.5369 | 47000 | 0.4279 | 0.5759 | 0.4323 | 0.4542 | 0.5712 | 0.7996 | 0.9425 |
111
- | 0.4451 | 13.8249 | 48000 | 0.4280 | 0.5906 | 0.4282 | 0.4507 | 0.5723 | 0.8002 | 0.9437 |
112
- | 0.4298 | 14.1129 | 49000 | 0.4295 | 0.5799 | 0.4278 | 0.4488 | 0.5680 | 0.7921 | 0.9424 |
113
- | 0.4328 | 14.4009 | 50000 | 0.4283 | 0.5804 | 0.4349 | 0.4587 | 0.5717 | 0.8014 | 0.9431 |
114
- | 0.4366 | 14.6889 | 51000 | 0.4276 | 0.5777 | 0.4367 | 0.4606 | 0.5718 | 0.8007 | 0.9433 |
115
- | 0.4225 | 14.9770 | 52000 | 0.4333 | 0.5690 | 0.4382 | 0.4614 | 0.5693 | 0.8039 | 0.9421 |
116
- | 0.4411 | 15.2650 | 53000 | 0.4280 | 0.5738 | 0.4327 | 0.4559 | 0.5711 | 0.8013 | 0.9428 |
117
- | 0.4279 | 15.5530 | 54000 | 0.4273 | 0.5787 | 0.4349 | 0.4589 | 0.5720 | 0.8016 | 0.9433 |
118
- | 0.418 | 15.8410 | 55000 | 0.4283 | 0.5747 | 0.4328 | 0.4542 | 0.5694 | 0.7920 | 0.9423 |
119
- | 0.4472 | 16.1290 | 56000 | 0.4276 | 0.5761 | 0.4350 | 0.4560 | 0.5712 | 0.7953 | 0.9426 |
120
- | 0.426 | 16.4171 | 57000 | 0.4260 | 0.5910 | 0.4283 | 0.4514 | 0.5725 | 0.7983 | 0.9438 |
121
- | 0.437 | 16.7051 | 58000 | 0.4298 | 0.5777 | 0.4354 | 0.4589 | 0.5708 | 0.8040 | 0.9430 |
122
- | 0.4289 | 16.9931 | 59000 | 0.4272 | 0.5741 | 0.4382 | 0.4619 | 0.5725 | 0.8019 | 0.9435 |
123
- | 0.4454 | 17.2811 | 60000 | 0.4254 | 0.5921 | 0.4311 | 0.4542 | 0.5734 | 0.8013 | 0.9433 |
124
- | 0.4367 | 17.5691 | 61000 | 0.4273 | 0.5792 | 0.4377 | 0.4625 | 0.5726 | 0.8021 | 0.9432 |
125
- | 0.4555 | 17.8571 | 62000 | 0.4259 | 0.5746 | 0.4379 | 0.4616 | 0.5725 | 0.7998 | 0.9430 |
126
- | 0.4351 | 18.1452 | 63000 | 0.4257 | 0.5776 | 0.4334 | 0.4566 | 0.5719 | 0.7972 | 0.9431 |
127
- | 0.4334 | 18.4332 | 64000 | 0.4247 | 0.5813 | 0.4378 | 0.4622 | 0.5739 | 0.7988 | 0.9437 |
128
- | 0.423 | 18.7212 | 65000 | 0.4261 | 0.5783 | 0.4343 | 0.4573 | 0.5713 | 0.7934 | 0.9426 |
129
- | 0.4433 | 19.0092 | 66000 | 0.4248 | 0.5756 | 0.4352 | 0.4591 | 0.5730 | 0.7996 | 0.9433 |
130
- | 0.4355 | 19.2972 | 67000 | 0.4241 | 0.5822 | 0.4378 | 0.4623 | 0.5738 | 0.8012 | 0.9436 |
131
- | 0.4268 | 19.5853 | 68000 | 0.4308 | 0.5814 | 0.4356 | 0.4589 | 0.5706 | 0.8044 | 0.9426 |
132
- | 0.4291 | 19.8733 | 69000 | 0.4297 | 0.5802 | 0.4351 | 0.4587 | 0.5696 | 0.8044 | 0.9427 |
133
- | 0.4291 | 20.1613 | 70000 | 0.4247 | 0.5799 | 0.4361 | 0.4598 | 0.5738 | 0.8020 | 0.9433 |
134
- | 0.419 | 20.4493 | 71000 | 0.4241 | 0.5820 | 0.4363 | 0.4606 | 0.5739 | 0.8012 | 0.9434 |
135
- | 0.4264 | 20.7373 | 72000 | 0.4282 | 0.5817 | 0.4369 | 0.4613 | 0.5714 | 0.8042 | 0.9430 |
136
- | 0.4259 | 21.0253 | 73000 | 0.4239 | 0.5794 | 0.4353 | 0.4588 | 0.5729 | 0.7969 | 0.9431 |
137
- | 0.422 | 21.3134 | 74000 | 0.4230 | 0.5843 | 0.4376 | 0.4622 | 0.5744 | 0.7990 | 0.9437 |
138
- | 0.4312 | 21.6014 | 75000 | 0.4247 | 0.5835 | 0.4340 | 0.4585 | 0.5725 | 0.8012 | 0.9430 |
139
- | 0.4103 | 21.8894 | 76000 | 0.4245 | 0.5804 | 0.4409 | 0.4664 | 0.5732 | 0.8026 | 0.9436 |
140
- | 0.4473 | 22.1774 | 77000 | 0.4235 | 0.5831 | 0.4360 | 0.4603 | 0.5738 | 0.8008 | 0.9434 |
141
- | 0.4205 | 22.4654 | 78000 | 0.4244 | 0.5807 | 0.4357 | 0.4600 | 0.5733 | 0.8021 | 0.9433 |
142
- | 0.4294 | 22.7535 | 79000 | 0.4229 | 0.5862 | 0.4342 | 0.4584 | 0.5741 | 0.8011 | 0.9434 |
143
- | 0.4467 | 23.0415 | 80000 | 0.4232 | 0.5749 | 0.4401 | 0.4649 | 0.5740 | 0.8009 | 0.9432 |
144
- | 0.4296 | 23.3295 | 81000 | 0.4229 | 0.5812 | 0.4381 | 0.4629 | 0.5743 | 0.8006 | 0.9433 |
145
- | 0.4308 | 23.6175 | 82000 | 0.4235 | 0.5758 | 0.4442 | 0.4698 | 0.5746 | 0.8022 | 0.9438 |
146
- | 0.4251 | 23.9055 | 83000 | 0.4219 | 0.5862 | 0.4358 | 0.4602 | 0.5747 | 0.8003 | 0.9436 |
147
- | 0.4383 | 24.1935 | 84000 | 0.4229 | 0.5784 | 0.4381 | 0.4626 | 0.5743 | 0.8015 | 0.9432 |
148
- | 0.4309 | 24.4816 | 85000 | 0.4219 | 0.5837 | 0.4372 | 0.4618 | 0.5748 | 0.8001 | 0.9434 |
149
- | 0.4245 | 24.7696 | 86000 | 0.4222 | 0.5810 | 0.4391 | 0.4633 | 0.5748 | 0.7982 | 0.9435 |
150
- | 0.4227 | 25.0576 | 87000 | 0.4221 | 0.5836 | 0.4362 | 0.4606 | 0.5743 | 0.7991 | 0.9435 |
151
- | 0.4224 | 25.3456 | 88000 | 0.4220 | 0.5775 | 0.4416 | 0.4664 | 0.5744 | 0.7998 | 0.9433 |
152
- | 0.4247 | 25.6336 | 89000 | 0.4227 | 0.5854 | 0.4382 | 0.4632 | 0.5743 | 0.8028 | 0.9434 |
153
- | 0.416 | 25.9217 | 90000 | 0.4230 | 0.5760 | 0.4427 | 0.4675 | 0.5746 | 0.8018 | 0.9434 |
154
- | 0.4221 | 26.2097 | 91000 | 0.4215 | 0.5820 | 0.4390 | 0.4638 | 0.5752 | 0.8012 | 0.9439 |
155
- | 0.4126 | 26.4977 | 92000 | 0.4263 | 0.5836 | 0.4391 | 0.4641 | 0.5723 | 0.8050 | 0.9431 |
156
- | 0.424 | 26.7857 | 93000 | 0.4215 | 0.5828 | 0.4381 | 0.4627 | 0.5750 | 0.7986 | 0.9438 |
157
- | 0.4272 | 27.0737 | 94000 | 0.4239 | 0.5853 | 0.4403 | 0.4660 | 0.5740 | 0.8040 | 0.9438 |
158
- | 0.4306 | 27.3618 | 95000 | 0.4235 | 0.5801 | 0.4399 | 0.4651 | 0.5736 | 0.8029 | 0.9435 |
159
- | 0.4164 | 27.6498 | 96000 | 0.4219 | 0.5801 | 0.4405 | 0.4656 | 0.5747 | 0.8015 | 0.9437 |
160
- | 0.431 | 27.9378 | 97000 | 0.4213 | 0.5791 | 0.4393 | 0.4637 | 0.5748 | 0.7993 | 0.9434 |
161
- | 0.4284 | 28.2258 | 98000 | 0.4227 | 0.5826 | 0.4402 | 0.4658 | 0.5744 | 0.8033 | 0.9435 |
162
- | 0.4289 | 28.5138 | 99000 | 0.4216 | 0.5845 | 0.4384 | 0.4634 | 0.5749 | 0.8009 | 0.9438 |
163
- | 0.4244 | 28.8018 | 100000 | 0.4221 | 0.5813 | 0.4377 | 0.4623 | 0.5746 | 0.8020 | 0.9436 |
164
- | 0.4314 | 29.0899 | 101000 | 0.4216 | 0.5829 | 0.4402 | 0.4654 | 0.5751 | 0.8013 | 0.9437 |
165
- | 0.4269 | 29.3779 | 102000 | 0.4212 | 0.5852 | 0.4405 | 0.4658 | 0.5754 | 0.8006 | 0.9438 |
166
- | 0.4367 | 29.6659 | 103000 | 0.4215 | 0.5841 | 0.4400 | 0.4653 | 0.5749 | 0.8013 | 0.9437 |
167
- | 0.4223 | 29.9539 | 104000 | 0.4216 | 0.5822 | 0.4400 | 0.4652 | 0.5749 | 0.8018 | 0.9438 |
168
-
169
-
170
- ### Framework versions
171
-
172
- - Transformers 4.43.4
173
- - Pytorch 2.4.0+cu121
174
- - Datasets 2.21.0
175
- - Tokenizers 0.19.1
 
7
  - recall
8
  - accuracy
9
  model-index:
10
+ - name: stack-edu-classifier-python
11
  results: []
12
  ---
13
 
14
+ # stack-edu-classifier-python
 
15
 
16
+ This is a classifier for scoring the educational value of code files in The Stack v2 dataset, it is a finetuned version of [bigcode/starencoder](https://huggingface.co/bigcode/starencoder) with a classification head on code files annotated by Llama3.1-70B-Instruct. We use this classifier for building Stack-Edu dataset used for training SmolLM2, see [paper](https://arxiv.org/pdf/2502.02737). Each classifier is trained on one programming language.
17
+
18
+ ### How to use in transformers
19
+ To load the classifier, use the following code:
20
+
21
+ ```python
22
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
23
+
24
+ tokenizer = AutoTokenizer.from_pretrained(REPO_NAME)
25
+ model = AutoModelForSequenceClassification.from_pretrained(REPO_NAME)
26
+
27
+ text = "This is a test sentence."
28
+ inputs = tokenizer(text, return_tensors="pt", padding="longest", truncation=True)
29
+ outputs = model(**inputs)
30
+ logits = outputs.logits.squeeze(-1).float().detach().numpy()
31
+ score = logits.item()
32
+ result = {
33
+ "text": text,
34
+ "score": score,
35
+ "int_score": int(round(max(0, min(score, 5)))),
36
+ }
37
+
38
+ print(result)
39
+ # {'text': 'This is a test sentence.', 'score': 0.07964489609003067, 'int_score': 0}
40
+ ```
41
+
42
+ ## Intended uses & limitations
43
+
44
+ While the classifier performs well in distinguishing high-quality code in its target language (Python in this case), there are some limitations:
45
+
46
+ - Scope: The model's performance might change for other datasets, in particular for out of distribution samples. The classifier's context is 1024 tokens, which might not be sufficient to assess the quality of some long code files.
47
+ - Bias: The model's performance is dependent on the quality and representativeness of the training data and the LLM used for the annotation. Biases in both can affect the classifier's judgments. It might overfit to thoroughly commented code.
48
+ - Context: The classifier evaluates individual code files without considering broader context, which might impact its effectiveness in certain scenarios.
49
+
50
+ The training and inference code is available on GitHub
51
+ https://github.com/huggingface/cosmopedia/tree/main/classification
52
+
53
+ ## Training procedure
54
+
55
+ The classifier was trained on 500,000 pairs of code files and their scores from 0 to 5, generated by Llama3.1. The samples were annotated based on their educational quality with 1 being not educational and 5 being highly educational and relevant for teaching programming. You can find the prompt used for building the annotations in the appendix of [SmolLM2 paper](https://arxiv.org/pdf/2502.02737).
56
+
57
+ We added a classification head with a single regression output to StarEncoder and trained the model for 20 epochs with a learning rate of 3e-4. During training, the embedding and encoder layers were frozen to focus on the classification head.
58
 
 
59
  It achieves the following results on the evaluation set:
60
  - Loss: 0.4216
61
  - Precision: 0.5822
 
65
  - F1 Binary Minimum3: 0.8018
66
  - F1 Binary Minimum2: 0.9438
67
 
68
+ While the macro F1 scores across the 1-5 rating scale are relatively low due to the model's difficulty in distinguishing between higher-rated samples, the classifier performs well for our primary filtering task. When converting to binary classification, using a threshold of 2 achieves the F1 scores ranges between 0.8 and 0.9 for most Stack-Edu classifiers, whereas a threshold of 3 yields F1 scores between 0.5 and 0.8. With the Highest being Python, SQL, C, Rust and the lowest being HTML, TypeScript and C#.
 
 
69
 
70
+ <div style="display: flex; justify-content: center; gap: 20px;">
71
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/61c141342aac764ce1654e43/06siAXeIRjJGnlPehW562.png" width="600">
72
+ </div>
 
 
73
 
74
+ We validated these classifiers by filtering Stack v2 data and testing on an intermediate SmolLM2 checkpoint. Filtering with a threshold of 3 improved performance across most languages while maintaining adequate data volume, though Java showed better results with a threshold of 2.
 
 
75
 
76
  ### Training hyperparameters
77
 
78
  The following hyperparameters were used during training:
79
+ - learning_rate: 0.0003
80
+ - train_batch_size: 64
81
  - eval_batch_size: 256
82
  - seed: 0
83
  - distributed_type: multi-GPU
84
+ - num_devices: 2
85
  - total_train_batch_size: 128
86
+ - total_eval_batch_size: 512
87
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
88
  - lr_scheduler_type: linear
89
  - lr_scheduler_warmup_steps: 200
90
+ - num_epochs: 20
91
+
92
+ ## License
93
+
94
+ [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
95
+
96
+ ## Citation
97
+ ```bash
98
+ @misc{allal2025smollm2smolgoesbig,
99
+ title={SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Model},
100
+ author={Loubna Ben Allal and Anton Lozhkov and Elie Bakouch and Gabriel Martín Blázquez and Guilherme Penedo and Lewis Tunstall and Andrés Marafioti and Hynek Kydlíček and Agustín Piqueres Lajarín and Vaibhav Srivastav and Joshua Lochner and Caleb Fahlgren and Xuan-Son Nguyen and Clémentine Fourrier and Ben Burtenshaw and Hugo Larcher and Haojun Zhao and Cyril Zakka and Mathieu Morlon and Colin Raffel and Leandro von Werra and Thomas Wolf},
101
+ year={2025},
102
+ eprint={2502.02737},
103
+ archivePrefix={arXiv},
104
+ primaryClass={cs.CL},
105
+ url={https://arxiv.org/abs/2502.02737},
106
+ }
107
+ ```