Text Generation
Transformers
Safetensors
English
internlm
custom_code
nielsr HF Staff commited on
Commit
ea7d9f2
·
verified ·
1 Parent(s): ee7a2f4

Add pipeline tag, library name and link to Github repository

Browse files

This PR improves the model card by adding the `text-generation` pipeline tag and `transformers` library name. It also adds a link to the Github repository for the project and a link to the paper on Hugging Face Papers.

Files changed (1) hide show
  1. README.md +105 -79
README.md CHANGED
@@ -1,51 +1,49 @@
1
  ---
2
- license: mit
3
  datasets:
4
  - cerebras/SlimPajama-627B
5
  language:
6
  - en
 
 
 
7
  ---
8
 
9
- # PRRC-Reasoning Language Model (1.3B Parameters, 30B Tokens)
10
 
11
  ## Model Description
12
 
13
- This is a 1.3B parameter transformer-based decoder-only language model trained from scratch on 30B tokens selected from SlimPajama dataset using the **Reasoning** dimension of the PRRC framework. The training data was curated by selecting text with high reasoning complexity, focusing on content that requires multi-step logical analysis and critical thinking.
14
 
15
  ## Model Details
16
 
17
  - **Architecture**: Transformer decoder-only
18
- - **Parameters**: 1.345B (1,345,423,360 parameters)
19
- - **Training Tokens**: 30B tokens
20
  - **Context Window**: 1,024 tokens
21
  - **Vocabulary Size**: 32,000 (LLaMA tokenizer)
22
- - **Data Selection Method**: Top-k selection based on Reasoning scores
23
- - **Rating Model**: ModernBERT-base fine-tuned for Reasoning assessment
24
 
25
  ## Architecture Specifications
26
 
27
- - **Hidden Dimension**: 2,048
28
- - **Number of Layers**: 24
29
- - **Attention Heads**: 16
30
- - **Key-Value Heads**: 16
31
  - **MLP Ratio**: 8/3
32
  - **Position Encoding**: RoPE (base=10,000)
33
 
34
- ## Data Selection Criteria
 
 
35
 
36
- The training data was selected using the Reasoning rating model, which evaluates:
37
- - **Logical Structure**: Multi-step reasoning and argument chains
38
- - **Analytical Depth**: Complex analysis and critical evaluation
39
- - **Causal Relationships**: Identification and exploration of cause-effect patterns
40
- - **Problem Solving**: Strategic thinking and solution development
41
- - **Evidence Integration**: Synthesis of multiple information sources
42
 
43
- Selected texts typically include:
44
- - Analytical essays and research papers
45
- - Problem-solving discussions and case studies
46
- - Philosophical and scientific arguments
47
- - Strategic planning documents
48
- - Complex technical analyses
49
 
50
  ## Training Details
51
 
@@ -53,34 +51,44 @@ Selected texts typically include:
53
  - **Global Batch Size**: 4,194,304 tokens
54
  - **Learning Rate**: 5e-5
55
  - **Optimizer**: Adam (β₁=0.9, β₂=0.95, ε=1e-8)
56
- - **Training Time**: ~14 hours
57
 
58
  ## Performance Results
59
 
60
  ### Downstream Task Performance (Average Accuracy)
61
 
62
- - **General Knowledge**: 55.57% (+2.78% vs Random)
63
- - ARC-Easy: 55.35%
64
- - ARC-Challenge: 27.05%
65
- - SciQ: 84.30%
66
 
67
- - **Commonsense Reasoning**: 44.86% (+0.92% vs Random)
68
- - HellaSwag: 41.34%
69
- - SIQA: 40.36%
70
- - WinoGrande: 52.87%
71
 
72
- - **Reading Comprehension**: 30.48% (+0.46% vs Random)
73
- - RACE: 30.95%
74
- - OpenbookQA: 30.00%
75
 
76
- - **Overall Average**: 45.28% (+1.50% vs Random)
77
 
78
- ## Key Findings
 
 
79
 
