Update README.md
Browse files
README.md
CHANGED
|
@@ -1,200 +1,93 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
| 5 |
---
|
|
|
|
| 6 |
|
| 7 |
-
|
| 8 |
|
| 9 |
-
|
| 10 |
|
| 11 |
-
|
| 12 |
|
| 13 |
-
## Model Details
|
| 14 |
|
| 15 |
-
|
|
|
|
| 16 |
|
| 17 |
-
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 24 |
-
- **Model type:** [More Information Needed]
|
| 25 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 26 |
-
- **License:** [More Information Needed]
|
| 27 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 28 |
|
| 29 |
-
### Model Sources [optional]
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
- **Repository:** [More Information Needed]
|
| 34 |
-
- **Paper [optional]:** [More Information Needed]
|
| 35 |
-
- **Demo [optional]:** [More Information Needed]
|
| 36 |
-
|
| 37 |
-
## Uses
|
| 38 |
-
|
| 39 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 40 |
-
|
| 41 |
-
### Direct Use
|
| 42 |
-
|
| 43 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 44 |
-
|
| 45 |
-
[More Information Needed]
|
| 46 |
-
|
| 47 |
-
### Downstream Use [optional]
|
| 48 |
-
|
| 49 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
| 50 |
-
|
| 51 |
-
[More Information Needed]
|
| 52 |
-
|
| 53 |
-
### Out-of-Scope Use
|
| 54 |
-
|
| 55 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 56 |
-
|
| 57 |
-
[More Information Needed]
|
| 58 |
-
|
| 59 |
-
## Bias, Risks, and Limitations
|
| 60 |
-
|
| 61 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 62 |
-
|
| 63 |
-
[More Information Needed]
|
| 64 |
-
|
| 65 |
-
### Recommendations
|
| 66 |
-
|
| 67 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 68 |
-
|
| 69 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 70 |
-
|
| 71 |
-
## How to Get Started with the Model
|
| 72 |
-
|
| 73 |
-
Use the code below to get started with the model.
|
| 74 |
-
|
| 75 |
-
[More Information Needed]
|
| 76 |
-
|
| 77 |
-
## Training Details
|
| 78 |
-
|
| 79 |
-
### Training Data
|
| 80 |
-
|
| 81 |
-
<!-- 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. -->
|
| 82 |
-
|
| 83 |
-
[More Information Needed]
|
| 84 |
-
|
| 85 |
-
### Training Procedure
|
| 86 |
-
|
| 87 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 88 |
-
|
| 89 |
-
#### Preprocessing [optional]
|
| 90 |
-
|
| 91 |
-
[More Information Needed]
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
#### Training Hyperparameters
|
| 95 |
-
|
| 96 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 97 |
-
|
| 98 |
-
#### Speeds, Sizes, Times [optional]
|
| 99 |
-
|
| 100 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 101 |
-
|
| 102 |
-
[More Information Needed]
|
| 103 |
|
| 104 |
## Evaluation
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
[More Information Needed]
|
| 163 |
-
|
| 164 |
-
#### Hardware
|
| 165 |
-
|
| 166 |
-
[More Information Needed]
|
| 167 |
-
|
| 168 |
-
#### Software
|
| 169 |
-
|
| 170 |
-
[More Information Needed]
|
| 171 |
-
|
| 172 |
-
## Citation [optional]
|
| 173 |
-
|
| 174 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 175 |
-
|
| 176 |
-
**BibTeX:**
|
| 177 |
-
|
| 178 |
-
[More Information Needed]
|
| 179 |
-
|
| 180 |
-
**APA:**
|
| 181 |
-
|
| 182 |
-
[More Information Needed]
|
| 183 |
-
|
| 184 |
-
## Glossary [optional]
|
| 185 |
-
|
| 186 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 187 |
-
|
| 188 |
-
[More Information Needed]
|
| 189 |
-
|
| 190 |
-
## More Information [optional]
|
| 191 |
-
|
| 192 |
-
[More Information Needed]
|
| 193 |
-
|
| 194 |
-
## Model Card Authors [optional]
|
| 195 |
-
|
| 196 |
-
[More Information Needed]
|
| 197 |
-
|
| 198 |
-
## Model Card Contact
|
| 199 |
-
|
| 200 |
-
[More Information Needed]
|
|
|
|
| 1 |
---
|
| 2 |
+
license: mit
|
| 3 |
+
datasets:
|
| 4 |
+
- TIGER-Lab/MathInstruct
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
---
|
| 8 |
+
# StructLM: Towards Building Generalist Models for Structured Knowledge Grounding
|
| 9 |
|
| 10 |
+
Project Page: [https://tiger-ai-lab.github.io/StructLM/](https://tiger-ai-lab.github.io/StructLM/)
|
| 11 |
|
| 12 |
+
Paper: Arxiv link not yet announced
|
| 13 |
|
| 14 |
+
Code: [https://github.com/TIGER-AI-Lab/StructLM](https://github.com/TIGER-AI-Lab/StructLM)
|
| 15 |
|
|
|
|
| 16 |
|
| 17 |
+
## Introduction
|
| 18 |
+
StructLM, is a series of open-source large language models (LLMs) finetuned for structured knowledge grounding (SKG) tasks.
|
| 19 |
|
| 20 |
+
We release 3 models:
|
| 21 |
|
| 22 |
+
| | **Base Model: Code Llama**
|
| 23 |
+
|-----|---------------------------------------------------------------|
|
| 24 |
+
| 7B | [StructLM-7B](https://huggingface.co/TIGER-Lab/StructLM-7B) |
|
| 25 |
+
| 13B | [StructLM-13B](https://huggingface.co/TIGER-Lab/StructLM-13B) |
|
| 26 |
+
| 34B | [StructLM-34B](https://huggingface.co/TIGER-Lab/StructLM-34B) |
|
| 27 |
|
| 28 |
|
| 29 |
+
## Training Data
|
| 30 |
+
These models are trained on 🤗 [SKGInstruct Dataset](https://huggingface.co/datasets/TIGER-Lab/SKGInstruct), an instruction-tuning dataset containing mixture of 19 SKG tasks combined with 🤗 [SlimOrca](https://huggingface.co/datasets/Open-Orca/SlimOrca). Check out the dataset card for more details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
|
|
|
| 32 |
|
| 33 |
+
## Training Procedure
|
| 34 |
+
The models are fine-tuned with CodeLlama-Instruct-hf models as base models. Each model is trained for 3 epochs, and the best checkpoint is selected.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
## Evaluation
|
| 37 |
+
The models are evaluated using open-ended and multiple-choice math problems from several datasets. Here are the results:
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
| **Model** | **Decoding** | **GSM** | **MATH** | **AQuA** | **NumG** | **SVA** | **Mat** | **Sim** | **SAT** | **MMLU** | **AVG** |
|
| 41 |
+
|-----------------------|--------------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|
|
| 42 |
+
| **MAmmoTH-7B** | CoT | 50.5 | 10.4 | 43.7 | 44.0 | 47.3 | 9.2 | 18.9 | 32.7 | 39.9 | 33.0 |
|
| 43 |
+
| | PoT | 51.6 | 28.7 | 43.3 | 52.3 | 65.1 | 41.9 | 48.2 | 39.1 | 44.6 | 46.1 |
|
| 44 |
+
| | **Hybrid** | **53.6** | **31.5** | **44.5** | **61.2** | **67.7** | **46.3** | **41.2** | **42.7** | **42.6** | **47.9** |
|
| 45 |
+
| **MAmmoTH-Coder-7B** | CoT | 22.4 | 7.9 | 36.2 | 36.0 | 37.0 | 8.2 | 7.2 | 32.7 | 34.6 | 24.7 |
|
| 46 |
+
| | PoT | 58.8 | 32.1 | 47.2 | 57.1 | 71.1 | 53.9 | 44.6 | 40.0 | 47.8 | 50.3 |
|
| 47 |
+
| | **Hybrid** | **59.4** | **33.4** | **47.2** | **66.4** | **71.4** | **55.4** | **45.9** | **40.5** | **48.3** | **52.0** |
|
| 48 |
+
| **MAmmoTH-13B** | CoT | 56.3 | 12.9 | 45.3 | 45.6 | 53.8 | 11.7 | 22.4 | 43.6 | 42.3 | 37.1 |
|
| 49 |
+
| | PoT | 61.3 | 32.6 | 48.8 | 59.6 | 72.2 | 48.5 | 40.3 | 46.8 | 45.4 | 50.6 |
|
| 50 |
+
| | **Hybrid** | **62.0** | **34.2** | **51.6** | **68.7** | **72.4** | **49.2** | **43.2** | **46.8** | **47.6** | **52.9** |
|
| 51 |
+
| **MAmmoTH-Coder-13B** | CoT | 32.1 | 10.2 | 40.6 | 36.2 | 43.0 | 9.6 | 10.1 | 40.9 | 36.6 | 28.8 |
|
| 52 |
+
| | PoT | 64.3 | 35.2 | 46.8 | 54.2 | 73.2 | 60.0 | 44.2 | 48.2 | 48.2 | 52.7 |
|
| 53 |
+
| | **Hybrid** | **64.7** | **36.3** | **46.9** | **66.8** | **73.7** | **61.5** | **47.1** | **48.6** | **48.3** | **54.9** |
|
| 54 |
+
| **MAmmoTH-Coder-33B** | CoT | 34.3 | 11.6 | 39.0 | 36.2 | 44.6 | 10.8 | 10.9 | 46.4 | 42.9 | 30.7 |
|
| 55 |
+
| | PoT | 72.3 | 42.8 | 53.8 | 59.6 | 84.0 | 64.7 | 50.6 | 58.6 | 52.7 | 59.9 |
|
| 56 |
+
| | **Hybrid** | **72.7** | **43.6** | **54.7** | **71.6** | **84.3** | **65.4** | **51.8** | **60.9** | **53.8** | **62.1** |
|
| 57 |
+
| **MAmmoTH-70B** | CoT | 72.4 | 21.1 | 57.9 | 58.9 | 71.6 | 20.0 | 31.9 | 57.3 | 52.1 | 49.2 |
|
| 58 |
+
| | PoT | 76.7 | 40.1 | 60.2 | 64.3 | 81.7 | 55.3 | 45.3 | 64.1 | 53.5 | 60.1 |
|
| 59 |
+
| | **Hybrid** | **76.9** | **41.8** | **65.0** | **74.4** | **82.4** | **55.6** | **51.4** | **66.4** | **56.7** | **63.4** |
|
| 60 |
+
|
| 61 |
+
## Usage
|
| 62 |
+
You can use the models through Huggingface's Transformers library.
|
| 63 |
+
Check our Github repo for the evaluation code: [https://github.com/TIGER-AI-Lab/StructLM](https://github.com/TIGER-AI-Lab/StructLM)
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
## Prompt Format
|
| 67 |
+
|
| 68 |
+
**For this 7B model, the prompt format is**
|
| 69 |
+
```
|
| 70 |
+
[INST] <<SYS>>
|
| 71 |
+
You are an AI assistant that specializes in analyzing and reasoning
|
| 72 |
+
over structured information. You will be given a task, optionally
|
| 73 |
+
with some structured knowledge input. Your answer must strictly
|
| 74 |
+
adhere to the output format, if specified.
|
| 75 |
+
<</SYS>>
|
| 76 |
+
{instruction} [/INST]```
|
| 77 |
+
|
| 78 |
+
To linearize structured input of various types during training, we follow the linearization procedures from [UnifiedSKG](https://arxiv.org/pdf/2201.05966.pdf), so using this format during prompting will be most effective.
|
| 79 |
+
To see concrete examples of this linearization, you can directly reference the 🤗 [SKGInstruct Dataset](https://huggingface.co/datasets/TIGER-Lab/SKGInstruct).
|
| 80 |
+
|
| 81 |
+
## Intended Uses
|
| 82 |
+
These models are trained for research purposes. They are designed to be proficient in interpreting linearized structured input. Downstream uses can potentially include various applications requiring the interpretation of structured data.
|
| 83 |
+
|
| 84 |
+
## Limitations
|
| 85 |
+
While we've tried to build an SKG-specialized model capable of generalizing, we have shown that this is a challenging domain, and it may lack performance characteristics that allow it to be directly used in chat or other applications.
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
## Citation
|
| 89 |
+
If you use the models, data, or code from this project, please cite the original paper:
|
| 90 |
+
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|