初始化项目,由ModelHub XC社区提供模型
Model: amd/ReasonLite-0.6B-Turbo Source: Original Platform
This commit is contained in:
36
.gitattributes
vendored
Normal file
36
.gitattributes
vendored
Normal 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
|
||||
304
LICENSE-AMD-OpenRAIL-D
Normal file
304
LICENSE-AMD-OpenRAIL-D
Normal file
@@ -0,0 +1,304 @@
|
||||
ReasonLite [Open RAIL-D]
|
||||
|
||||
Licensed Artifact(s):
|
||||
|
||||
- Data
|
||||
|
||||
Section I: PREAMBLE
|
||||
|
||||
BY ACCESSING, DOWNLOADING, INSTALLING, OR USING THE ARTIFACT, YOU AGREE
|
||||
TO BE BOUND BY THIS LICENSE. IF YOU DO NOT AGREE TO ALL OF THE TERMS AND
|
||||
CONDITIONS OF THIS LICENSE, DO NOT ACCESS, DOWNLOAD, INSTALL, OR USE THE
|
||||
ARTIFACT.
|
||||
|
||||
1. Definitions
|
||||
|
||||
(a) “Application” refers to a sequence of instructions or statements
|
||||
written in machine code language, including object code (that is the
|
||||
product of a compiler), binary code (data using a two-symbol system)
|
||||
or an intermediate language (such as register transfer language).
|
||||
|
||||
(b) “Artifact” refers to a software application (in either binary or
|
||||
source code format), Data, Model, and/or Source Code, in accordance
|
||||
with what is specified above as the “Licensed Artifact”.
|
||||
|
||||
(c) “Contribution” means any work, including any modifications or
|
||||
additions to an Artifact, that is intentionally submitted to
|
||||
Licensor for inclusion or incorporation in the Artifact directly or
|
||||
indirectly by the rights owner. For the purposes of this definition,
|
||||
“submitted” means any form of electronic, verbal, or written
|
||||
communication sent to the Licensor or its representatives, including
|
||||
but not limited to communication on electronic mailing lists, source
|
||||
code control systems, and issue tracking systems that are managed
|
||||
by, or on behalf of, the Licensor for the purpose of discussing,
|
||||
sharing and improving the Artifact, but excluding communication that
|
||||
is conspicuously marked or otherwise designated in writing by the
|
||||
contributor as “Not a Contribution.”
|
||||
|
||||
(d) “Contributor” means Licensor or any other individual or legal entity
|
||||
that creates or owns a Contribution that is added to or incorporated
|
||||
into an Artifact or its Derivative.
|
||||
|
||||
(e) “Data” means a collection of information and/or content extracted
|
||||
from the dataset used with a given Model, including to train,
|
||||
pretrain, or otherwise evaluate the Model.
|
||||
|
||||
(f) “Derivative” means a work derived from or based upon an Artifact,
|
||||
and includes all modified versions of such Artifact.
|
||||
|
||||
(g) “Distribution” means any transmission, reproduction, publication or
|
||||
other sharing of an Artifact or Derivative to a Third Party,
|
||||
including providing a hosted service incorporating the Artifact,
|
||||
which is made available by electronic or other remote means -
|
||||
e.g. API-based or web access.
|
||||
|
||||
(h) “Harm” includes but is not limited to physical, mental,
|
||||
psychological, financial and reputational damage, pain, or loss.
|
||||
|
||||
(i) “License” means the terms and conditions for use, reproduction, and
|
||||
Distribution as defined in this document.
|
||||
|
||||
(j) “Licensor” means the rights owner (by virtue of creation or
|
||||
documented transfer of ownership) or entity authorized by the rights
|
||||
owner (e.g., exclusive licensee) that is granting the rights in this
|
||||
License.
|
||||
|
||||
(k) “Model” means any machine-learning based assembly or assemblies
|
||||
(including checkpoints), consisting of learnt weights, parameters
|
||||
(including optimizer states), corresponding to the model
|
||||
architecture as embodied in the Source Code.
|
||||
|
||||
(l) “Output” means the results of operating a Model as embodied in
|
||||
informational content resulting therefrom.
|
||||
|
||||
(m) “Source Code” means any collection of text written using
|
||||
human-readable programming language, including the code and scripts
|
||||
used to define, run, load, benchmark or evaluate a Model or any
|
||||
component thereof, and/or used to prepare data for training or
|
||||
evaluation, if any. Source Code includes any accompanying
|
||||
documentation, tutorials, examples, etc, if any. For clarity, the
|
||||
term “Source Code” as used in this License includes any and all
|
||||
Derivatives of such Source Code.
|
||||
|
||||
(n) “Third Parties” means individuals or legal entities that are not
|
||||
under common control with Licensor or You.
|
||||
|
||||
(o) “Use” includes accessing, using, copying, modifying, and/or
|
||||
distributing an Artifact; in connection with a Model as Artifact,
|
||||
Use also includes creating content, fine-tuning, updating, running,
|
||||
training, evaluating and/or re-parametrizing such Model.
|
||||
|
||||
(p) “You” (or “Your”) means an individual or legal entity receiving and
|
||||
exercising permissions granted by this License and/or making use of
|
||||
the Artifact for permitted purposes and in any permitted field of
|
||||
use, including usage of the Artifact in an end-use application -
|
||||
e.g. chatbot, translator, image generator, etc.
|
||||
|
||||
Section II: INTELLECTUAL PROPERTY RIGHTS
|
||||
|
||||
Both copyright and patent grants may apply to the Artifact. The Artifact
|
||||
is subject to additional terms and conditions as described in Section III
|
||||
below.
|
||||
|
||||
2. Grant of Copyright License. Conditioned upon compliance with Section
|
||||
III below and subject to the terms and conditions of this License, each
|
||||
Contributor hereby grants to You a worldwide, non-exclusive, royalty-free copyright license to
|
||||
reproduce, use, publicly display, publicly perform, sublicense, and
|
||||
distribute the Artifact and Derivatives thereof.
|
||||
|
||||
3. Grant of Patent License. Conditioned upon compliance with Section III
|
||||
below and subject to the terms and conditions of this License, and only
|
||||
where and as applicable, each Contributor hereby grants to You a worldwide, non-exclusive,
|
||||
royalty-free, irrevocable (except as stated in this paragraph) patent
|
||||
license to make, have made, use, sell, offer to sell, import, and
|
||||
otherwise transfer the Artifact where such license applies only to those
|
||||
patent claims licensable by such Contributor that are necessarily
|
||||
infringed by their Contribution(s) alone or by combination of their
|
||||
Contribution(s) with the Artifact to which such Contribution(s) was
|
||||
submitted. If You institute patent litigation against any entity
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that the
|
||||
Artifact and/or a Contribution incorporated within the Artifact
|
||||
constitutes direct or contributory patent infringement, then any patent
|
||||
licenses granted to You under this License in connection with the
|
||||
Artifact shall terminate as of the date such litigation is asserted or
|
||||
filed.
|
||||
|
||||
Licensor and Contributor each have the right to grant the licenses
|
||||
above.
|
||||
|
||||
Section III: CONDITIONS OF USAGE, DISTRIBUTION AND REDISTRIBUTION
|
||||
|
||||
4. Use-based restrictions. The restrictions set forth in Attachment A
|
||||
are mandatory Use-based restrictions. Therefore You may not Use the
|
||||
Artifact in violation of such restrictions. You may Use the Artifact
|
||||
only subject to this License. You shall require all of Your users who
|
||||
use the Artifact or its Derivative to comply with the terms of this
|
||||
paragraph.
|
||||
|
||||
5. The Output You Generate with a Model (as Artifact). Except as set
|
||||
forth herein, Licensor claims no rights in the Output You generate. You
|
||||
are accountable for the Output You generate and its subsequent uses. No
|
||||
use of the Output may contravene any provision as stated in this
|
||||
License.
|
||||
|
||||
6. Distribution and Redistribution. You may host for Third Party remote
|
||||
access purposes (e.g. software-as-a-service), reproduce and distribute
|
||||
copies of the Artifact or its Derivatives in any medium, with or without
|
||||
modifications, provided that You meet the following conditions:
|
||||
|
||||
6.1. Use-based restrictions in paragraph 4 MUST be included as a
|
||||
condition precedent to effect any type of legal agreement (e.g. a
|
||||
license) governing the use and/or distribution of the Artifact or
|
||||
its Derivatives, and You shall give such notice to any subsequent
|
||||
Third Party recipients;
|
||||
6.2. You shall give any Third Party recipients of the Artifact or its
|
||||
Derivatives a copy of this License;
|
||||
6.3. You shall cause any modified files to carry prominent notices
|
||||
stating that You changed the files;
|
||||
6.4. You shall retain all copyright, patent, trademark, and attribution
|
||||
notices excluding those notices that do not pertain to any part of
|
||||
the Artifact or its Derivatives.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and may
|
||||
provide additional or different license terms and conditions with
|
||||
respect to paragraph 6.1., to govern the use, reproduction, or
|
||||
Distribution of Your modifications, or for any Derivative, provided that
|
||||
Your use, reproduction, and Distribution of the Artifact or its
|
||||
Derivative otherwise complies with the conditions stated in this
|
||||
License. In other words, the Use-based restrictions in Attachment A form
|
||||
the minimum set of terms for You to license to Third Parties any
|
||||
Artifact or its Derivative, but You may add more restrictive terms if
|
||||
You deem it necessary.
|
||||
|
||||
Section IV: OTHER PROVISIONS
|
||||
|
||||
7. Updates and Runtime Restrictions. To the maximum extent permitted by
|
||||
law, Licensor reserves the right to restrict (remotely or otherwise)
|
||||
usage of the Artifact in violation of this License or update the
|
||||
Artifact through electronic means.
|
||||
|
||||
8. Trademarks and Related. Nothing in this License permits You to make
|
||||
use of Licensors’ trademarks, trade names, logos or to otherwise suggest
|
||||
endorsement or misrepresent the relationship between the parties; and
|
||||
any rights not expressly granted herein are reserved by the Licensors.
|
||||
|
||||
9. Disclaimer of Warranty. Unless required by applicable law or agreed
|
||||
to in writing, Licensor provides the Artifact (and each Contributor
|
||||
provides its Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied, including, without
|
||||
limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
|
||||
responsible for determining the appropriateness of using the Artifact,
|
||||
and assume any risks associated with Your exercise of permissions under
|
||||
this License.
|
||||
|
||||
10. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise, unless
|
||||
required by applicable law (such as deliberate and grossly negligent
|
||||
acts) or agreed to in writing, shall any Contributor be liable to You
|
||||
for damages, including any direct, indirect, special, incidental, or
|
||||
consequential damages of any character arising as a result of this
|
||||
License or out of the use or inability to use the Artifact (including
|
||||
but not limited to damages for loss of goodwill, work stoppage, computer
|
||||
failure or malfunction, or any and all other commercial damages or
|
||||
losses), even if such Contributor has been advised of the possibility of
|
||||
such damages.
|
||||
|
||||
11. If any provision of this License is held to be invalid, illegal or
|
||||
unenforceable, the remaining provisions shall be unaffected thereby and
|
||||
remain valid as if such provision had not been set forth herein.
|
||||
|
||||
12. Term and Termination. The term of this License will commence upon
|
||||
the earlier of Your (a) acceptance of this License or (b) accessing the
|
||||
Artifact; and will continue in full force and effect until terminated in
|
||||
accordance with the terms and conditions herein. Licensor may terminate
|
||||
this License if You are in breach of any term or condition of this
|
||||
License. Upon termination of this License, all licenses granted to You
|
||||
will terminate and You must promptly delete and cease use of the
|
||||
Artifact. Sections 1, 7, 8, 9, 10, 11, and 12 survive termination of
|
||||
this License.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Attachment A
|
||||
|
||||
AMD Responsible AI Use Policy
|
||||
|
||||
AMD is committed to the responsible use of its Artificial Intelligence
|
||||
(AI) products and technologies (“AMD AI”). AMD AI may include
|
||||
artificial intelligence or machine learning technologies that use
|
||||
algorithms to analyze data and generate output using predictions based
|
||||
on patterns in data. This policy explains the uses that AMD
|
||||
specifically prohibits.
|
||||
|
||||
If you use any AMD AI, you are agreeing to use the AMD AI in compliance
|
||||
with applicable laws and not for any of the following prohibited uses.
|
||||
|
||||
Prohibited Uses:
|
||||
|
||||
1) No Illegal Acts. Do not use AMD AI in violation of any applicable
|
||||
national, state, local, or other jurisdictional law, rule, regulation,
|
||||
or sanction.
|
||||
|
||||
2) No Explicit Content. Do not use AMD AI to submit (as input),
|
||||
generate, or disseminate content depicting violent or sexually explicit
|
||||
content or to create sexual chatbots.
|
||||
|
||||
3) No Harm. Do not use AMD AI for any potentially harmful uses,
|
||||
including fraud, deception, discrimination, abuse, or harassment,
|
||||
including the following:
|
||||
|
||||
a) Harm or abuse of a minor, including grooming and child sexual
|
||||
exploitation.
|
||||
|
||||
b) Impersonation of human beings for purposes of deception.
|
||||
|
||||
c) Generation or dissemination of information you know to be false
|
||||
for the purpose of harming others.
|
||||
|
||||
d) Intentionally defame, disparage, or otherwise harass others.
|
||||
|
||||
e) Intentionally attempting to materially distort the behavior of a
|
||||
person in a manner that causes or is likely to cause that person
|
||||
or another person physical or psychological harm.
|
||||
|
||||
f) Providing medical advice or interpretation of medical results that
|
||||
is intended to be a substitute for professional medical advice,
|
||||
diagnosis, or treatment.
|
||||
|
||||
g) Engaging in the unlawful or unauthorized practice of any
|
||||
profession, including financial, legal, medical, health, or
|
||||
related professional practices.
|
||||
|
||||
h) Judgment of, discrimination against, or harm to individuals or
|
||||
groups based on legally protected characteristics or categories,
|
||||
online or offline social behavior, or known or predicted personal
|
||||
or personality characteristics, including any of the foregoing
|
||||
uses in social credit systems.
|
||||
|
||||
4) No High-Risk Activity. Do not use AMD AI in any high-risk activities
|
||||
or applications that create a risk of personal injury, death, or
|
||||
severe property or environmental damage, including in weapons or
|
||||
military applications.
|
||||
|
||||
5) No Personal Information. Do not use AMD AI to collect, process, or
|
||||
disclose personal data, including heath or sensitive personal
|
||||
information, without the necessary rights or consents.
|
||||
|
||||
6) No Infringement. Do not use AMD AI to generate or disseminate any
|
||||
information that infringes upon or misappropriates the intellectual
|
||||
property rights of others, including copyright, trademark, patent, and
|
||||
trade secret rights, rights to privacy, and publicity rights.
|
||||
|
||||
7) No Malware. Do not use AMD AI to generate or disseminate malware or
|
||||
any other content to be used for the purpose of facilitating unpermitted
|
||||
access to, or use of, computer systems or data.
|
||||
|
||||
8) No Obfuscation. Do not inappropriately obfuscate or fail to disclose
|
||||
to end users the presence of AI in any application in which AMD AI is
|
||||
deployed, along with any known risks or dangers of using AI without
|
||||
appropriate safeguards, oversight and human control.
|
||||
|
||||
9) No Reliance. Do not rely on any information generated using AMD AI
|
||||
without assessing it for accuracy, potential for harm, or other specific
|
||||
risks applicable to the use case.
|
||||
93
README.md
Normal file
93
README.md
Normal file
@@ -0,0 +1,93 @@
|
||||
---
|
||||
license: openrail
|
||||
datasets:
|
||||
- amd/ReasonLite-Dataset
|
||||
---
|
||||
|
||||
|
||||
|
||||
<p align="center">
|
||||
<img src="https://cdn-uploads.huggingface.co/production/uploads/66a056d0229269a861ac1245/9xXXms4ub9dzbcsN1IGqq.png" alt="ReasonLite" width="200">
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/AMD-AGI/ReasonLite"><b>GitHub</b></a> |
|
||||
<a href="https://huggingface.co/datasets/amd/ReasonLite-Dataset"><b>Dataset</b></a> |
|
||||
<a href="https://www.amd.com/en/developer/resources/technical-articles/2026/introducing-reasonlite-0-6b.html"><b>Blog</b></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
**ReasonLite is an ultra-lightweight math reasoning model.** With only 0.6B parameters, it leverages **high-quality data distillation** to achieve performance comparable to models over 10× its size, such as Qwen3-8B, **reaching 75.2 on AIME24 and extending the scaling law of small models.**
|
||||
|
||||
* 🔥 **Best-performing 0.6B math reasoning model**
|
||||
* 🔓 Fully open-source — weights, scripts, datasets, synthesis pipeline
|
||||
* ⚙️ Distilled in two stages to balance **efficiency** and **high performance**, using **6.1M** high-quality samples.
|
||||
|
||||
|
||||
<p align="center">
|
||||
<img src="https://cdn-uploads.huggingface.co/production/uploads/66a056d0229269a861ac1245/MCLe1ttoeHc_8181gKRPy.png"" alt="ReasonLite" height="500">
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
# 🚀 Model
|
||||
|
||||
The model is trained in **two progressive distillation stages**.
|
||||
First, short-CoT data is used to distill **Qwen3-0.6B** into **ReasonLite-0.6B-Turbo**, improving **AIME24 accuracy from 11.0 → 57.1**.
|
||||
Then, long-CoT data is used to obtain **ReasonLite-0.6B**, further boosting accuracy to **75.2**.
|
||||
|
||||
| Model | Description | AIME24 | Link |
|
||||
| ------------------------- | ----------------------------------------------| ------ | ---- |
|
||||
| **amd/ReasonLite-0.6B-Turbo** | Short CoT balancing performance and efficiency | 57.1 | [🤗 HuggingFace](https://huggingface.co/amd/ReasonLite-0.6B-Turbo) |
|
||||
| **amd/ReasonLite-0.6B** | Long CoT for high performance | 75.2 | [🤗 HuggingFace](https://huggingface.co/amd/ReasonLite-0.6B) |
|
||||
|
||||
---
|
||||
|
||||
# 📊 Evaluation Results
|
||||
|
||||
**Metrics**
|
||||
|
||||
* **avg@16** — average accuracy from 16 sampled answers
|
||||
* **pass@8** — probability at least one correct answer appears among 8 samples
|
||||
|
||||
| Model | Parameters | AMC23 avg@16 | AMC23 pass@8 | AIME25 avg@16 | AIME25 pass@8 | AIME24 avg@16 | AIME24 pass@8 |
|
||||
|---------------------------|------------|-------------|-------------|---------------|---------------|---------------|---------------|
|
||||
| Qwen2.5-14B | 14B | 58.3 | 82.3 | 12.3 | 32.3 | 12.7 | 32.4 |
|
||||
| Deepseek-qwen-14B | 14B | 93.9 | 98.7 | 50.2 | 71.0 | 65.0 | 83.0 |
|
||||
| Qwen3-0.6B | 0.6B | 52.7 | 85.0 | 16.0 | 33.0 | 11.0 | 31.5 |
|
||||
| Qwen3-1.7B | 1.7B | 83.4 | 96.3 | 36.0 | 55.1 | 47.3 | 73.9 |
|
||||
| Qwen3-4B | 4B | 96.1 | 100 | 63.5 | 85.4 | 72.7 | 85.1 |
|
||||
| Qwen3-8B | 8B | 94.8 | 100 | 68.3 | 84.2 | 74.6 | 85.0 |
|
||||
| Qwen3-14B | 14B | 98.6 | 98.7 | 71.5 | 84.1 | 78.3 | 88.4 |
|
||||
| DeepscaleR-1.5B | 1.5B | 83.8 | 95.0 | 29.0 | 48.9 | 40.4 | 69.0 |
|
||||
| POLARIS-1.7B-Preview | 1.7B | 92.2 | 97.4 | 52.3 | 80.2 | 65.0 | 76.7 |
|
||||
| OpenMath-Nemotron-1.5B | 1.5B | 88.8 | 96.7 | 39.8 | 65.8 | 61.5 | 81.3 |
|
||||
| ReasonLite-0.6B-Turbo | 0.6B | 81.6 | 99.3 | 42.7 | 69.2 | 57.1 | 79.6 |
|
||||
| **ReasonLite-0.6B** | **0.6B** | **95.2** | **100** | **62.9** | **84.1** | **75.2** | **90.2** |
|
||||
|
||||
|
||||
---
|
||||
|
||||
# 📚 Dataset
|
||||
|
||||
We collected 343K math problems from Polaris and OpenMathReasoning. Using GPT-OSS as the teacher, we generated 9.1M raw answers under medium and high reasoning modes. We then produced pseudo-labels via majority voting, and finally retained 6.1M samples.
|
||||
|
||||
| Dataset | Description | Size | Link |
|
||||
| ---------------------- | ------ |---- | ---- |
|
||||
| **amd/ReasonLite-Dataset** | Short CoT | 4.3M | [🤗 HuggingFace](https://huggingface.co/datasets/amd/ReasonLite-Dataset/viewer/default/medium) |
|
||||
| **amd/ReasonLite-Dataset** | Long Cot | 1.8M | [🤗 HuggingFace](https://huggingface.co/datasets/amd/ReasonLite-Dataset/viewer/default/high) |
|
||||
|
||||
---
|
||||
|
||||
# 📌 Citation
|
||||
|
||||
```bibtex
|
||||
@misc{reasonlite2025,
|
||||
title = {ReasonLite: An Ultra-Lightweight 0.6B Reasoning Model},
|
||||
author = {An, Zihao and Chen, Chushi and Liu, Ziqiong and Li, Dong and Barsoum, Emad},
|
||||
year = {2025},
|
||||
url = {https://github.com/AMD-AGI/ReasonLite},
|
||||
note = {Open-source project}
|
||||
}
|
||||
```
|
||||
28
added_tokens.json
Normal file
28
added_tokens.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"</think>": 151668,
|
||||
"</tool_call>": 151658,
|
||||
"</tool_response>": 151666,
|
||||
"<think>": 151667,
|
||||
"<tool_call>": 151657,
|
||||
"<tool_response>": 151665,
|
||||
"<|box_end|>": 151649,
|
||||
"<|box_start|>": 151648,
|
||||
"<|endoftext|>": 151643,
|
||||
"<|file_sep|>": 151664,
|
||||
"<|fim_middle|>": 151660,
|
||||
"<|fim_pad|>": 151662,
|
||||
"<|fim_prefix|>": 151659,
|
||||
"<|fim_suffix|>": 151661,
|
||||
"<|im_end|>": 151645,
|
||||
"<|im_start|>": 151644,
|
||||
"<|image_pad|>": 151655,
|
||||
"<|object_ref_end|>": 151647,
|
||||
"<|object_ref_start|>": 151646,
|
||||
"<|quad_end|>": 151651,
|
||||
"<|quad_start|>": 151650,
|
||||
"<|repo_name|>": 151663,
|
||||
"<|video_pad|>": 151656,
|
||||
"<|vision_end|>": 151653,
|
||||
"<|vision_pad|>": 151654,
|
||||
"<|vision_start|>": 151652
|
||||
}
|
||||
89
chat_template.jinja
Normal file
89
chat_template.jinja
Normal file
@@ -0,0 +1,89 @@
|
||||
{%- if tools %}
|
||||
{{- '<|im_start|>system\n' }}
|
||||
{%- if messages[0].role == 'system' %}
|
||||
{{- messages[0].content + '\n\n' }}
|
||||
{%- endif %}
|
||||
{{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
||||
{%- for tool in tools %}
|
||||
{{- "\n" }}
|
||||
{{- tool | tojson }}
|
||||
{%- endfor %}
|
||||
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
||||
{%- else %}
|
||||
{%- if messages[0].role == 'system' %}
|
||||
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
||||
{%- for message in messages[::-1] %}
|
||||
{%- set index = (messages|length - 1) - loop.index0 %}
|
||||
{%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
|
||||
{%- set ns.multi_step_tool = false %}
|
||||
{%- set ns.last_query_index = index %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- for message in messages %}
|
||||
{%- if message.content is string %}
|
||||
{%- set content = message.content %}
|
||||
{%- else %}
|
||||
{%- set content = '' %}
|
||||
{%- endif %}
|
||||
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
|
||||
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
|
||||
{%- elif message.role == "assistant" %}
|
||||
{%- set reasoning_content = '' %}
|
||||
{%- if message.reasoning_content is string %}
|
||||
{%- set reasoning_content = message.reasoning_content %}
|
||||
{%- else %}
|
||||
{%- if '</think>' in content %}
|
||||
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
||||
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- if loop.index0 > ns.last_query_index %}
|
||||
{%- if loop.last or (not loop.last and reasoning_content) %}
|
||||
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
|
||||
{%- else %}
|
||||
{{- '<|im_start|>' + message.role + '\n' + content }}
|
||||
{%- endif %}
|
||||
{%- else %}
|
||||
{{- '<|im_start|>' + message.role + '\n' + content }}
|
||||
{%- endif %}
|
||||
{%- if message.tool_calls %}
|
||||
{%- for tool_call in message.tool_calls %}
|
||||
{%- if (loop.first and content) or (not loop.first) %}
|
||||
{{- '\n' }}
|
||||
{%- endif %}
|
||||
{%- if tool_call.function %}
|
||||
{%- set tool_call = tool_call.function %}
|
||||
{%- endif %}
|
||||
{{- '<tool_call>\n{"name": "' }}
|
||||
{{- tool_call.name }}
|
||||
{{- '", "arguments": ' }}
|
||||
{%- if tool_call.arguments is string %}
|
||||
{{- tool_call.arguments }}
|
||||
{%- else %}
|
||||
{{- tool_call.arguments | tojson }}
|
||||
{%- endif %}
|
||||
{{- '}\n</tool_call>' }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{{- '<|im_end|>\n' }}
|
||||
{%- elif message.role == "tool" %}
|
||||
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
||||
{{- '<|im_start|>user' }}
|
||||
{%- endif %}
|
||||
{{- '\n<tool_response>\n' }}
|
||||
{{- content }}
|
||||
{{- '\n</tool_response>' }}
|
||||
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
||||
{{- '<|im_end|>\n' }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if add_generation_prompt %}
|
||||
{{- '<|im_start|>assistant\n' }}
|
||||
{%- if enable_thinking is defined and enable_thinking is false %}
|
||||
{{- '<think>\n\n</think>\n\n' }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
30
config.json
Normal file
30
config.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"architectures": [
|
||||
"Qwen3ForCausalLM"
|
||||
],
|
||||
"attention_bias": false,
|
||||
"attention_dropout": 0.0,
|
||||
"bos_token_id": 151643,
|
||||
"eos_token_id": 151645,
|
||||
"head_dim": 128,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 1024,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 3072,
|
||||
"max_position_embeddings": 40960,
|
||||
"max_window_layers": 28,
|
||||
"model_type": "qwen3",
|
||||
"num_attention_heads": 16,
|
||||
"num_hidden_layers": 28,
|
||||
"num_key_value_heads": 8,
|
||||
"rms_norm_eps": 1e-06,
|
||||
"rope_scaling": null,
|
||||
"rope_theta": 1000000,
|
||||
"sliding_window": null,
|
||||
"tie_word_embeddings": true,
|
||||
"torch_dtype": "bfloat16",
|
||||
"transformers_version": "4.52.3",
|
||||
"use_cache": false,
|
||||
"use_sliding_window": false,
|
||||
"vocab_size": 151936
|
||||
}
|
||||
13
generation_config.json
Normal file
13
generation_config.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"bos_token_id": 151643,
|
||||
"do_sample": true,
|
||||
"eos_token_id": [
|
||||
151645,
|
||||
151643
|
||||
],
|
||||
"pad_token_id": 151643,
|
||||
"temperature": 0.6,
|
||||
"top_k": 20,
|
||||
"top_p": 0.95,
|
||||
"transformers_version": "4.52.3"
|
||||
}
|
||||
151388
merges.txt
Normal file
151388
merges.txt
Normal file
File diff suppressed because it is too large
Load Diff
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c92006675ff90181595ae5fe1ecda61c9daba1e74b6ad35aeb88f85f17fb0cac
|
||||
size 1503300328
|
||||
25
special_tokens_map.json
Normal file
25
special_tokens_map.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"additional_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|>"
|
||||
],
|
||||
"eos_token": "<|im_end|>",
|
||||
"pad_token": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
BIN
tokenizer.json
(Stored with Git LFS)
Normal file
BIN
tokenizer.json
(Stored with Git LFS)
Normal file
Binary file not shown.
239
tokenizer_config.json
Normal file
239
tokenizer_config.json
Normal file
@@ -0,0 +1,239 @@
|
||||
{
|
||||
"add_bos_token": false,
|
||||
"add_prefix_space": false,
|
||||
"added_tokens_decoder": {
|
||||
"151643": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151644": {
|
||||
"content": "<|im_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151645": {
|
||||
"content": "<|im_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151646": {
|
||||
"content": "<|object_ref_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151647": {
|
||||
"content": "<|object_ref_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151648": {
|
||||
"content": "<|box_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151649": {
|
||||
"content": "<|box_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151650": {
|
||||
"content": "<|quad_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151651": {
|
||||
"content": "<|quad_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151652": {
|
||||
"content": "<|vision_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151653": {
|
||||
"content": "<|vision_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151654": {
|
||||
"content": "<|vision_pad|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151655": {
|
||||
"content": "<|image_pad|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151656": {
|
||||
"content": "<|video_pad|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"151657": {
|
||||
"content": "<tool_call>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151658": {
|
||||
"content": "</tool_call>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151659": {
|
||||
"content": "<|fim_prefix|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151660": {
|
||||
"content": "<|fim_middle|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151661": {
|
||||
"content": "<|fim_suffix|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151662": {
|
||||
"content": "<|fim_pad|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151663": {
|
||||
"content": "<|repo_name|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151664": {
|
||||
"content": "<|file_sep|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151665": {
|
||||
"content": "<tool_response>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151666": {
|
||||
"content": "</tool_response>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151667": {
|
||||
"content": "<think>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"151668": {
|
||||
"content": "</think>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
}
|
||||
},
|
||||
"additional_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|>"
|
||||
],
|
||||
"bos_token": null,
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"eos_token": "<|im_end|>",
|
||||
"errors": "replace",
|
||||
"extra_special_tokens": {},
|
||||
"model_max_length": 131072,
|
||||
"pad_token": "<|endoftext|>",
|
||||
"split_special_tokens": false,
|
||||
"tokenizer_class": "Qwen2Tokenizer",
|
||||
"unk_token": null
|
||||
}
|
||||
1
vocab.json
Normal file
1
vocab.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user