{"id":28653936,"url":"https://github.com/tiger-ai-lab/structlm","last_synced_at":"2025-06-13T07:08:13.995Z","repository":{"id":224437527,"uuid":"763236204","full_name":"TIGER-AI-Lab/StructLM","owner":"TIGER-AI-Lab","description":"Code and data for \"StructLM: Towards Building Generalist Models for Structured Knowledge Grounding\" (COLM 2024)","archived":false,"fork":false,"pushed_at":"2024-07-10T15:38:17.000Z","size":13277,"stargazers_count":65,"open_issues_count":1,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-07-10T18:57:16.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://tiger-ai-lab.github.io/StructLM/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TIGER-AI-Lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-25T22:21:00.000Z","updated_at":"2024-07-10T15:38:21.000Z","dependencies_parsed_at":"2024-06-06T23:53:47.541Z","dependency_job_id":null,"html_url":"https://github.com/TIGER-AI-Lab/StructLM","commit_stats":null,"previous_names":["tiger-ai-lab/structlm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TIGER-AI-Lab/StructLM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIGER-AI-Lab%2FStructLM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIGER-AI-Lab%2FStructLM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIGER-AI-Lab%2FStructLM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIGER-AI-Lab%2FStructLM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TIGER-AI-Lab","download_url":"https://codeload.github.com/TIGER-AI-Lab/StructLM/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIGER-AI-Lab%2FStructLM/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259599330,"owners_count":22882357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-13T07:08:11.685Z","updated_at":"2025-06-13T07:08:13.984Z","avatar_url":"https://github.com/TIGER-AI-Lab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StructLM\n\nThis is the repository for our COLM-2024 paper [StructLM: Towards Building Generalist Models for Structured Knowledge Grounding](https://arxiv.org/abs/2402.16671).\n\nYou can use this repository to evaluate the models. To reproduce the models, use [SKGInstruct](https://huggingface.co/datasets/TIGER-Lab/SKGInstruct) in your preferred finetuning framework. The checkpoitns are being released on [Huggingface](https://huggingface.co/collections/TIGER-Lab/structlm-65dcab5a183c499cc365fafc).\n\nThe processed test data is already provided, but the prompts used for training and testing can be found in `/prompts`\n\n## Table of Contents\n  * [Links](#links)\n  * [Install Requirements](#install-requirements)\n  * [Download files](#download-files)\n  * [Run evaluation](#run-evaluation)\n  * [Acknowledgements](#acknowledgements)\n  * [Cite](#cite)\n\n## Links\n- Arxiv Link: https://arxiv.org/abs/2402.16671\n- Website: https://tiger-ai-lab.github.io/StructLM/\n\n## Training\n\nEasy reproduction can be done with the [Llama-Factory](https://github.com/hiyouga/LLaMA-Factory).\n\n1. Follow the [data preparation steps](https://github.com/hiyouga/LLaMA-Factory/blob/main/data/README.md) on their repo to add one of the StructLM datasets from huggingface\n2. use the parameters in the bash script `StructLM_finetune.yaml`, as a reference replacing the parametres in block quotes [] with your paths. Then start the training like\n   `llamafactory-cli train StructLM_finetuning.yaml`, as [such](https://github.com/hiyouga/LLaMA-Factory/tree/b2fc7aeb03fbb40e9beb27e9958c958ee48e23cf?tab=readme-ov-file#quickstart)\n\n## Evaluate StructLM-7B\n\n### Install Requirements\n\nRequirements:\n- Python 3.10\n- Linux\n- support for CUDA 11.8\n\n`pip install -r requirements.txt`\n\n### Download files\n\n`./download.sh`\n\nthis will download\n1. The raw data required for executing evaluation\n2. The processed test data splits ready for evaluation\n\n### Run evaluation\n\n#### For StructLM-7B/13B/34B\nYou can download these models seperately with\n```\nhuggingface-cli download --repo-type=model --local-dir=models/ckpts/StructLM-7B TIGER-Lab/StructLM-7B\nhuggingface-cli download --repo-type=model --local-dir=models/ckpts/StructLM-13B TIGER-Lab/StructLM-13B\nhuggingface-cli download --repo-type=model --local-dir=models/ckpts/StructLM-34B TIGER-Lab/StructLM-34B\n```\n\nThen, you can run the inference on the downloaded checkpoints.\n```\n./run_test_eval.sh StructLM-7B\n./run_test_eval.sh StructLM-13B\n./run_test_eval.sh StructLM-34B\n```\n\n#### For StructLM-7B-Mistral\nYou can download the model with\n```\nhuggingface-cli download --repo-type=model --local-dir=models/ckpts/StructLM-7B-Mistral TIGER-Lab/StructLM-7B-Mistral\n```\n\nWe can run the inference on the donwloaded checkpoint.\n```\npython mistral-fix-data.py\n./run_test_eval.sh StructLM-7B-Mistral\n```\n\nThese evaluation will generate the results in `outputs/StructLM-*/`\n\n## Acknowledgements\n\nThe evaluation metrics in this repository were adapted and modified from the evaluation files found in https://github.com/HKUNLP/UnifiedSKG\n\n## Cite\n```\n@misc{zhuang2024structlm,\n    title={StructLM: Towards Building Generalist Models for Structured Knowledge Grounding},\n    author={Alex Zhuang and Ge Zhang and Tianyu Zheng and Xinrun Du and Junjie Wang and Weiming Ren and Stephen W. Huang and Jie Fu and Xiang Yue and Wenhu Chen},\n    year={2024},\n    eprint={2402.16671},\n    archivePrefix={arXiv},\n    primaryClass={cs.CL}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiger-ai-lab%2Fstructlm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiger-ai-lab%2Fstructlm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiger-ai-lab%2Fstructlm/lists"}