{"id":13405506,"url":"https://github.com/neulab/prompt2model","last_synced_at":"2025-05-13T22:09:14.908Z","repository":{"id":190279120,"uuid":"619366958","full_name":"neulab/prompt2model","owner":"neulab","description":"prompt2model - Generate Deployable Models from Natural Language Instructions","archived":false,"fork":false,"pushed_at":"2024-12-29T01:55:44.000Z","size":39053,"stargazers_count":1990,"open_issues_count":23,"forks_count":182,"subscribers_count":25,"default_branch":"main","last_synced_at":"2025-04-30T14:15:06.368Z","etag":null,"topics":[],"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/neulab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2023-03-27T01:59:37.000Z","updated_at":"2025-04-20T10:39:19.000Z","dependencies_parsed_at":"2023-09-27T11:54:35.148Z","dependency_job_id":"87a79840-6031-4264-9676-9cc13e087c32","html_url":"https://github.com/neulab/prompt2model","commit_stats":{"total_commits":174,"total_committers":14,"mean_commits":"12.428571428571429","dds":0.7068965517241379,"last_synced_commit":"d4cd23d50c8f5edc5755ab487bcee18121d42a4f"},"previous_names":["neulab/prompt2model"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neulab%2Fprompt2model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neulab%2Fprompt2model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neulab%2Fprompt2model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neulab%2Fprompt2model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neulab","download_url":"https://codeload.github.com/neulab/prompt2model/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254036830,"owners_count":22003654,"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":"2024-07-30T19:02:04.124Z","updated_at":"2025-05-13T22:09:14.857Z","avatar_url":"https://github.com/neulab.png","language":"Python","funding_links":[],"categories":["Python","Models and Tools","A01_文本生成_文本对话","Deployment and Serving"],"sub_categories":["LLM Finetuning","大语言对话模型及数据"],"readme":"# Prompt2Model - Generate Deployable Models from Instructions\n\n[![PyPI version](https://badge.fury.io/py/prompt2model.svg)](https://badge.fury.io/py/prompt2model)\n![Github Actions CI tests](https://github.com/neulab/prompt2model/actions/workflows/ci.yml/badge.svg)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n[![Discord](https://img.shields.io/discord/1144245269001678959)](https://discord.gg/UCy9csEmFc)\n[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neulab/prompt2model/blob/main/prompt2model_demo.ipynb)\n\n`Prompt2Model` is a system that takes a natural\nlanguage task description (like the prompts used for\nLLMs such as ChatGPT) to train a small\nspecial-purpose model that is conducive for deployment.\n\n\u003cimg width=\"360\" alt=\"prompt2model_teaser\" src=\"https://github.com/neulab/prompt2model/assets/2577384/39ca466a-5355-4d82-8312-303e52ba2bca\"\u003e\n\n## Quick Start\n\n### Notebook\n\nYou can run our demo of `Prompt2Model` through a notebook:\n\n- [Open Locally](./prompt2model_demo.ipynb)\n- [Open in Colab](https://colab.research.google.com/github/neulab/prompt2model/blob/main/prompt2model_demo.ipynb)\n\n### Command Line\n\nYou can also run through the command line.\n\n```bash\npip install prompt2model\n```\n\n`Prompt2Model` supports various platforms such as OpenAI, Anthropic, Huggingface, etc. using [LiteLLM](https://github.com/BerriAI/litellm).\n\nIf you are using OpenAI models (such as the default `gpt-3.5-turbo`), please obtain an\nOpenAI API key on their [website](https://platform.openai.com/) then set\nthe environment variable `OPENAI_API_KEY` to your API key by running\nthe following command in your terminal:\n\n```bash\nexport OPENAI_API_KEY=\u003cyour key\u003e\n```\n\n[List of all supported providers](https://docs.litellm.ai/docs/providers)\n\nYou can then run\n\n```bash\npython prompt2model_demo.py\n```\n\nto create a small model from a prompt, as shown in\nthe demo video below. This script must be run on a\ndevice with an internet connection to access the OpenAI\nAPI. For best results, run\nthis script on a device with a GPU for training\nyour model.\n\n## Demo\n\n\u003chttps://github.com/neulab/prompt2model/assets/2577384/8d73394b-3028-4a0b-bdc3-c127082868f2\u003e\n\n## Tips and Examples to Write a Good Prompt\n\nYou can see the tips and examples to write\na good prompt in [prompt_examples](./prompt_examples.md).\n\n## Components\n\nThe `prompt2model` package is composed\nof several components, each designed\nto fulfill a specific purpose. To gain\na comprehensive understanding of how to\nutilize each component effectively,\nplease consult the `readme.md` file\nsituated in the directory of the respective\ncomponent. These files can be found at\n`./prompt2model/\u003ccomponent\u003e/readme.md`.\nThey provide detailed information and\ninstructions on customizing and maximizing\nthe functionality of each\ncomponent within the package.\n\n## Contribution\n\nIf you're interested in contributing to the `prompt2model` project, please\n\n- refer to [CONTRIBUTING.md](CONTRIBUTING.md)\n- open an [issue](https://github.com/neulab/prompt2model/issues) or submit a PR\n- join us on [discord](https://discord.gg/UCy9csEmFc)\n- or reach out to [@vijaytarian](https://twitter.com/vijaytarian)\n  and [@Chenan3_Zhao](https://twitter.com/Chenan3_Zhao) on Twitter\n\n## Cite\n\nWe have [written a paper describing Prompt2Model in detail](https://arxiv.org/abs/2308.12261).\n\nIf you use Prompt2Model in your research, please cite us!\n\nIf you discuss or use the overall prompt2model framework, please reference\n\n```bibtex\n@misc{prompt2model,\n      title={Prompt2Model: Generating Deployable Models from Natural Language Instructions},\n      author={Vijay Viswanathan and Chenyang Zhao and Amanda Bertsch and Tongshuang Wu and Graham Neubig},\n      year={2023},\n      eprint={2308.12261},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL}\n}\n```\n\nIf you discuss or use our dataset retrieval and transformation tools, please reference\n\n```bibtex\n@misc{prompt2modeldatatune,\n      title={Better Synthetic Data by Retrieving and Transforming Existing Datasets}, \n      author={Saumya Gandhi and Ritu Gala and Vijay Viswanathan and Tongshuang Wu and Graham Neubig},\n      year={2024},\n      eprint={2404.14361},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneulab%2Fprompt2model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneulab%2Fprompt2model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneulab%2Fprompt2model/lists"}