Downloads · 30 days
3
9% of all-time downloads
krishna010697/RoBERTa_WML_distill-100M-2024
RoBERTa_WML_distill-100M-2024 is a machine learning model from krishna010697. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model uses weighted mutual learning (WML) to find and train distilled versions of a teacher model using peer-to-peer learning. It builds on the approach described in "Weighted Mutual Learning with Diversity-Drive…
Downloads · 30 days
3
9% of all-time downloads
All-time downloads
33
Public
Parameters
34M
136 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors136 MB · 99%
From the Hugging Face model README
This model uses weighted mutual learning (WML) to find and train distilled versions of a teacher model using peer-to-peer learning. It builds on the approach described in "Weighted Mutual Learning with Diversity-Driven Model Compression" (Zhang et al., 2022), with some key differences.
Unlike the original paper which uses differential pruning of the teacher model, we use Bayesian optimization to initialize smaller peer models:
num_peers = 4, target parameter counts are N/2, N/3, N/4, N/5 (where N is the teacher model size)num_layers, attention_heads, and hidden_size to reach target parameter countsThe key difference is that pruning (as used in the original paper) only masks parameters, while our distillation approach actually reduces the model architecture size.
We use the bi-level optimization method from the paper to minimize the WML loss and ensemble loss:
This allows the framework to dynamically adjust the importance of each peer during training.
| Hyperparameter | Value |
|---|---|
| weight_decay | 0.1 |
| beta1 | 0.9 |
| beta2 | 0.95 |
| bayesian_init_points | 10 |
| bayesian_n_iter | 100 |
| grad_clip | 1.0 |
| prune_importance | 'l1' |
| layer_bound | 0.9 |
| batch_size | 3 |
| block_size | 512 |
| num_epochs | 100 |
| loss_alpha | 0.5 |
| num_batches | 60 |
| warmup_iters | 5 |
| learning_rate | 0.05 |
| lr_decay_iters | 200 |
| min_lr | 0.005 |
| enable_early_stopping | True |
Zhang, M., Wang, L., Campos, D., Huang, W., Guo, C., & Yang, B. (2022). Weighted Mutual Learning with Diversity-Driven Model Compression. Advances in Neural Information Processing Systems, 35.