{"id":20064456,"url":"https://github.com/xlang-ai/binder","last_synced_at":"2025-04-06T20:11:58.796Z","repository":{"id":61461289,"uuid":"547117825","full_name":"xlang-ai/Binder","owner":"xlang-ai","description":"[ICLR 2023] Code for the paper \"Binding Language Models in Symbolic Languages\"","archived":false,"fork":false,"pushed_at":"2023-08-25T14:59:44.000Z","size":23336,"stargazers_count":311,"open_issues_count":2,"forks_count":36,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-29T19:01:31.689Z","etag":null,"topics":["fact-verification","in-context-learning","language-binding","language-model","large-language-models","natural-language-processing","openai","prompt-learning","question-answering","structured-knowledge-grounding","symbolic-language"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xlang-ai.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}},"created_at":"2022-10-07T06:52:43.000Z","updated_at":"2025-03-15T04:00:55.000Z","dependencies_parsed_at":"2024-01-18T04:52:27.721Z","dependency_job_id":"0d7c7c79-cda2-4aa3-8d68-440315cdd944","html_url":"https://github.com/xlang-ai/Binder","commit_stats":null,"previous_names":["hkunlp/binder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlang-ai%2FBinder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlang-ai%2FBinder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlang-ai%2FBinder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlang-ai%2FBinder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xlang-ai","download_url":"https://codeload.github.com/xlang-ai/Binder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543593,"owners_count":20955865,"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":["fact-verification","in-context-learning","language-binding","language-model","large-language-models","natural-language-processing","openai","prompt-learning","question-answering","structured-knowledge-grounding","symbolic-language"],"created_at":"2024-11-13T13:46:20.982Z","updated_at":"2025-04-06T20:11:58.774Z","avatar_url":"https://github.com/xlang-ai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Binder🔗: Binding Language Models in Symbolic Languages\n\n\u003cp align=\"left\"\u003e\n    \u003ca href=\"https://img.shields.io/badge/PRs-Welcome-red\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/PRs-Welcome-red\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://img.shields.io/github/last-commit/HKUNLP/Binder?color=green\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/last-commit/HKUNLP/Binder?color=green\"\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\n\u003c/p\u003e\n\nCode for paper [Binding Language Models in Symbolic Languages](https://arxiv.org/abs/2210.02875). \nPlease refer to our [project page](https://lm-code-binder.github.io/) for more demonstrations and up-to-date related resources. \nCheck out our [demo page](https://huggingface.co/spaces/hkunlp/Binder) to have an instant experience of Binder, which achieves **sota or comparable performance with only dozens of(~10) program annotations**.\n\n\u003cimg src=\"pics/binder.png\" align=\"middle\" width=\"100%\"\u003e\n\n## Updates\n- **2023-08-25**: 🔥 Update to support OpenAI chat series models like `gpt-3.5-xxx` and `gpt-4-xxx`, code will be further refactor later to support more!\n- **2023-03-23**: Since OpenAI no longer supports Codex series models, we will sooner test and update the engine from \"code-davinci-002\" to \"gpt-3.5-turbo\".\n- **2023-01-22**: Accepted by ICLR 2023 (Spotlight)\n- **2022-12-04**: Due to the fact OpenAI's new policy on request limitation, the n sampling couldn't be done as previously, we will add features to call multiple times to be the same usage soon!\n- **2022-10-06**: We released our [code](https://github.com/HKUNLP/binder), [huggingface spaces demo](https://huggingface.co/spaces/hkunlp/Binder) and [project page](https://lm-code-binder.github.io/). Check it out!\n\n\n## Dependencies\nTo establish the environment run this code in the shell:\n```bash\nconda env create -f py3.7binder.yaml\npip install records==0.5.3\n```\nThat will create the environment `binder` we used.\n\n\n## Usage\n\n### Environment setup\nActivate the environment by running\n``````shell\nconda activate binder\n``````\n\n### Add key\nApply and get `API keys`(sk-xxxx like) from [OpenAI API](https://openai.com/api/), save the key in `key.txt` file, make sure you have the rights to access the model(in the implementation of this repo, `code-davinci-002`) you need.\n\n### Run\nCheck out commands in `run.py`\n\n## Citation\nIf you find our work helpful, please cite as\n```\n@article{Binder,\n  title={Binding Language Models in Symbolic Languages},\n  author={Zhoujun Cheng and Tianbao Xie and Peng Shi and Chengzu Li and Rahul Nadkarni and Yushi Hu and Caiming Xiong and Dragomir Radev and Mari Ostendorf and Luke Zettlemoyer and Noah A. Smith and Tao Yu},\n  journal={ICLR},\n  year={2023},\n  volume={abs/2210.02875}\n}\n```\n\n## Contributors\n\u003ca href=\"https://github.com/BlankCheng\"\u003e  \u003cimg src=\"https://avatars.githubusercontent.com/u/34505296?v=4\"  width=\"50\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Timothyxxx\"\u003e  \u003cimg src=\"https://avatars.githubusercontent.com/u/47296835?v=4\"  width=\"50\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/chengzu-li\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/69832207?v=4\"  width=\"50\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Impavidity\"\u003e  \u003cimg src=\"https://avatars.githubusercontent.com/u/9245607?v=4\"  width=\"50\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Yushi-Hu\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/65428713?v=4\"  width=\"50\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/taoyds\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/14208639?v=4\"  width=\"50\" /\u003e\u003c/a\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlang-ai%2Fbinder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxlang-ai%2Fbinder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlang-ai%2Fbinder/lists"}