{"id":13754239,"url":"https://github.com/RUCAIBox/Context-Tuning","last_synced_at":"2025-05-09T22:31:30.512Z","repository":{"id":106894142,"uuid":"529813810","full_name":"RUCAIBox/Context-Tuning","owner":"RUCAIBox","description":"This is the repository for COLING 2022 paper \"Context-Tuning: Learning Contextualized Prompts for Natural Language Generation\".","archived":false,"fork":false,"pushed_at":"2022-10-16T02:33:13.000Z","size":3,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-16T07:33:14.183Z","etag":null,"topics":["natural-language-generation"],"latest_commit_sha":null,"homepage":"","language":null,"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/RUCAIBox.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":"2022-08-28T09:14:34.000Z","updated_at":"2023-12-27T12:49:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"32f276a9-eb8e-494b-bcdf-34a889bc2883","html_url":"https://github.com/RUCAIBox/Context-Tuning","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/RUCAIBox%2FContext-Tuning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RUCAIBox%2FContext-Tuning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RUCAIBox%2FContext-Tuning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RUCAIBox%2FContext-Tuning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RUCAIBox","download_url":"https://codeload.github.com/RUCAIBox/Context-Tuning/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253335686,"owners_count":21892713,"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":["natural-language-generation"],"created_at":"2024-08-03T09:01:51.378Z","updated_at":"2025-05-09T22:31:30.251Z","avatar_url":"https://github.com/RUCAIBox.png","language":null,"funding_links":[],"categories":["A01_文本生成_文本对话"],"sub_categories":["其他_文本生成_文本对话"],"readme":"# Context-Tuning\nThis is the repository for COLING 2022 paper \"Context-Tuning: Learning Contextualized Prompts for Natural Language Generation\". The implementation is completely based on our text generation library **[TextBox 2.0](https://github.com/RUCAIBox/TextBox)**.\n\n## Installation\nYou should clone the TextBox repository and follow its [instructions](https://github.com/RUCAIBox/TextBox#installation).\n```bash\ngit clone https://github.com/RUCAIBox/TextBox.git \u0026\u0026 cd TextBox\nbash install.sh\n```\n\n## Dataset\nThe datasets ROCStories (roc), WritingPrompts (wp), WikiPlots (wikip), and ChangeMyView (cmv) can be downloaded at the link [https://huggingface.co/datasets/RUCAIBox/Story-Generation](https://huggingface.co/datasets/RUCAIBox/Story-Generation).\n\n## Running Context-Tuning based on TextBox\nFor example, you can conduct Context-Tuning on roc dataset using this command:\n```bash\npython run_textbox.py --model=Context_Tuning --dataset=roc\n```\nYou can use `--dataset=xxx` to specify the dataset name, such as `roc`, `wp`, `wikip`, and `cmv`.\n\nOther hyperparameters can be changed in the [yaml](https://github.com/RUCAIBox/TextBox/blob/2.0.0/textbox/properties/model/context_tuning.yaml). The `prompt_generator` can be set to `bert` or `roberta`. The `semantic_mapping` can be set to `True` or `False`. The `prompt_length` of `efficient_kwargs` can also be changed at your will. \n\n\n## Reference\n```bibtex\n@inproceedings{tang-etal-2022-context,\n    title = \"Context-Tuning: Learning Contextualized Prompts for Natural Language Generation\",\n    author = \"Tang, Tianyi  and\n      Li, Junyi  and\n      Zhao, Wayne Xin  and\n      Wen, Ji-Rong\",\n    booktitle = \"Proceedings of the 29th International Conference on Computational Linguistics\",\n    month = oct,\n    year = \"2022\",\n    address = \"Gyeongju, Republic of Korea\",\n    publisher = \"International Committee on Computational Linguistics\",\n    url = \"https://aclanthology.org/2022.coling-1.552\",\n    pages = \"6340--6354\",\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRUCAIBox%2FContext-Tuning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRUCAIBox%2FContext-Tuning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRUCAIBox%2FContext-Tuning/lists"}