Instructions to use opendatalab/meta-rater-1b-reasoning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use opendatalab/meta-rater-1b-reasoning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="opendatalab/meta-rater-1b-reasoning", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("opendatalab/meta-rater-1b-reasoning", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use opendatalab/meta-rater-1b-reasoning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "opendatalab/meta-rater-1b-reasoning" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opendatalab/meta-rater-1b-reasoning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/opendatalab/meta-rater-1b-reasoning
- SGLang
How to use opendatalab/meta-rater-1b-reasoning with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "opendatalab/meta-rater-1b-reasoning" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opendatalab/meta-rater-1b-reasoning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "opendatalab/meta-rater-1b-reasoning" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opendatalab/meta-rater-1b-reasoning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use opendatalab/meta-rater-1b-reasoning with Docker Model Runner:
docker model run hf.co/opendatalab/meta-rater-1b-reasoning
Add pipeline tag, library name and link to Github repository
Browse filesThis 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.
README.md
CHANGED
|
@@ -1,51 +1,49 @@
|
|
| 1 |
---
|
| 2 |
-
license: mit
|
| 3 |
datasets:
|
| 4 |
- cerebras/SlimPajama-627B
|
| 5 |
language:
|
| 6 |
- en
|
|
|
|
|
|
|
|
|
|
| 7 |
---
|
| 8 |
|
| 9 |
-
#
|
| 10 |
|
| 11 |
## Model Description
|
| 12 |
|
| 13 |
-
This is a
|
| 14 |
|
| 15 |
## Model Details
|
| 16 |
|
| 17 |
- **Architecture**: Transformer decoder-only
|
| 18 |
-
- **Parameters**:
|
| 19 |
-
- **Training Tokens**:
|
| 20 |
- **Context Window**: 1,024 tokens
|
| 21 |
- **Vocabulary Size**: 32,000 (LLaMA tokenizer)
|
| 22 |
-
- **Data Selection Method**:
|
| 23 |
-
- **
|
| 24 |
|
| 25 |
## Architecture Specifications
|
| 26 |
|
| 27 |
-
- **Hidden Dimension**: 2,
|
| 28 |
-
- **Number of Layers**:
|
| 29 |
-
- **Attention Heads**:
|
| 30 |
-
- **Key-Value Heads**:
|
| 31 |
- **MLP Ratio**: 8/3
|
| 32 |
- **Position Encoding**: RoPE (base=10,000)
|
| 33 |
|
| 34 |
-
## Data Selection
|
|
|
|
|
|
|
| 35 |
|
| 36 |
-
|
| 37 |
-
- **
|
| 38 |
-
- **
|
| 39 |
-
- **
|
| 40 |
-
- **Problem Solving**: Strategic thinking and solution development
|
| 41 |
-
- **Evidence Integration**: Synthesis of multiple information sources
|
| 42 |
|
| 43 |
-
|
| 44 |
-
|
| 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**: ~
|
| 57 |
|
| 58 |
## Performance Results
|
| 59 |
|
| 60 |
### Downstream Task Performance (Average Accuracy)
|
| 61 |
|
| 62 |
-
- **General Knowledge**:
|
| 63 |
-
- ARC-Easy:
|
| 64 |
-
- ARC-Challenge:
|
| 65 |
-
- SciQ:
|
| 66 |
|
| 67 |
-
- **Commonsense Reasoning**:
|
| 68 |
-
- HellaSwag:
|
| 69 |
-
- SIQA:
|
| 70 |
-
- WinoGrande:
|
| 71 |
|
| 72 |
-
- **Reading Comprehension**:
|
| 73 |
-
- RACE:
|
| 74 |
-
- OpenbookQA:
|
| 75 |
|
| 76 |
-
- **Overall Average**:
|
| 77 |
|
| 78 |
-
##
|
|
|
|
|
|
|
| 79 |
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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-
|
| 93 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 94 |
-
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 95 |
|
| 96 |
-
# Generate text (
|
| 97 |
-
prompt = "
|
| 98 |
inputs = tokenizer(prompt, return_tensors="pt")
|
| 99 |
|
| 100 |
with torch.no_grad():
|
| 101 |
outputs = model.generate(
|
| 102 |
inputs.input_ids,
|
| 103 |
-
max_length=
|
| 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
|
| 116 |
-
- **
|
| 117 |
-
- **
|
| 118 |
-
- **
|
| 119 |
-
- **
|
| 120 |
-
- **
|
| 121 |
-
- **
|
| 122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
## Strengths
|
| 125 |
|
| 126 |
-
- Enhanced
|
| 127 |
-
-
|
| 128 |
-
-
|
| 129 |
-
-
|
| 130 |
-
-
|
| 131 |
-
- Good at identifying causal relationships and patterns
|
| 132 |
|
| 133 |
## Limitations
|
| 134 |
|
| 135 |
-
-
|
| 136 |
-
- Could prioritize analytical depth over accessibility
|
| 137 |
- Limited context window (1,024 tokens)
|
| 138 |
- No instruction tuning or safety alignment
|
| 139 |
-
-
|
|
|
|
| 140 |
|
| 141 |
-
##
|
| 142 |
|
| 143 |
-
|
| 144 |
-
- **
|
| 145 |
-
- **
|
| 146 |
-
- **
|
| 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 |
-
##
|
| 152 |
-
|
| 153 |
-
- **
|
| 154 |
-
- **
|
| 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.
|