80
- - **Reasoning Enhancement**: Improved logical thinking and analysis capabilities
81
- - **Problem Solving**: Enhanced ability to work through complex problems
82
- - **Knowledge Application**: Better at applying knowledge to new situations
83
- - **Analytical Skills**: Stronger performance in tasks requiring multi-step reasoning
 
 
 
 
 
 
 
 
84
 
85
  ## Usage
86
 
@@ -89,18 +97,18 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
89
  import torch
90
 
91
  # Load model and tokenizer
92
- model_name = "opendatalab/meta-rater-1b-reasoning"
93
- tokenizer = AutoTokenizer.from_pretrained(model_name)
94
- model = AutoModelForCausalLM.from_pretrained(model_name)
95
 
96
- # Generate text (particularly good for analytical content)
97
- prompt = "To solve this problem, we need to consider several factors:"
98
  inputs = tokenizer(prompt, return_tensors="pt")
99
 
100
  with torch.no_grad():
101
  outputs = model.generate(
102
  inputs.input_ids,
103
- max_length=100,
104
  temperature=0.7,
105
  do_sample=True,
106
  pad_token_id=tokenizer.eos_token_id
@@ -112,47 +120,56 @@ print(generated_text)
112
 
113
  ## Applications
114
 
115
- This model is particularly well-suited for:
116
- - **Analytical writing** and problem-solving tasks
117
- - **Educational content** focused on critical thinking
118
- - **Research assistance** and hypothesis development
119
- - **Strategic planning** and decision-making support
120
- - **Complex reasoning** tasks and logic puzzles
121
- - **Academic writing** requiring argumentation
122
- - **Case study** analysis and evaluation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
 
124
  ## Strengths
125
 
126
- - Enhanced logical reasoning and analytical capabilities
127
- - Improved problem-solving approach and methodology
128
- - Better at handling complex, multi-step arguments
129
- - Strong performance on knowledge-intensive reasoning tasks
130
- - Effective at synthesizing information from multiple sources
131
- - Good at identifying causal relationships and patterns
132
 
133
  ## Limitations
134
 
135
- - May generate overly complex reasoning for simple questions
136
- - Could prioritize analytical depth over accessibility
137
  - Limited context window (1,024 tokens)
138
  - No instruction tuning or safety alignment
139
- - May struggle with creative or intuitive tasks
 
140
 
141
- ## Reasoning Capabilities
142
 
143
- This model demonstrates enhanced abilities in:
144
- - **Deductive Reasoning**: Drawing logical conclusions from premises
145
- - **Inductive Reasoning**: Identifying patterns and generalizations
146
- - **Causal Analysis**: Understanding cause-and-effect relationships
147
- - **Problem Decomposition**: Breaking complex problems into manageable parts
148
- - **Evidence Evaluation**: Assessing the strength and relevance of information
149
- - **Hypothesis Formation**: Developing testable explanations
150
 
151
- ## Comparison with Baselines
152
-
153
- - **vs Random Baseline**: +1.50% overall, with consistent improvements across categories
154
- - **vs Other PRRC Dimensions**: Competitive performance with focus on analytical tasks
155
- - **vs Meta-rater All (25)**: Shows specialized improvement in reasoning-heavy applications
156
 
157
  ## Citation
158
 
@@ -167,10 +184,19 @@ If you use this model in your research, please cite:
167
  }
