--- license: mit datasets: - TIGER-Lab/SKGInstruct language: - en --- # 🏗️ StructLM: Towards Building Generalist Models for Structured Knowledge Grounding Project Page: [https://tiger-ai-lab.github.io/StructLM/](https://tiger-ai-lab.github.io/StructLM/) Paper: Arxiv link not yet announced Code: [https://github.com/TIGER-AI-Lab/StructLM](https://github.com/TIGER-AI-Lab/StructLM) ![Alt text](https://raw.githubusercontent.com/TIGER-AI-Lab/StructLM/gh-pages/static/images/thumbnail.drawio.png) ## Introduction StructLM, is a series of open-source large language models (LLMs) finetuned for structured knowledge grounding (SKG) tasks. We release 3 models: 7B | [StructLM-7B](https://huggingface.co/TIGER-Lab/StructLM-7B) 13B | [StructLM-13B](https://huggingface.co/TIGER-Lab/StructLM-13B) 34B | [StructLM-34B](https://huggingface.co/TIGER-Lab/StructLM-34B) ## Training Data 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. ## Training Procedure 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. ## Evaluation Here are a subset of model evaluation results: ### Held in | **Model** | **ToTTo** | **GrailQA** | **CompWebQ** | **MMQA** | **Feverous** | **Spider** | **TabFact** | **Dart** | |-----------------------|--------------|----------|----------|----------|----------|----------|----------|----------| | **StructLM-7B** | 49.4 | 80.4 | 78.3 | 85.2 | 84.4 | 72.4 | 80.8 | 62.2 | | **StructLM-13B** | 49.3 | 79.2 | 80.4 | 86.0 | 85.0 | 74.1 | 84.7 | 61.4 | | **StructLM-34B** | 50.2 | 82.2 | 81.9 | 88.1 | 85.7 | 74.6 | 86.6 | 61.8 | ### Held out | **Model** | **BIRD** | **InfoTabs** | **FinQA** | **SQA** | |-----------------------|--------------|----------|----------|----------| | **StructLM-7B** | 22.3 | 55.3 | 27.3 | 49.7 | | **StructLM-13B** | 22.8 | 58.1 | 25.6 | 36.1 | | **StructLM-34B** | 24.7 | 61.8 | 36.2 | 44.2 | ## Usage You can use the models through Huggingface's Transformers library. Check our Github repo for the evaluation code: [https://github.com/TIGER-AI-Lab/StructLM](https://github.com/TIGER-AI-Lab/StructLM) ## Prompt Format \*\*\***IMPORTANT**\*\*\* **For this 13B model, the prompt format (different from 7B) is** ``` [INST] [INST] <> You are an AI assistant that specializes in analyzing and reasoning over structured information. You will be given a task, optionally with some structured knowledge input. Your answer must strictly adhere to the output format, if specified. <> {instruction} [/INST] [/INST] ``` 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. To see concrete examples of this linearization, you can directly reference the 🤗 [SKGInstruct Dataset](https://huggingface.co/datasets/TIGER-Lab/SKGInstruct). ## Intended Uses 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. ## Limitations 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. ## Citation If you use the models, data, or code from this project, please cite the original paper: ``` to be updated ```