thunlp/OpenPrompt ? reverse-engineered prompt
Reverse engineered prompt
Build me a Python library for prompt learning with pre trained language models, similar to OpenPrompt.
I want a clean framework where I can define a task, wrap my input text in a template, map labels to words with a verbalizer, and then train or run inference with a prompt based model. It should work with models from Hugging Face, support common NLP tasks like classification and generation, and make it easy to swap in different prompt methods without rewriting everything.
Please include a simple example and a few tutorial style scripts that show sentiment analysis and at least one generation style task. I’d also like the code to be organized so people can extend it with their own templates and verbalizers, plus basic data loading and evaluation helpers.
Make it easy to install and use from a fresh Python environment, and include clear docs so someone can get started quickly. If you need to check current library docs or best practices online, go ahead and do that.