Coder Social home page Coder Social logo

techfluent-au / prompt2model Goto Github PK

View Code? Open in Web Editor NEW

This project forked from neulab/prompt2model

1.0 0.0 0.0 49.02 MB

prompt2model - Generate Deployable Models from Natural Language Instructions

License: Apache License 2.0

Python 95.01% Jupyter Notebook 4.99%

prompt2model's Introduction

Prompt2Model - Generate Deployable Models from Instructions

PyPI version Github Actions CI tests MIT license Discord Colab

Prompt2Model is a system that takes a natural language task description (like the prompts used for LLMs such as ChatGPT) to train a small special-purpose model that is conducive for deployment.

prompt2model_teaser

Quick Start

Notebook

You can run our demo of Prompt2Model through a notebook:

Command Line

You can also run through the command line.

pip install prompt2model

Prompt2Model supports various platforms such as OpenAI, Anthropic, Huggingface, etc. using LiteLLM.

If you are using OpenAI models (such as the default gpt-3.5-turbo), please obtain an OpenAI API key on their website then set the environment variable OPENAI_API_KEY to your API key by running the following command in your terminal:

export OPENAI_API_KEY=<your key>

List of all supported providers

You can then run

python prompt2model_demo.py

to create a small model from a prompt, as shown in the demo video below. This script must be run on a device with an internet connection to access the OpenAI API. For best results, run this script on a device with a GPU for training your model.

Demo

promptmodel_demo.mp4

Tips and Examples to Write a Good Prompt

You can see the tips and examples to write a good prompt in prompt_examples.

Components

The prompt2model package is composed of several components, each designed to fulfill a specific purpose. To gain a comprehensive understanding of how to utilize each component effectively, please consult the readme.md file situated in the directory of the respective component. These files can be found at ./prompt2model/<component>/readme.md. They provide detailed information and instructions on customizing and maximizing the functionality of each component within the package.

Contribution

If you're interested in contributing to the prompt2model project, please

Cite

We have written a paper describing Prompt2Model in detail.

If you use Prompt2Model in your research, please cite our paper:

@misc{prompt2model,
      title={Prompt2Model: Generating Deployable Models from Natural Language Instructions},
      author={Vijay Viswanathan and Chenyang Zhao and Amanda Bertsch and Tongshuang Wu and Graham Neubig},
      year={2023},
      eprint={2308.12261},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

prompt2model's People

Contributors

zhaochenyang20 avatar viswavi avatar neubig avatar hitenvidhani avatar ritugala avatar saum7800 avatar abertsch72 avatar anindyadeep avatar farhaduneci avatar eltociear avatar krrishdholakia avatar souryadipstan avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.