初始化项目,由ModelHub XC社区提供模型

Model: cs-552-2026-thinking-tokens/math_model
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-06-23 13:56:18 +08:00
commit e0f3a5029e
16 changed files with 2868 additions and 0 deletions

36
.gitattributes vendored Normal file
View File

@@ -0,0 +1,36 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
tokenizer.json filter=lfs diff=lfs merge=lfs -text

207
EVAL_REPORT.md Normal file
View File

@@ -0,0 +1,207 @@
# Automated MNLP evaluation report
- **Model repo:** [`cs-552-2026-thinking-tokens/math_model`](https://huggingface.co/cs-552-2026-thinking-tokens/math_model)
- **Owner(s):** group **thinking-tokens**
- **Generated at:** 2026-05-19T03:22:52+00:00 (UTC)
- **Pipeline:** [mnlp-project-ci](https://github.com/eric11eca/mnlp-project-ci)
_This PR is opened automatically by the course CI. It is **non-blocking** — you do not need to merge it. The next nightly run will refresh this file._
## Summary
| Benchmark | Accuracy | Status |
|---|---:|---|
| Math | 0.3900 | ok |
| Knowledge | — | not run |
| Multilingual | — | not run |
| Safety | — | not run |
## Sample completions
_Prompts are intentionally omitted to avoid revealing benchmark contents. For multi-completion problems, only one completion is shown per sample._
### Math
**Correct** (1 shown)
- **reference**: `194`
- **overall** (2/8 completions correct)
- **extracted** (✓): `194`
- **completion**:
```text
We are given a $194 \times 194$ board, and we are to find the **least positive integer $k$** such that we can choose $k$ cells to mark, and there is **exactly one tiling** of the board by $1 \times 2$ and $2 \times 1$ dominoes in which **every domino contains at most one marked cell**.
---
### Step 1: Understand the problem
We are to find the **smallest number of marked cells** such that:
- Th
... [truncated 823 chars] ...
t can be **involving marked cells** is $k$.
- Since there are 18818 dominoes, the number of dominoes that **do not involve marked cells** is $18818 - k$.
We want **exactly one** tiling where **every domino has at most one marked cell**.
This is equivalent to saying that the **marked cells** must be placed in such a way that **each domino is uniquely determined** by the marked cells.
This is a very strong condition.
---
### Step 4: What is the minimum number of marked cells?
This is a classic problem in **combinatorics and tiling theory**.
We are to find the **minimum number of marked cells** such that:
- There is **exactly one tiling** of the board with dominoes.
- In this tiling, **every domino contains at most one marked cell**.
This is equivalent to saying that the **marked cells** are **independent** in the tiling, and the tiling is **unique**.
This is a well-known result in combinatorics and tiling theory.
---
### Step 5: Known result
It is known that the **minimum number of marked cells** needed to ensure **exactly one tiling** with dominoes, where **every domino contains at most one marked cell**, is:
$$
\boxed{194}
$$
---
### Final Answer:
$$
\boxed{194}
$$
```
**Incorrect** (1 shown)
- **reference**: `$g(x)=c, g(x)=\lceil x \rceil, g(x)=\lfloor x \rfloor$`
- **overall** (0/8 completions correct)
- **extracted** (✗): `h(x) = x`
- **completion**:
```text
We are given a functional equation:
$$
h(x) = h\left( \frac{h(bx - a) + a}{b} \right)
$$
for all $ x \in \mathbb{Q} $, $ a \in \mathbb{Z} $, and $ b \in \mathbb{N} $.
We are to find all functions $ h : \mathbb{Q} \to \mathbb{Z} $ satisfying this equation.
---
### Step 1: Try simple candidate functions
Lets try a function of the form:
$$
h(x) = kx + c
$$
for some constants $ k, c \in \math
... [truncated 822 chars] ...
n, only possible for specific $ a $ and $ b $, not all.
---
### Step 7: Try the function $ h(x) = \frac{a}{b} $
Lets try:
$$
h(x) = \frac{a}{b}
$$
But this is not a function from $ \mathbb{Q} \to \mathbb{Z} $, because $ \frac{a}{b} \in \mathbb{Q} $, not necessarily an integer.
---
### Step 8: Try $ h(x) = \lfloor x \rfloor $ again
We tried this, and it failed.
---
### Step 9: Try a function that maps rational numbers to integers in a specific way
Lets consider the **identity function**:
$$
h(x) = x
$$
Then:
$$
h(x) = x
$$
$$
h(bx - a) = bx - a
$$
$$
\frac{h(bx - a) + a}{b} = \frac{bx - a + a}{b} = x
$$
So the equation becomes:
$$
x = x
$$
Which is **true**.
So $ h(x) = x $ is a solution.
---
### Step 10: Check if there are other solutions
Suppose $ h(x) = x $ is a solution.
Now suppose $ h(x) = x + c $ for some constant $ c \in \mathbb{Z} $
Then:
$$
h(x) = x + c
$$
$$
h(bx - a) = bx - a + c
$$
$$
\frac{h(bx - a) + a}{b} = \frac{bx - a + c + a}{b} = x + \frac{c}{b}
$$
So:
$$
x + c = x + \frac{c}{b} \Rightarrow c = \frac{c}{b}
$$
This is only possible if $ c = 0 $, so $ h(x) = x $ is the **only** solution.
---
### ✅ Final Answer:
$$
\boxed{h(x) = x}
$$
```

209
README.md Normal file
View File

@@ -0,0 +1,209 @@
---
base_model: Qwen/Qwen3-1.7B
library_name: peft
pipeline_tag: text-generation
tags:
- base_model:adapter:Qwen/Qwen3-1.7B
- grpo
- lora
- transformers
- trl
---
# Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
## Model Details
### Model Description
<!-- Provide a longer summary of what this model is. -->
- **Developed by:** [More Information Needed]
- **Funded by [optional]:** [More Information Needed]
- **Shared by [optional]:** [More Information Needed]
- **Model type:** [More Information Needed]
- **Language(s) (NLP):** [More Information Needed]
- **License:** [More Information Needed]
- **Finetuned from model [optional]:** [More Information Needed]
### Model Sources [optional]
<!-- Provide the basic links for the model. -->
- **Repository:** [More Information Needed]
- **Paper [optional]:** [More Information Needed]
- **Demo [optional]:** [More Information Needed]
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
### Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
[More Information Needed]
### Downstream Use [optional]
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
[More Information Needed]
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
[More Information Needed]
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
[More Information Needed]
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
## How to Get Started with the Model
Use the code below to get started with the model.
[More Information Needed]
## Training Details
### Training Data
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
[More Information Needed]
### Training Procedure
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
#### Preprocessing [optional]
[More Information Needed]
#### Training Hyperparameters
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
#### Speeds, Sizes, Times [optional]
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
[More Information Needed]
## Evaluation
<!-- This section describes the evaluation protocols and provides the results. -->
### Testing Data, Factors & Metrics
#### Testing Data
<!-- This should link to a Dataset Card if possible. -->
[More Information Needed]
#### Factors
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
[More Information Needed]
#### Metrics
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
[More Information Needed]
### Results
[More Information Needed]
#### Summary
## Model Examination [optional]
<!-- Relevant interpretability work for the model goes here -->
[More Information Needed]
## Environmental Impact
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
- **Hardware Type:** [More Information Needed]
- **Hours used:** [More Information Needed]
- **Cloud Provider:** [More Information Needed]
- **Compute Region:** [More Information Needed]
- **Carbon Emitted:** [More Information Needed]
## Technical Specifications [optional]
### Model Architecture and Objective
[More Information Needed]
### Compute Infrastructure
[More Information Needed]
#### Hardware
[More Information Needed]
#### Software
[More Information Needed]
## Citation [optional]
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
**BibTeX:**
[More Information Needed]
**APA:**
[More Information Needed]
## Glossary [optional]
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
[More Information Needed]
## More Information [optional]
[More Information Needed]
## Model Card Authors [optional]
[More Information Needed]
## Model Card Contact
[More Information Needed]
### Framework versions
- PEFT 0.19.1

48
adapter_config.json Normal file
View File

@@ -0,0 +1,48 @@
{
"alora_invocation_tokens": null,
"alpha_pattern": {},
"arrow_config": null,
"auto_mapping": null,
"base_model_name_or_path": "Qwen/Qwen3-1.7B",
"bias": "none",
"corda_config": null,
"ensure_weight_tying": false,
"eva_config": null,
"exclude_modules": null,
"fan_in_fan_out": false,
"inference_mode": true,
"init_lora_weights": true,
"layer_replication": null,
"layers_pattern": null,
"layers_to_transform": null,
"loftq_config": {},
"lora_alpha": 64,
"lora_bias": false,
"lora_dropout": 0.05,
"lora_ga_config": null,
"megatron_config": null,
"megatron_core": "megatron.core",
"modules_to_save": null,
"peft_type": "LORA",
"peft_version": "0.19.1",
"qalora_group_size": 16,
"r": 32,
"rank_pattern": {},
"revision": null,
"target_modules": [
"gate_proj",
"v_proj",
"q_proj",
"k_proj",
"up_proj",
"o_proj",
"down_proj"
],
"target_parameters": null,
"task_type": "CAUSAL_LM",
"trainable_token_indices": null,
"use_bdlora": null,
"use_dora": false,
"use_qalora": false,
"use_rslora": false
}

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:49e5cc8341460a53b0c38a013e84cdad5131a121606140f4d5c7f0d7cfe91ddb
size 139512976

19
chat_template.jinja Normal file
View File

@@ -0,0 +1,19 @@
{%- set enable_thinking = true %}
{%- set boxed_instruction = "You are a mathematical reasoning model. Solve the problem carefully. Use short scratch work to demonstrate the essential intermediate steps. Answer before the token budget (4096 in total) is exhausted. Return the final answer in exact form whenever possible. Put only the final answer inside a LaTeX \\boxed{} expression. Do not put explanations, units, or multiple answers inside the box unless the problem explicitly asks for them. " %}
{%- if messages|length > 0 and messages[0]['role'] == 'system' %}
{%- set system_message = boxed_instruction + "\n\n" + messages[0]['content'] %}
{%- set loop_messages = messages[1:] %}
{%- else %}
{%- set system_message = boxed_instruction %}
{%- set loop_messages = messages %}
{%- endif %}
{{- '<|im_start|>system\n' + system_message + '<|im_end|>\n' }}
{%- for message in loop_messages %}
{{- '<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>\n' }}
{%- endfor %}
{%- if add_generation_prompt %}
{{- '<|im_start|>assistant\n' }}
{%- if not enable_thinking %}
{{- '<think>\n\n</think>\n\n' }}
{%- endif %}
{%- endif %}

63
config.json Normal file
View File

@@ -0,0 +1,63 @@
{
"architectures": [
"Qwen3ForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 151643,
"dtype": "bfloat16",
"eos_token_id": 151645,
"head_dim": 128,
"hidden_act": "silu",
"hidden_size": 2048,
"initializer_range": 0.02,
"intermediate_size": 6144,
"layer_types": [
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention"
],
"max_position_embeddings": 40960,
"max_window_layers": 28,
"model_type": "qwen3",
"num_attention_heads": 16,
"num_hidden_layers": 28,
"num_key_value_heads": 8,
"pad_token_id": null,
"rms_norm_eps": 1e-06,
"rope_parameters": {
"rope_theta": 1000000,
"rope_type": "default"
},
"sliding_window": null,
"tie_word_embeddings": true,
"transformers_version": "5.7.0",
"use_cache": true,
"use_sliding_window": false,
"vocab_size": 151936
}

14
generation_config.json Normal file
View File

@@ -0,0 +1,14 @@
{
"bos_token_id": 151643,
"do_sample": true,
"eos_token_id": [
151645,
151643
],
"max_new_tokens": 4096,
"pad_token_id": 151643,
"temperature": 0.6,
"top_k": 20,
"top_p": 0.9,
"transformers_version": "5.7.0"
}

3
model.safetensors Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:169ad53ec313c3a34b06c0809216e4fc072cce444a5d4ff2b59690d064130ed5
size 3441185608

3
optimizer.pt Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b98e770c015cce8d813cfc775b5f855c01653c4616adb737eeb165594353ccf8
size 279257723

3
rng_state.pth Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:40146296f05d9345f852100181c1eb04c0626f043acb8da4beda393517827245
size 14645

3
scheduler.pt Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e565bbdfb0e22cb241294cbce26748684b2a03180d8f3809e706740b6ec3630f
size 1465

3
tokenizer.json Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506
size 11422650

30
tokenizer_config.json Normal file
View File

@@ -0,0 +1,30 @@
{
"add_prefix_space": false,
"backend": "tokenizers",
"bos_token": null,
"clean_up_tokenization_spaces": false,
"eos_token": "<|im_end|>",
"errors": "replace",
"extra_special_tokens": [
"<|im_start|>",
"<|im_end|>",
"<|object_ref_start|>",
"<|object_ref_end|>",
"<|box_start|>",
"<|box_end|>",
"<|quad_start|>",
"<|quad_end|>",
"<|vision_start|>",
"<|vision_end|>",
"<|vision_pad|>",
"<|image_pad|>",
"<|video_pad|>"
],
"is_local": true,
"local_files_only": false,
"model_max_length": 131072,
"pad_token": "<|endoftext|>",
"split_special_tokens": false,
"tokenizer_class": "Qwen2Tokenizer",
"unk_token": null
}

2221
trainer_state.json Normal file

File diff suppressed because it is too large Load Diff

3
training_args.bin Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4d1dfbce22d8487292784256a5f8170a87f2952c85a6741795b7e2c965f21f1c
size 7185