sail/data-mixture-random-1b

Model

Models Trained with Random Mixture

4

6 commits

2 linked in READMEs

updated Jul 11, 2024

See the code

README

Models Trained with Random Mixture

This is a collection of 64 language models, each with approximately 1B parameters, trained on different random mixtures of data. This project aims to validate the generalization capabilities of the RegMix approach (https://huggingface.co/papers/2407.01492) from small-scale (e.g., 1M parameters) to large-scale (e.g., 1B parameters) models.

Key Features

  • Model Size: 64 separate models, each with ~1B parameters
  • Training Data: Random data mixtures on the RegMix-Data dataset
  • Purpose: To validate the effectiveness of RegMix on identifying high-performing data mixture

Dataset

The models were trained using the RegMix-Data dataset, which is split into different domains from The Pile dataset.

Training Hyperparameters

HyperparameterValue
Batch Size1M tokens
Learning Rate4e-4
Minimum Learning Rate1e-5
Learning Rate ScheduleCosine
Warmup Ratio4%
Total Tokens25B

How to Load a Model

You can load any model using the corresponding branch with the Hugging Face Transformers library:

from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("sail/data-mixture-random-1b", revision="model-index-1")
tokenizer = AutoTokenizer.from_pretrained("sail/data-mixture-random-1b", revision="model-index-1")

Data Mixture

The specific data mixture used for training each 1B model can be found in the file train_config.yaml in each corresponding model branch.

Model Variants

To access different model variants, simply change the revision parameter in the from_pretrained method to the desired model index (e.g., "model-index-2", "model-index-3"), and the maxium index is 64.

Usage Notes

  • These models are primarily intended for research purposes.
  • Performance may vary depending on the specific task and domain.

Citation

If you use these models in your research, please cite the RegMix paper:

@article{liu2024regmix,
  title={RegMix: Data Mixture as Regression for Language Model Pre-training},
  author={Liu, Qian and Zheng, Xiaosen and Muennighoff, Niklas and Zeng, Guangtao and Dou, Longxu and Pang, Tianyu and Jiang, Jing and Lin, Min},
  journal={arXiv preprint arXiv:2407.01492},
  year={2024}
}

For more information about the RegMix methodology and its applications, please refer to the original paper.

Performance

We evaluated each model using lm-evaluation-harness. The performance metric for each task is the average of 0-shot to 5-shot accnorm (accuracy normalized, if available) or acc (accuracy) scores.

Table 1: Model Index 1-8

TaskModel 1Model 2Model 3Model 4Model 5Model 6Model 7Model 8
Social IQA33.2733.3333.6233.5333.4933.5633.6233.55
HellaSwag40.5836.8640.5836.0640.0737.8537.9339.59
PiQA67.2965.1467.9764.6667.0365.3666.0066.55
OpenBookQA28.6327.8729.3329.1029.2328.3329.1328.73
Lambada29.1726.8631.5527.1129.1628.9231.5330.92
SciQ80.6879.9881.0580.8082.4079.8878.6779.70
COPA70.5063.8369.1765.0067.5066.0066.6768.67
RACE29.4730.0032.1128.8231.1330.0629.9030.75
ARC Easy50.0348.7250.0146.6451.0647.4646.7548.39
LogiQA23.7624.1725.2925.2924.5525.9625.4526.32
QQP55.7155.9054.8456.5254.0156.3452.3554.20
WinoGrande51.5451.5951.3950.9153.1352.2651.2651.45
MultiRC52.6553.3951.8950.9249.0353.0953.6450.23
Average47.1845.9747.6045.8047.0646.5446.3846.85

Table 2: Model Index 9-16

TaskModel 9Model 10Model 11Model 12Model 13Model 14Model 15Model 16
Social IQA33.4333.2133.3133.1733.2832.4333.5733.70
HellaSwag40.0535.8939.5539.8938.6336.1839.5235.94
PiQA66.6064.7466.2966.2766.9064.0566.7064.51
OpenBookQA28.8726.6029.3328.7329.4027.8729.6727.83
Lambada31.3927.3730.3230.3131.3826.2529.8626.95
SciQ81.1079.1279.9782.8579.4281.4081.3881.23
COPA67.0064.5066.8369.5067.3365.8369.5066.33
RACE30.5729.6330.4930.8530.3528.6631.2129.57
ARC Easy50.6647.7447.4750.1849.9249.5250.7348.65
LogiQA23.6025.6526.3723.8125.5826.2925.8625.12
QQP54.8954.7954.2055.2353.6957.0953.9554.24
WinoGrande50.8351.8451.0551.8352.1252.0051.0151.82
MultiRC54.1854.4850.1752.1251.4252.6951.8753.48
Average47.1745.8146.5747.2946.8846.1747.3046.11

Table 3: Model Index 17-24

TaskModel 17Model 18Model 19Model 20Model 21Model 22Model 23Model 24
Social IQA33.8933.3133.5333.3833.7533.2433.5633.71
HellaSwag38.6839.9034.6737.1237.4436.0742.1534.67
PiQA66.8367.3963.3364.8365.0063.6867.8062.99
OpenBookQA28.1330.6728.0329.4027.6727.7729.3725.83
Lambada28.7828.5624.1329.4127.6728.0333.4724.04
SciQ79.6078.8377.4278.9878.9578.7281.8379.12
COPA65.1768.1765.3367.3367.6762.6769.8365.83
RACE28.7430.0329.7629.4930.7729.7631.2127.91
ARC Easy48.8649.4247.9048.3047.8846.6850.9245.24
LogiQA25.9126.3426.2425.7626.1126.2424.1725.91
QQP53.3553.1850.6151.4954.2754.9952.7755.19
WinoGrande52.5451.1752.0151.0952.1352.0352.5050.28
MultiRC51.4952.4555.4054.8751.7349.4950.6150.29
Average46.3046.8845.2646.2746.2345.3447.7144.69

Table 4: Model Index 25-32

TaskModel 25Model 26Model 27Model 28Model 29Model 30Model 31Model 32
Social IQA33.5133.4033.5933.5233.5333.4933.1633.56
HellaSwag36.7536.9740.8138.2540.2835.7137.3737.39
PiQA64.0964.7467.9766.1566.8863.8464.4765.05
OpenBookQA29.4728.7029.5729.7729.5029.1329.4728.00
Lambada26.6933.0031.6033.0831.4927.6926.9929.54
SciQ80.0379.1780.1280.2281.9278.2377.4280.87
COPA67.6765.5069.0065.6768.3363.3364.6767.17
RACE30.0530.1930.9630.3730.0829.6230.1329.92
ARC Easy47.5046.9050.2648.5750.5546.9648.7748.79
LogiQA27.2425.5525.8624.3725.3225.1226.4024.30
QQP49.6855.4350.9450.9151.9953.5349.5351.36
WinoGrande51.6852.1251.9351.5052.3251.6752.1352.63
MultiRC51.2451.9150.3352.4252.5254.0452.0553.04
Average45.8246.4347.1546.5247.2945.5745.5846.28

Table 5: Model Index 33-40

TaskModel 33Model 34Model 35Model 36Model 37Model 38Model 39Model 40
Social IQA33.4833.2833.3533.2933.6333.6133.2133.61
HellaSwag38.0040.1843.3737.6932.9632.9837.3137.79
PiQA65.3066.6869.0466.4662.2560.1765.2465.32
OpenBookQA29.4330.3730.4327.6326.4326.8327.9728.70
Lambada26.5931.4631.7130.2118.9220.2928.1028.58
SciQ79.8280.5882.1380.8376.7377.9079.1279.60
COPA64.3369.3367.0067.8361.5062.6764.6766.00
RACE30.0330.1632.4730.4929.2728.1230.1130.21
ARC Easy48.8649.8852.2248.3244.8645.5448.1548.86
LogiQA25.9124.3023.3524.9626.1927.6825.4725.37
QQP56.0656.5652.5756.7052.5448.0449.8157.12
WinoGrande50.9250.9752.3952.7052.3051.6851.4252.80
MultiRC53.0949.9752.1849.0553.7852.2751.4555.68
Average46.2947.2147.8646.6343.9543.6745.5446.90

Table 6: Model Index 41-48

TaskModel 41Model 42Model 43Model 44Model 45Model 46Model 47Model 48
Social IQA33.4933.4333.0733.2833.4433.0833.7833.17
HellaSwag34.5137.5942.6937.3738.3138.3039.6741.07
PiQA62.2465.5868.0566.6266.5465.5266.9867.21
OpenBookQA27.1028.7728.9028.0728.0727.6031.1729.73
Lambada22.7826.9931.3429.5127.8729.4730.3432.71
SciQ77.7880.2579.4780.2580.7079.7281.3581.77
COPA64.0066.3367.0067.0067.3368.3367.1767.67
RACE28.3328.8230.7830.8030.0830.2430.2430.67
ARC Easy45.4848.6451.4946.9948.7948.0549.5849.49
LogiQA24.8324.9624.7623.2526.0625.5524.3224.68
QQP50.2754.7353.9657.0053.7351.1957.5256.91
WinoGrande51.7951.6351.3250.7653.1852.4550.7252.24
MultiRC54.0353.9648.9150.7453.0150.8947.6353.84
Average44.3546.2847.0646.2846.7046.1846.9647.78

Table 7: Model Index 49-56

TaskModel 49Model 50Model 51Model 52Model 53Model 54Model 55Model 56
Social IQA33.5333.7433.3733.4132.9633.8833.7533.79
HellaSwag39.0935.6538.6836.0737.6838.5335.4040.50
PiQA66.8164.5865.6863.9965.8565.7664.5166.89
OpenBookQA29.1327.5728.2729.1029.4328.7328.3029.87
Lambada30.2326.1930.2930.8429.7629.0328.6330.74
SciQ79.9080.8378.4080.0381.3880.9277.7582.07
COPA68.1761.8367.0066.0066.1763.1766.3364.00
RACE31.4229.3530.4131.0830.7729.7330.8031.42
ARC Easy49.5447.7149.0247.6448.3849.3646.9651.22
LogiQA24.9924.5825.3224.9125.1726.2224.6324.91
QQP54.0656.4850.9656.6256.4553.8653.8553.26
WinoGrande50.5150.2651.8351.3352.1851.8951.5950.50
MultiRC50.2554.3750.9452.3851.2155.3454.5250.50
Average46.7445.6346.1746.4246.7246.6545.9246.90

Table 8: Model Index 57-64

TaskModel 57Model 58Model 59Model 60Model 61Model 62Model 63Model 64
Social IQA33.2433.3033.5633.5433.4233.8433.3233.55
HellaSwag41.7439.6335.3638.8338.5336.4638.8036.43
PiQA68.0767.3164.4466.3866.5064.7466.5464.87
OpenBookQA29.2029.5028.1027.9727.8327.3728.8327.87
Lambada31.7931.1127.3230.1728.7526.2230.3826.25
SciQ80.4279.8380.8579.6078.9380.0579.5078.65
COPA66.1769.0064.0064.8367.0064.0066.0066.83
RACE31.3929.8229.6730.0829.9829.4630.3729.19
ARC Easy51.1449.2447.1347.8848.2047.0949.0946.90
LogiQA25.1925.9323.6825.1725.7025.5226.5026.65
QQP55.3754.4652.7353.1759.6558.1557.5055.31
WinoGrande53.2151.4650.8352.1652.3751.4151.6351.85
MultiRC53.5852.3152.2253.0350.4152.1752.2751.50
Average47.7347.1545.3846.3746.7145.8846.9845.84
endpoints_compatible
llama
text-generation
transformers

sail/data-mixture-random-1b

Model

Models Trained with Random Mixture

4

6 commits

2 linked in READMEs

updated Jul 11, 2024

See the code

README

Models Trained with Random Mixture

This is a collection of 64 language models, each with approximately 1B parameters, trained on different random mixtures of data. This project aims to validate the generalization capabilities of the RegMix approach (https://huggingface.co/papers/2407.01492) from small-scale (e.g., 1M parameters) to large-scale (e.g., 1B parameters) models.

Key Features

  • Model Size: 64 separate models, each with ~1B parameters
  • Training Data: Random data mixtures on the RegMix-Data dataset
  • Purpose: To validate the effectiveness of RegMix on identifying high-performing data mixture

Dataset

The models were trained using the RegMix-Data dataset, which is split into different domains from The Pile dataset.

Training Hyperparameters

HyperparameterValue
Batch Size1M tokens
Learning Rate4e-4
Minimum Learning Rate1e-5
Learning Rate ScheduleCosine
Warmup Ratio4%
Total Tokens25B

How to Load a Model

You can load any model using the corresponding branch with the Hugging Face Transformers library:

from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("sail/data-mixture-random-1b", revision="model-index-1")
tokenizer = AutoTokenizer.from_pretrained("sail/data-mixture-random-1b", revision="model-index-1")

Data Mixture

The specific data mixture used for training each 1B model can be found in the file train_config.yaml in each corresponding model branch.

Model Variants

To access different model variants, simply change the revision parameter in the from_pretrained method to the desired model index (e.g., "model-index-2", "model-index-3"), and the maxium index is 64.

Usage Notes

  • These models are primarily intended for research purposes.
  • Performance may vary depending on the specific task and domain.

Citation

If you use these models in your research, please cite the RegMix paper:

@article{liu2024regmix,
  title={RegMix: Data Mixture as Regression for Language Model Pre-training},
  author={Liu, Qian and Zheng, Xiaosen and Muennighoff, Niklas and Zeng, Guangtao and Dou, Longxu and Pang, Tianyu and Jiang, Jing and Lin, Min},
  journal={arXiv preprint arXiv:2407.01492},
  year={2024}
}

For more information about the RegMix methodology and its applications, please refer to the original paper.

Performance

We evaluated each model using lm-evaluation-harness. The performance metric for each task is the average of 0-shot to 5-shot accnorm (accuracy normalized, if available) or acc (accuracy) scores.

Table 1: Model Index 1-8

TaskModel 1Model 2Model 3Model 4Model 5Model 6Model 7Model 8
Social IQA33.2733.3333.6233.5333.4933.5633.6233.55
HellaSwag40.5836.8640.5836.0640.0737.8537.9339.59
PiQA67.2965.1467.9764.6667.0365.3666.0066.55
OpenBookQA28.6327.8729.3329.1029.2328.3329.1328.73
Lambada29.1726.8631.5527.1129.1628.9231.5330.92
SciQ80.6879.9881.0580.8082.4079.8878.6779.70
COPA70.5063.8369.1765.0067.5066.0066.6768.67
RACE29.4730.0032.1128.8231.1330.0629.9030.75
ARC Easy50.0348.7250.0146.6451.0647.4646.7548.39
LogiQA23.7624.1725.2925.2924.5525.9625.4526.32
QQP55.7155.9054.8456.5254.0156.3452.3554.20
WinoGrande51.5451.5951.3950.9153.1352.2651.2651.45
MultiRC52.6553.3951.8950.9249.0353.0953.6450.23
Average47.1845.9747.6045.8047.0646.5446.3846.85

Table 2: Model Index 9-16

TaskModel 9Model 10Model 11Model 12Model 13Model 14Model 15Model 16
Social IQA33.4333.2133.3133.1733.2832.4333.5733.70
HellaSwag40.0535.8939.5539.8938.6336.1839.5235.94
PiQA66.6064.7466.2966.2766.9064.0566.7064.51
OpenBookQA28.8726.6029.3328.7329.4027.8729.6727.83
Lambada31.3927.3730.3230.3131.3826.2529.8626.95
SciQ81.1079.1279.9782.8579.4281.4081.3881.23
COPA67.0064.5066.8369.5067.3365.8369.5066.33
RACE30.5729.6330.4930.8530.3528.6631.2129.57
ARC Easy50.6647.7447.4750.1849.9249.5250.7348.65
LogiQA23.6025.6526.3723.8125.5826.2925.8625.12
QQP54.8954.7954.2055.2353.6957.0953.9554.24
WinoGrande50.8351.8451.0551.8352.1252.0051.0151.82
MultiRC54.1854.4850.1752.1251.4252.6951.8753.48
Average47.1745.8146.5747.2946.8846.1747.3046.11

Table 3: Model Index 17-24

TaskModel 17Model 18Model 19Model 20Model 21Model 22Model 23Model 24
Social IQA33.8933.3133.5333.3833.7533.2433.5633.71
HellaSwag38.6839.9034.6737.1237.4436.0742.1534.67
PiQA66.8367.3963.3364.8365.0063.6867.8062.99
OpenBookQA28.1330.6728.0329.4027.6727.7729.3725.83
Lambada28.7828.5624.1329.4127.6728.0333.4724.04
SciQ79.6078.8377.4278.9878.9578.7281.8379.12
COPA65.1768.1765.3367.3367.6762.6769.8365.83
RACE28.7430.0329.7629.4930.7729.7631.2127.91
ARC Easy48.8649.4247.9048.3047.8846.6850.9245.24
LogiQA25.9126.3426.2425.7626.1126.2424.1725.91
QQP53.3553.1850.6151.4954.2754.9952.7755.19
WinoGrande52.5451.1752.0151.0952.1352.0352.5050.28
MultiRC51.4952.4555.4054.8751.7349.4950.6150.29
Average46.3046.8845.2646.2746.2345.3447.7144.69

Table 4: Model Index 25-32

TaskModel 25Model 26Model 27Model 28Model 29Model 30Model 31Model 32
Social IQA33.5133.4033.5933.5233.5333.4933.1633.56
HellaSwag36.7536.9740.8138.2540.2835.7137.3737.39
PiQA64.0964.7467.9766.1566.8863.8464.4765.05
OpenBookQA29.4728.7029.5729.7729.5029.1329.4728.00
Lambada26.6933.0031.6033.0831.4927.6926.9929.54
SciQ80.0379.1780.1280.2281.9278.2377.4280.87
COPA67.6765.5069.0065.6768.3363.3364.6767.17
RACE30.0530.1930.9630.3730.0829.6230.1329.92
ARC Easy47.5046.9050.2648.5750.5546.9648.7748.79
LogiQA27.2425.5525.8624.3725.3225.1226.4024.30
QQP49.6855.4350.9450.9151.9953.5349.5351.36
WinoGrande51.6852.1251.9351.5052.3251.6752.1352.63
MultiRC51.2451.9150.3352.4252.5254.0452.0553.04
Average45.8246.4347.1546.5247.2945.5745.5846.28

Table 5: Model Index 33-40

TaskModel 33Model 34Model 35Model 36Model 37Model 38Model 39Model 40
Social IQA33.4833.2833.3533.2933.6333.6133.2133.61
HellaSwag38.0040.1843.3737.6932.9632.9837.3137.79
PiQA65.3066.6869.0466.4662.2560.1765.2465.32
OpenBookQA29.4330.3730.4327.6326.4326.8327.9728.70
Lambada26.5931.4631.7130.2118.9220.2928.1028.58
SciQ79.8280.5882.1380.8376.7377.9079.1279.60
COPA64.3369.3367.0067.8361.5062.6764.6766.00
RACE30.0330.1632.4730.4929.2728.1230.1130.21
ARC Easy48.8649.8852.2248.3244.8645.5448.1548.86
LogiQA25.9124.3023.3524.9626.1927.6825.4725.37
QQP56.0656.5652.5756.7052.5448.0449.8157.12
WinoGrande50.9250.9752.3952.7052.3051.6851.4252.80
MultiRC53.0949.9752.1849.0553.7852.2751.4555.68
Average46.2947.2147.8646.6343.9543.6745.5446.90

Table 6: Model Index 41-48

TaskModel 41Model 42Model 43Model 44Model 45Model 46Model 47Model 48
Social IQA33.4933.4333.0733.2833.4433.0833.7833.17
HellaSwag34.5137.5942.6937.3738.3138.3039.6741.07
PiQA62.2465.5868.0566.6266.5465.5266.9867.21
OpenBookQA27.1028.7728.9028.0728.0727.6031.1729.73
Lambada22.7826.9931.3429.5127.8729.4730.3432.71
SciQ77.7880.2579.4780.2580.7079.7281.3581.77
COPA64.0066.3367.0067.0067.3368.3367.1767.67
RACE28.3328.8230.7830.8030.0830.2430.2430.67
ARC Easy45.4848.6451.4946.9948.7948.0549.5849.49
LogiQA24.8324.9624.7623.2526.0625.5524.3224.68
QQP50.2754.7353.9657.0053.7351.1957.5256.91
WinoGrande51.7951.6351.3250.7653.1852.4550.7252.24
MultiRC54.0353.9648.9150.7453.0150.8947.6353.84
Average44.3546.2847.0646.2846.7046.1846.9647.78

Table 7: Model Index 49-56

TaskModel 49Model 50Model 51Model 52Model 53Model 54Model 55Model 56
Social IQA33.5333.7433.3733.4132.9633.8833.7533.79
HellaSwag39.0935.6538.6836.0737.6838.5335.4040.50
PiQA66.8164.5865.6863.9965.8565.7664.5166.89
OpenBookQA29.1327.5728.2729.1029.4328.7328.3029.87
Lambada30.2326.1930.2930.8429.7629.0328.6330.74
SciQ79.9080.8378.4080.0381.3880.9277.7582.07
COPA68.1761.8367.0066.0066.1763.1766.3364.00
RACE31.4229.3530.4131.0830.7729.7330.8031.42
ARC Easy49.5447.7149.0247.6448.3849.3646.9651.22
LogiQA24.9924.5825.3224.9125.1726.2224.6324.91
QQP54.0656.4850.9656.6256.4553.8653.8553.26
WinoGrande50.5150.2651.8351.3352.1851.8951.5950.50
MultiRC50.2554.3750.9452.3851.2155.3454.5250.50
Average46.7445.6346.1746.4246.7246.6545.9246.90

Table 8: Model Index 57-64

TaskModel 57Model 58Model 59Model 60Model 61Model 62Model 63Model 64
Social IQA33.2433.3033.5633.5433.4233.8433.3233.55
HellaSwag41.7439.6335.3638.8338.5336.4638.8036.43
PiQA68.0767.3164.4466.3866.5064.7466.5464.87
OpenBookQA29.2029.5028.1027.9727.8327.3728.8327.87
Lambada31.7931.1127.3230.1728.7526.2230.3826.25
SciQ80.4279.8380.8579.6078.9380.0579.5078.65
COPA66.1769.0064.0064.8367.0064.0066.0066.83
RACE31.3929.8229.6730.0829.9829.4630.3729.19
ARC Easy51.1449.2447.1347.8848.2047.0949.0946.90
LogiQA25.1925.9323.6825.1725.7025.5226.5026.65
QQP55.3754.4652.7353.1759.6558.1557.5055.31
WinoGrande53.2151.4650.8352.1652.3751.4151.6351.85
MultiRC53.5852.3152.2253.0350.4152.1752.2751.50
Average47.7347.1545.3846.3746.7145.8846.9845.84
endpoints_compatible
llama
text-generation
transformers