update readme
This commit is contained in:
61
README.md
61
README.md
@@ -1,13 +1,3 @@
|
||||
---
|
||||
pipeline_tag: text-generation
|
||||
license: other
|
||||
language:
|
||||
- en
|
||||
- zh
|
||||
tags:
|
||||
- math
|
||||
---
|
||||
|
||||
# InternLM-Math
|
||||
|
||||
<div align="center">
|
||||
@@ -25,21 +15,32 @@ tags:
|
||||
</div>
|
||||
|
||||
State-of-the-art bilingual open-sourced Math reasoning LLMs.
|
||||
A **solver**, **prover**, **verifier**, **augmentor**.
|
||||
|
||||
[💻 Github](https://github.com/InternLM/InternLM-Math) [🤗 Demo](https://huggingface.co/spaces/internlm/internlm2-math-7b) [🤗 Checkpoints](https://huggingface.co/internlm/internlm2-math-7b) [](https://openxlab.org.cn/models/detail/OpenLMLab/InternLM2-Math-7B) [<img src="https://raw.githubusercontent.com/InternLM/InternLM/main/assets/modelscope_logo.png" width="20px" /> ModelScope](https://modelscope.cn/models/Shanghai_AI_Laboratory/internlm2-math-7b/summary)
|
||||
</div>
|
||||
|
||||
# News
|
||||
- [2024.01.29] We add checkpoints from ModelScope. Tech report is on the way!
|
||||
- [2024.01.26] We add checkpoints from OpenXLab, which ease Chinese users to download!
|
||||
|
||||
|
||||
# Introduction
|
||||
- **7B and 20B Chinese and English Math LMs with better than ChatGPT performances.** InternLM2-Math are continued pretrained from InternLM2-Base with ~100B high quality math-related tokens and SFT with ~2M bilingual math supervised data. We apply minhash and exact number match to decontaminate possible test set leakage.
|
||||
- **Add Lean as a support language for math problem solving and math theorem proving.** We are exploring combining Lean 3 with InternLM-Math for verifiable math reasoning. InternLM-Math can generate Lean codes for simple math reasoning tasks like GSM8K or provide possible proof tactics based on Lean states.
|
||||
- **Also can be viewed as a reward model, which supports the Outcome/Process/Lean Reward Model.** We supervise InternLM2-Math with various types of reward modeling data, to make InternLM2-Math can also verify chain-of-thought processes. We also add the ability to convert a chain-of-thought process into Lean 3 code.
|
||||
- **A Math LM Augment Helper** and **Code Intepreter**. InternLM2-Math can help augment math reasoning problems and solve them using the code interpreter which makes you generate synthesis data quicker!
|
||||
- **A Math LM Augment Helper** and **Code Interpreter**. InternLM2-Math can help augment math reasoning problems and solve them using the code interpreter which makes you generate synthesis data quicker!
|
||||
|
||||

|
||||
|
||||
# Models
|
||||
| Model | Transformers(HF) |Release Date |
|
||||
|---|---|---|
|
||||
| **InternLM2-Math-Base-7B** | [🤗internlm/internlm2-math-base-7b](https://huggingface.co/internlm/internlm2-math-base-7b) | 2024-01-23|
|
||||
| **InternLM2-Math-Base-20B** | [🤗internlm/internlm2-math-base-20b](https://huggingface.co/internlm/internlm2-math-base-20b) | 2024-01-23|
|
||||
| **InternLM2-Math-7B** | [🤗internlm/internlm2-math-7b](https://huggingface.co/internlm/internlm2-math-7b) | 2024-01-23|
|
||||
| **InternLM2-Math-20B** | [🤗internlm/internlm2-math-20b](https://huggingface.co/internlm/internlm2-math-20b) | 2024-01-23|
|
||||
**InternLM2-Math-Base-7B** and **InternLM2-Math-Base-20B** are pretrained checkpoints. **InternLM2-Math-7B** and **InternLM2-Math-20B** are SFT checkpoints.
|
||||
| Model |Model Type | Transformers(HF) |OpenXLab| ModelScope | Release Date |
|
||||
|---|---|---|---|---|---|
|
||||
| **InternLM2-Math-Base-7B** | Base| [🤗internlm/internlm2-math-base-7b](https://huggingface.co/internlm/internlm2-math-base-7b) |[](https://openxlab.org.cn/models/detail/OpenLMLab/InternLM2-Math-Base-7B)| [<img src="https://raw.githubusercontent.com/InternLM/InternLM/main/assets/modelscope_logo.png" width="20px" /> internlm2-math-base-7b](https://modelscope.cn/models/Shanghai_AI_Laboratory/internlm2-math-base-7b/summary)| 2024-01-23|
|
||||
| **InternLM2-Math-Base-20B** | Base| [🤗internlm/internlm2-math-base-20b](https://huggingface.co/internlm/internlm2-math-base-20b) |[](https://openxlab.org.cn/models/detail/OpenLMLab/InternLM2-Math-Base-20B)|[<img src="https://raw.githubusercontent.com/InternLM/InternLM/main/assets/modelscope_logo.png" width="20px" /> internlm2-math-base-20b](https://modelscope.cn/models/Shanghai_AI_Laboratory/internlm2-math-base-20b/summary)| 2024-01-23|
|
||||
| **InternLM2-Math-7B** | Chat| [🤗internlm/internlm2-math-7b](https://huggingface.co/internlm/internlm2-math-7b) |[](https://openxlab.org.cn/models/detail/OpenLMLab/InternLM2-Math-7B)|[<img src="https://raw.githubusercontent.com/InternLM/InternLM/main/assets/modelscope_logo.png" width="20px" /> internlm2-math-7b](https://modelscope.cn/models/Shanghai_AI_Laboratory/internlm2-math-7b/summary)| 2024-01-23|
|
||||
| **InternLM2-Math-20B** | Chat| [🤗internlm/internlm2-math-20b](https://huggingface.co/internlm/internlm2-math-20b) |[](https://openxlab.org.cn/models/detail/OpenLMLab/InternLM2-Math-20B)|[<img src="https://raw.githubusercontent.com/InternLM/InternLM/main/assets/modelscope_logo.png" width="20px" /> internlm2-math-20b](https://modelscope.cn/models/Shanghai_AI_Laboratory/internlm2-math-20b/summary)| 2024-01-23|
|
||||
|
||||
|
||||
# Performance
|
||||
@@ -97,6 +98,21 @@ print(response)
|
||||
# Special usages
|
||||
We list some instructions used in our SFT. You can use them to help you. You can use the other ways to prompt the model, but the following are recommended. InternLM2-Math may combine the following abilities but it is not guaranteed.
|
||||
|
||||
Translate proof problem to Lean:
|
||||

|
||||
|
||||
Using Lean 3 to solve GSM8K problem:
|
||||

|
||||
|
||||
Generate problem based on Lean 3 code:
|
||||

|
||||
|
||||
Play 24 point game:
|
||||

|
||||
|
||||
Augment a harder math problem:
|
||||

|
||||
|
||||
| Description | Query |
|
||||
| --- | --- |
|
||||
| Solving question via chain-of-thought | {Question} |
|
||||
@@ -105,26 +121,27 @@ We list some instructions used in our SFT. You can use them to help you. You can
|
||||
| Process reward model | Given a question and an answer, check correctness of each step.\nQuestion:{Question}\nAnswer:{COT} |
|
||||
| Reward model | Given a question and two answers, which one is better? \nQuestion:{Question}\nAnswer 1:{COT}\nAnswer 2:{COT} |
|
||||
| Convert chain-of-thought to Lean 3 | Convert this answer into Lean3. Question:{Question}\nAnswer:{COT} |
|
||||
| Convert Lean 3 to chain-of-thought | Convert this lean 3 code into a natural language problem with answers:\n{LEAN} |
|
||||
| Convert Lean 3 to chain-of-thought | Convert this lean 3 code into a natural language problem with answers:\n{LEAN Code} |
|
||||
| Translate question and chain-of-thought answer to a proof statement | Convert this question and answer into a proof format.\nQuestion:{Question}\nAnswer:{COT} |
|
||||
| Translate proof problem to Lean 3 | Convert this natural langauge statement into a Lean 3 theorem statement:{Theorem} |
|
||||
| Translate Lean 3 to proof problem | Convert this Lean 3 theorem statement into natural language:{STATEMENT} |
|
||||
| Suggest a tactic based on Lean state | Given the Lean 3 tactic state, suggest a next tactic:\n{State} |
|
||||
| Rephrase Problem | Describe this problem in another way. {STATEMENT} |
|
||||
| Suggest a tactic based on Lean state | Given the Lean 3 tactic state, suggest a next tactic:\n{LEAN State} |
|
||||
| Rephrase Problem | Describe this problem in another way. {Question} |
|
||||
| Augment Problem | Please augment a new problem based on: {Question} |
|
||||
| Augment a harder Problem | Increase the complexity of the problem: {Question} |
|
||||
| Change specific numbers | Change specific numbers: {Question}|
|
||||
| Introduce fractions or percentages | Introduce fractions or percentages: {Question}|
|
||||
| Code Intepreter | [lagent](https://github.com/InternLM/InternLM/blob/main/agent/lagent.md) |
|
||||
| Code Interpreter | [lagent](https://github.com/InternLM/InternLM/blob/main/agent/lagent.md) |
|
||||
| In-context Learning | Question:{Question}\nAnswer:{COT}\n...Question:{Question}\nAnswer:{COT}|
|
||||
|
||||
# Fine-tune and others
|
||||
Please refer to [InternLM](https://github.com/InternLM/InternLM/tree/main).
|
||||
|
||||
# Known issues
|
||||
Our model is still under development and will be upgraded. There are some possible issues of InternLM-Math.
|
||||
Our model is still under development and will be upgraded. There are some possible issues of InternLM-Math. If you find performances of some abilities are not great, welcome to open an issue.
|
||||
- Jump the calculating step.
|
||||
- Perform badly at Chinese fill-in-the-bank problems and English choice problems due to SFT data composition.
|
||||
- Tend to generate Code Interpreter when facing Chinese problems due to SFT data composition.
|
||||
- The reward model mode can be better leveraged with assigned token probabilities.
|
||||
- Code switch due to SFT data composition.
|
||||
- Some abilities of Lean can only be adapted to GSM8K-like problems (e.g. Convert chain-of-thought to Lean 3), and performance related to Lean is not guaranteed.
|
||||
|
||||
Reference in New Issue
Block a user