{"id":13602823,"url":"https://github.com/huangwl18/language-planner","last_synced_at":"2025-04-11T13:31:27.984Z","repository":{"id":41147731,"uuid":"444122251","full_name":"huangwl18/language-planner","owner":"huangwl18","description":"Official Code for \"Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agents\"","archived":false,"fork":false,"pushed_at":"2022-05-16T00:24:12.000Z","size":21312,"stargazers_count":235,"open_issues_count":5,"forks_count":31,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-08-02T18:43:18.294Z","etag":null,"topics":["artificial-intelligence","codex","deep-learning","embodied-ai","foundation-models","gpt-3","in-context-learning","knowledge-extraction","language-model","planning","transformers"],"latest_commit_sha":null,"homepage":"https://huangwl18.github.io/language-planner/","language":"Jupyter Notebook","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/huangwl18.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}},"created_at":"2022-01-03T16:11:22.000Z","updated_at":"2024-07-17T05:22:14.000Z","dependencies_parsed_at":"2022-09-24T10:50:37.228Z","dependency_job_id":null,"html_url":"https://github.com/huangwl18/language-planner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huangwl18%2Flanguage-planner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huangwl18%2Flanguage-planner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huangwl18%2Flanguage-planner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huangwl18%2Flanguage-planner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huangwl18","download_url":"https://codeload.github.com/huangwl18/language-planner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223470266,"owners_count":17150524,"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":["artificial-intelligence","codex","deep-learning","embodied-ai","foundation-models","gpt-3","in-context-learning","knowledge-extraction","language-model","planning","transformers"],"created_at":"2024-08-01T18:01:39.074Z","updated_at":"2024-11-07T06:30:23.143Z","avatar_url":"https://github.com/huangwl18.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook"],"sub_categories":[],"readme":"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huangwl18/language-planner/blob/main/src/demo.ipynb)\n## Language Models as Zero-Shot Planners:\u003cbr\u003eExtracting Actionable Knowledge for Embodied Agents\n\n#### [[Project Page]](https://huangwl18.github.io/language-planner/) [[Paper]](https://arxiv.org/pdf/2201.07207.pdf) [[Video]](https://www.youtube.com/watch?v=CkyugWI3_fc)\n\n[Wenlong Huang](https://wenlong.page)\u003csup\u003e1\u003c/sup\u003e, [Pieter Abbeel](http://people.eecs.berkeley.edu/~pabbeel/)\u003csup\u003e1\u003c/sup\u003e, [Deepak Pathak](https://www.cs.cmu.edu/~dpathak/)\\*\u003csup\u003e2\u003c/sup\u003e, [Igor Mordatch](https://scholar.google.com/citations?user=Vzr1RukAAAAJ\u0026hl=en)\\*\u003csup\u003e3\u003c/sup\u003e (*equal advising)\n\n\u003csup\u003e1\u003c/sup\u003eUniversity of California, Berkeley, \u003csup\u003e2\u003c/sup\u003eCarnegie Mellon University, \u003csup\u003e3\u003c/sup\u003eGoogle Brain\u003cbr/\u003e\n\n\u003cimg  src=\"images/action-translation.gif\" width=\"550\"\u003e\n\nThis is the official demo code for our [Language Models as Zero-Shot Planners](https://huangwl18.github.io/language-planner/) paper. The code demonstrates how Large Language Models, such as GPT-3 and Codex, can generate action plans for complex human activities (e.g. \"make breakfast\"), even without any further training. The code can be used with any available language models from [OpenAI API](https://openai.com/api/) and [Huggingface Transformers](https://huggingface.co/docs/transformers/index) with a common interface.\n\nIf you find this work useful in your research, please cite using the following BibTeX:\n\n```bibtex\n@article{huang2022language,\n      title={Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agents},\n      author={Huang, Wenlong and Abbeel, Pieter and Pathak, Deepak and Mordatch, Igor},\n      journal={arXiv preprint arXiv:2201.07207},\n      year={2022}\n    }\n```\n\n## Local Setup or [Open in Colab](https://colab.research.google.com/github/huangwl18/language-planner/blob/main/src/demo.ipynb)\n\n### Requirements\n- Python=3.6.13\n- CUDA=11.3\n\n### Setup Instructions\n```Shell\ngit clone https://github.com/huangwl18/language-planner.git\ncd language-planner/\nconda create --name language-planner-env python=3.6.13\nconda activate language-planner-env\npip install --upgrade pip\npip install -r requirements.txt\n```\n\n## Running Code\n\nSee [`demo.ipynb`](https://github.com/huangwl18/language-planner/blob/main/src/demo.ipynb) (or [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huangwl18/language-planner/blob/main/src/demo.ipynb)) for a complete walk-through of our method. Feel free to experiment with any household tasks that you come up with (or any tasks beyond household domain if you provide necessary actions in [`available_actions.json`](https://github.com/huangwl18/language-planner/blob/main/src/available_actions.ipynb))!\n\n**Note:**\n- It is observed that best results can be obtained with larger language models. If you cannot run [Huggingface Transformers](https://huggingface.co/models?pipeline_tag=text-generation\u0026sort=downloads) models locally or on Google Colab due to memory constraint, it is recommended to register an [OpenAI API](https://openai.com/api/) account and use GPT-3 or Codex (As of 01/2022, $18 free credits are awarded to new accounts and Codex series are free after [admitted from the waitlist](https://share.hsforms.com/1GzaACuXwSsmLKPfmphF_1w4sk30?)).\n- Due to language models' high sensitivity to sampling hyperparameters, you may need to tune sampling hyperparameters for different models to obtain the best results.\n- The code uses the list of available actions supported in [VirtualHome 1.0](https://github.com/xavierpuigf/virtualhome/tree/v1.0.0)'s [Evolving Graph Simulator](https://github.com/xavierpuigf/virtualhome/tree/v1.0.0/simulation). The available actions are stored in [`available_actions.json`](https://github.com/huangwl18/language-planner/blob/main/src/available_actions.json). The actions should support a large variety of household tasks. However, you may modify or replace this file if you're interested in a different set of actions or a different domain of tasks (beyond household domain).\n- A subset of the [manually-annotated examples](http://virtual-home.org/release/programs/programs_processed_precond_nograb_morepreconds.zip) originally collected by the [VirtualHome paper](https://arxiv.org/pdf/1806.07011.pdf) is used as available examples in the prompt. They are transformed to natural language format and stored in [`available_examples.json`](https://github.com/huangwl18/language-planner/blob/main/src/available_examples.json). Feel free to change this file for a different set of available examples.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuangwl18%2Flanguage-planner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuangwl18%2Flanguage-planner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuangwl18%2Flanguage-planner/lists"}