Improve model card: Add metadata, prominent links, and basic usage example
#1
by
nielsr
HF Staff
- opened
README.md
CHANGED
|
@@ -1,6 +1,21 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
## Introduction
|
| 5 |
We release our first reflective generative model: MetaStone-S1.
|
| 6 |
With only 32B parameters, MetaStone-S1 performs comparably to the OpenAI-o3 series on mathematics, coding, and Chinese reasoning tasks.
|
|
@@ -12,8 +27,45 @@ By sharing the backbone network between the PRMs and policy models, MetaStone‑
|
|
| 12 |
|
| 13 |
<img src="./figures/intro.jpg" alt="Introduction" width="800">
|
| 14 |
|
| 15 |
-
This
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
## Performance
|
| 19 |
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
pipeline_tag: text-generation
|
| 4 |
+
library_name: transformers
|
| 5 |
+
tags:
|
| 6 |
+
- test-time-scaling
|
| 7 |
+
- reflective-model
|
| 8 |
+
- mathematics
|
| 9 |
+
- code
|
| 10 |
+
- reasoning
|
| 11 |
---
|
| 12 |
+
|
| 13 |
+
# MetaStone-S1: Test-Time Scaling with Reflective Generative Model
|
| 14 |
+
|
| 15 |
+
**Paper:** [Test-Time Scaling with Reflective Generative Model](https://huggingface.co/papers/2507.01951)
|
| 16 |
+
**Project page:** [wenxiaobai.com](https://www.wenxiaobai.com/)
|
| 17 |
+
**Code:** [MetaStone-AI/MetaStone-S1](https://github.com/MetaStone-AI/MetaStone-S1)
|
| 18 |
+
|
| 19 |
## Introduction
|
| 20 |
We release our first reflective generative model: MetaStone-S1.
|
| 21 |
With only 32B parameters, MetaStone-S1 performs comparably to the OpenAI-o3 series on mathematics, coding, and Chinese reasoning tasks.
|
|
|
|
| 27 |
|
| 28 |
<img src="./figures/intro.jpg" alt="Introduction" width="800">
|
| 29 |
|
| 30 |
+
This repository contains the training and evaluation code for MetaStone-S1. For full details, please refer to our [paper](https://huggingface.co/papers/2507.01951) and [official website](https://www.wenxiaobai.com/).
|
| 31 |
+
|
| 32 |
+
## Usage
|
| 33 |
+
You can load the model using the `transformers` library for basic text generation.
|
| 34 |
+
|
| 35 |
+
```python
|
| 36 |
+
import torch
|
| 37 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 38 |
+
|
| 39 |
+
# Load model and tokenizer
|
| 40 |
+
# Note: For full functionality of MetaStone-S1's reflective generative capabilities
|
| 41 |
+
# (e.g., using the Process Reward Model for enhanced reasoning modes and test-time scaling),
|
| 42 |
+
# please refer to the official GitHub repository for detailed inference pipeline.
|
| 43 |
+
model_name = "MetaStoneTec/MetaStone-S1-32B" # Use MetaStoneTec/MetaStone-S1-7B or MetaStoneTec/MetaStone-S1-1.5B for other sizes
|
| 44 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 45 |
+
model_name,
|
| 46 |
+
torch_dtype=torch.bfloat16, # Use torch.float16 if bfloat16 is not supported by your GPU
|
| 47 |
+
device_map="auto"
|
| 48 |
+
)
|
| 49 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 50 |
+
|
| 51 |
+
# Example text generation
|
| 52 |
+
prompt = "What is the capital of France?"
|
| 53 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 54 |
+
|
| 55 |
+
# Generate text
|
| 56 |
+
outputs = model.generate(**inputs, max_new_tokens=50, do_sample=True, temperature=0.7)
|
| 57 |
+
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 58 |
+
print(generated_text)
|
| 59 |
+
|
| 60 |
+
# Example with a specific prompt format (if applicable, adjust as per model's fine-tuning)
|
| 61 |
+
# For models fine-tuned with specific chat templates, use tokenizer.apply_chat_template:
|
| 62 |
+
# messages = [{"role": "user", "content": "Hello, how are you today?"}]
|
| 63 |
+
# prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 64 |
+
# inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 65 |
+
# outputs = model.generate(**inputs, max_new_tokens=50)
|
| 66 |
+
# generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 67 |
+
# print(generated_text)
|
| 68 |
+
```
|
| 69 |
|
| 70 |
## Performance
|
| 71 |
|