168
  ```
169
 
 
 
 
 
 
 
 
 
 
170
  ## License
171
 
172
  Please refer to the license terms of the original SlimPajama dataset and follow applicable data licensing requirements.
173
 
174
  ## Contact
175
 
176
- For questions or issues, please contact the authors or open an issue in the repository.
 
1
  ---
 
2
  datasets:
3
  - cerebras/SlimPajama-627B
4
  language:
5
  - en
6
+ license: mit
7
+ library_name: transformers
8
+ pipeline_tag: text-generation
9
  ---
10
 
11
+ # Meta-rater Language Model (3.3B Parameters, 100B Tokens)
12
 
13
  ## Model Description
14
 
15
+ This is a 3.3B parameter transformer-based decoder-only language model trained from scratch on 100B tokens selected from SlimPajama dataset using the **Meta-rater** framework with all 25 quality scores. This model demonstrates the scalability of Meta-rater's data selection benefits to larger model sizes and training datasets.
16
 
17
  ## Model Details
18
 
19
  - **Architecture**: Transformer decoder-only
20
+ - **Parameters**: 3.3B (3,335,989,760 parameters)
21
+ - **Training Tokens**: 100B tokens
22
  - **Context Window**: 1,024 tokens
23
  - **Vocabulary Size**: 32,000 (LLaMA tokenizer)
24
+ - **Data Selection Method**: Meta-rater with all 25 quality scores
25
+ - **Optimization**: Learned optimal weightings from 1.3B experiments
26
 
27
  ## Architecture Specifications
28
 
29
+ - **Hidden Dimension**: 2,560
30
+ - **Number of Layers**: 40
31
+ - **Attention Heads**: 20
32
+ - **Key-Value Heads**: 20
33
  - **MLP Ratio**: 8/3
34
  - **Position Encoding**: RoPE (base=10,000)
35
 
36
+ ## Data Selection Framework
37
+
38
+ The training data was selected using the same Meta-rater framework as the 1.3B models, leveraging:
39
 
40
+ ### Quality Score Integration (25 total)
41
+ - **Natural Language Quality Signals (11)**: RedPajama rule-based measures
42
+ - **Data Importance Scores (3)**: DSIR similarity to Books, Wikipedia, AutoMathText
43
+ - **Model-based Ratings (11)**: PRRC + QuRating + FineWeb-Edu + WanjuanCC
 
 
44
 
45
+ ### Optimal Weighting Strategy
46
+ The same learned weights from 1.3B proxy model experiments were applied, ensuring consistent data selection criteria across scales.
 
 
 
 
47
 
48
  ## Training Details
49
 
 
51
  - **Global Batch Size**: 4,194,304 tokens
52
  - **Learning Rate**: 5e-5
53
  - **Optimizer**: Adam (β₁=0.9, β₂=0.95, ε=1e-8)
54
+ - **Training Time**: ~129 hours
55
 
56
  ## Performance Results
57
 
58
  ### Downstream Task Performance (Average Accuracy)
59
 
60
+ - **General Knowledge**: 67.51% (+3.29% vs Random 3.3B)
61
+ - ARC-Easy: 72.10%
62
+ - ARC-Challenge: 37.54%
63
+ - SciQ: 92.90%
64
 
65
+ - **Commonsense Reasoning**: 54.35% (+0.80% vs Random 3.3B)
66
+ - HellaSwag: 58.99%
67
+ - SIQA: 43.91%
68
+ - WinoGrande: 60.14%
69
 
70
+ - **Reading Comprehension**: 36.06% (+0.78% vs Random 3.3B)
71
+ - RACE: 35.12%
72
+ - OpenbookQA: 37.00%
73
 
74
+ - **Overall Average**: 54.71% (+1.73% vs Random 3.3B)
75
 
76
+ ### Knowledge-Intensive Tasks
77
+ - **MMLU**: 26.21% (+0.73% vs Random 3.3B)
78
+ - **NaturalQuestions**: 6.87% (+0.59% vs Random 3.3B)
79
 
80
+ ## Scaling Validation
81
+
82
+ ### Benefits Persist at Scale
83
+ Compared to the 1.3B Meta-rater model results:
84
+ - **Consistent Improvements**: Similar relative gains maintained at larger scale
85
+ - **Absolute Performance**: Substantial improvements in all categories
86
+ - **Efficiency**: Data selection remains valuable even with more parameters
87
+
88
+ ### Cross-Scale Comparison
89
+ - **1.3B Meta-rater**: 47.01% overall
90
+ - **3.3B Meta-rater**: 54.71% overall (+7.70% from scaling)
91
+ - **Scale Efficiency**: ~2.5x parameters yield significant performance gains
92
 
93
  ## Usage
94
 
 
97
  import torch
98
 
99
  # Load model and tokenizer
100
+ model_name = "opendatalab/meta-rater-3b-25raters"
101
+ tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
102
+ model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
103
 
104
+ # Generate text (optimized for high-quality output)
105
+ prompt = "The key principles of sustainable development include"
106
  inputs = tokenizer(prompt, return_tensors="pt")
107
 
108
  with torch.no_grad():
109
  outputs = model.generate(
110
  inputs.input_ids,
111
+ max_length=150,
112
  temperature=0.7,
113
  do_sample=True,
114
  pad_token_id=tokenizer.eos_token_id
 
120
 
121
  ## Applications
122
 
123
+ This model is well-suited for:
124
+ - **Production applications** requiring high-quality text generation
125
+ - **Research** needing stronger baseline performance
126
+ - **Educational platforms** with diverse content requirements
127
+ - **Content creation** at scale with quality assurance
128
+ - **Multi-domain applications** benefiting from balanced capabilities
129
+ - **Scaling studies** for data selection methodologies
130
+
131
+ ## Key Achievements
132
+
133
+ - **Scalability Validation**: Confirms Meta-rater benefits persist at larger scales
134
+ - **Improved Baselines**: Establishes stronger performance benchmarks
135
+ - **Efficiency Demonstration**: Better results with same computational budget
136
+ - **Quality Consistency**: Maintains data selection advantages across scales
137
+
138
+ ## Research Significance
139
+
140
+ This model provides crucial evidence for:
141
+ - **Scaling Laws**: Data quality benefits don't diminish with model size
142
+ - **Efficiency**: Quality data selection remains valuable at any scale
143
+ - **Methodology Robustness**: Meta-rater framework generalizes across sizes
144
+ - **Cost-Effectiveness**: Better performance without additional training costs
145
 
146
  ## Strengths
147
 
148
+ - Enhanced performance across all evaluation categories
149
+ - Scalable data selection methodology
150
+ - Improved knowledge retention and reasoning
151
+ - Consistent quality improvements over random selection
152
+ - Validated framework transferability
 
153
 
154
  ## Limitations
155
 
156
+ - Higher computational requirements for training
 
157
  - Limited context window (1,024 tokens)
158
  - No instruction tuning or safety alignment
159
+ - Requires quality score preprocessing
160
+ - Same data selection overhead as smaller models
161
 
162
+ ## Comparison Summary
163
 
164
+ ### vs Random 3.3B Baseline
165
+ - **Overall**: +1.73% improvement (54.71% vs 52.98%)
166
+ - **General Knowledge**: +3.29% improvement (strongest category)
167
+ - **All Categories**: Consistent improvements across all task types
 
 
 
168
 
169
+ ### vs 1.3B Meta-rater
170
+ - **Scale Benefits**: +7.70% improvement from increased parameters
171
+ - **Framework Consistency**: Same data selection principles apply effectively
172
+ - **Efficiency**: Larger models can better utilize high-quality data
 
173
 
174
  ## Citation
175
 
 
184
  }
185
  ```
186
 
187
+ ## Related Resources
188
+
189
+ - **1.3B Meta-rater Models**: Smaller-scale versions with detailed analysis
190
+ - **PRRC Rating Models**: Quality assessment models used for data selection
191
+ - **Annotated SlimPajama**: Complete dataset with quality scores
192
+ - **Random Baselines**: Corresponding baseline models for comparison
193
+ - **Project Page**: [Meta-rater: A Multi-dimensional Data Selection Method for Pre-training Language Models](https://huggingface.co/papers/2504.14194)
194
+ - **Github**: [Meta-rater: A Multi-dimensional Data Selection Method for Pre-training Language Models](https://github.com/opendatalab/Meta-rater)
195
+
196
  ## License
197
 
198
  Please refer to the license terms of the original SlimPajama dataset and follow applicable data licensing requirements.
199
 
200
  ## Contact
201
 
202
+ For questions or issues, please contact the authors or open an issue in the repository.