nielsr HF Staff commited on
Commit
930948d
·
verified ·
1 Parent(s): 144a5a5

Improve model card: Add metadata, prominent links, and basic usage example

Browse files

This PR significantly improves the model card for MetaStone-S1 by:
- **Enhancing metadata**: Adding `pipeline_tag: text-generation` for better discoverability on the Hub (e.g., at https://huggingface.co/models?pipeline_tag=text-generation) and `library_name: transformers` to enable the "how to use" widget and proper library recognition. Specific tags like `test-time-scaling`, `reflective-model`, `mathematics`, `code`, and `reasoning` have also been added for more precise categorization.
- **Consolidating key links**: Moving the paper (now linking directly to the Hugging Face Papers page), project page, and GitHub repository links to a prominent position at the top for quick access.
- **Providing a basic usage example**: Including a `transformers` code snippet to allow users to easily load and perform basic text generation, while still directing them to the official GitHub repository for the full reflective reasoning pipeline.

Files changed (1) hide show
  1. README.md +54 -2
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 repo contains the training and evaluation code of MetaStone-S1. For full details please refer to our [paper](https://arxiv.org/abs/2507.01951) and [our official website](https://www.wenxiaobai.com/).
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