awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
thunlp avatar

thunlp/OpenPrompt

0
View on GitHub↗
thunlp.github.io/OpenPrompt↗

OpenPrompt

OpenPrompt is a prompt learning framework designed to adapt large language models to downstream natural language processing tasks. It provides a comprehensive toolkit for implementing manual, soft, and continuous prompting strategies, allowing models to be refined without updating all underlying parameters.

The project is distinguished by its support for both discrete and continuous prompt tuning. It includes a system for injecting trainable soft tokens and embeddings into model inputs via gradient descent, as well as an automatic prompt generation engine that uses beam search and generative models to discover high-probability text templates for specific datasets.

The framework covers several core capability areas, including template design and label verbalization for mapping classification labels to vocabulary words. It also provides model adaptation tools to wrap pre-trained models, logit calibration to improve prediction accuracy, and a data pipeline featuring specialized sampling logic for few-shot learning.

Training and experimental workflows are managed through configuration files that define learning scenarios, hyperparameters, and pipeline specifications.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Features

  • Prompt-Based Adaptation - Adapts pre-trained models to specific tasks using textual templates and label verbalizers without updating all model parameters.
  • Prompt Learning Frameworks - Offers a framework for adapting large language models to downstream tasks using textual templates and label verbalizers.
  • Continuous Prompt Tuning - Integrates trainable soft tokens and continuous embeddings into text templates to optimize performance via gradient descent.
  • Verbal Label Projections - Projects original class labels onto specific target vocabulary words to facilitate verbalized predictions.
  • Few-Shot Learning Frameworks - Provides a comprehensive infrastructure for performing NLP classification and entity extraction with minimal labeled examples.
  • Few-Shot Text Learning - Trains language models to perform classification or generation tasks using only a very small number of labeled examples.
  • Label Verbalizers - Projects classification labels onto specific vocabulary words to translate model logits into human-readable category predictions.
  • NLP Template Engines - Includes a system for defining and managing textual patterns and placeholders to structure inputs for language models.
  • Prompt-Based Model Adaptation - Adapts pre-trained models by wrapping them in specialized layers that handle prompt formatting and label projection.
  • Template Definitions - Inserts placeholders and masks into original input text to guide model behavior for specific tasks.
  • Prompt Template Transformations - Wraps raw text in structured patterns with placeholders and masks to adapt pre-trained models to specific tasks.
  • Prompt Templates - Defines textual patterns and placeholder mappings to implement manual or prefix-tuning strategies for model inputs.
  • Prompt Tuning Libraries - Provides a library of manual, soft, and continuous prompting strategies to refine model behavior without full parameter updates.
  • Vocabulary Projection - Projects target classification labels onto specific words within the model vocabulary to enable verbal predictions.
  • Automatic Label Verbalization - Finds optimal vocabulary words to represent classification labels using scoring functions and training data.
  • NLP Model Assemblers - Assembles text classifiers by combining modular components for model architecture, data formats, and tensorizers.
  • Prompt Text Preparations - Wraps datasets with templates and tokenizes them through a pipeline to manage sequence lengths.
  • Few-Shot Sample Selection - Selects small subsets of data based on total counts or per-class quotas for few-shot learning.
  • Few-Shot Learning Optimizers - Automatically generates optimal templates and verbalizers to improve performance in low-resource few-shot scenarios.
  • Beam Search Implementations - Implements beam search algorithms to automatically discover high-probability text templates for specific datasets.
  • Prompt Pipeline Encapsulations - Combines language models, text templates, and verbalizers into a single unified object for streamlined training and inference.
  • Logit Calibration - Calculates baseline logit tensors across the vocabulary to adjust prediction probabilities and improve classification accuracy.
  • Automatic Template Discovery - Uses beam search and generative models to automatically discover high-probability text templates for specific datasets.
  • Automatic Template Generation - Creates high-probability text templates using beam search decoding based on a dataset and generation model.
  • Zero and Few-Shot Learning - Configures operation modes for full-supervision, zero-shot, and few-shot learning scenarios.
  • Few-Shot Sample Selection - Provides logic to select a minimal subset of training data based on class quotas for low-resource learning.
  • Label Projection Learning - Optimizes embedding weights used to project classification labels onto the model vocabulary.
  • Prompted Data Loaders - Integrates tokenization and template application directly into the training pipeline using specialized data loaders.
  • Prompt Improvement Methods - Prototypical verbalizer implementation for few-shot tuning.
  • Prompt Learning - Modular framework for prompt-learning and task-specific adaptation.
  • Prompt Learning Frameworks - A comprehensive framework for prompt-learning research and implementation.
  • Prompt Optimization Frameworks - Framework for research into prompt-learning techniques.
4,911 stars·477 forks·Python·Apache-2.0·34 views

Star history

Star history chart for thunlp/openpromptStar history chart for thunlp/openprompt

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

Frequently asked questions

What does thunlp/openprompt do?

OpenPrompt is a prompt learning framework designed to adapt large language models to downstream natural language processing tasks. It provides a comprehensive toolkit for implementing manual, soft, and continuous prompting strategies, allowing models to be refined without updating all underlying parameters.

What are the main features of thunlp/openprompt?

The main features of thunlp/openprompt are: Prompt-Based Adaptation, Prompt Learning Frameworks, Continuous Prompt Tuning, Verbal Label Projections, Few-Shot Learning Frameworks, Few-Shot Text Learning, Label Verbalizers, NLP Template Engines.

Which projects share features with thunlp/openprompt?

Projects with overlapping indexed features include: zalandoresearch/flair — Flair is a natural language processing framework for training and applying models for sequence labeling and text… openai/gpt-3 — This project is a large language model and general purpose natural language processing engine designed for text… rockbenben/chatgpt-shortcut — ChatGPT-Shortcut is a prompt engineering toolkit and management library designed to organize, refine, and deploy… sylphai-inc/adalflow — AdalFlow is an autonomous AI agent framework and LLM application library designed for building modular workflows. It… agenta-ai/agenta — Agenta is a Prompt Ops lifecycle manager and prompt management platform that decouples prompt engineering from… autogluon/autogluon — AutoGluon is an automated machine learning framework and multimodal library designed to automate the end-to-end…

Projects sharing features with OpenPrompt

These projects share indexed features with OpenPrompt. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • zalandoresearch/flairzalandoresearch avatar

    zalandoresearch/flair

    14,378View on GitHub↗

    Flair is a natural language processing framework for training and applying models for sequence labeling and text classification. It provides a system for generating word embeddings and identifying semantic entities within text. The framework includes a dedicated system for zero and few-shot learning, enabling text classification and entity extraction using minimal training examples by leveraging pre-trained knowledge. Its capabilities cover named entity recognition, sentiment analysis, and the training of specialized models using custom datasets. It also includes tooling for the visual highl

    Python
    View on GitHub↗14,378
  • openai/gpt-3openai avatar

    openai/gpt-3

    15,740View on GitHub↗

    This project is a large language model and general purpose natural language processing engine designed for text generation and linguistic analysis. It functions as a few-shot learning framework capable of solving diverse reasoning and language tasks using a small number of provided examples without requiring additional training. The system specializes in generating human-like synthetic text and long-form content, including news articles. It also provides capabilities for automated text reasoning to solve logic and arithmetic problems through direct interaction. The project includes tools for

    View on GitHub↗15,740
  • rockbenben/chatgpt-shortcutrockbenben avatar

    rockbenben/ChatGPT-Shortcut

    7,806View on GitHub↗

    ChatGPT-Shortcut is a prompt engineering toolkit and management library designed to organize, refine, and deploy structured instructions for large language models. It functions as a browser-based prompt injector and a self-hosted prompt database, allowing users to maintain a curated collection of specialized templates. The project features a community prompt gallery where users can publish, discover, and vote on effective templates. It distinguishes itself by integrating these libraries directly into chat interfaces via userscripts or browser extensions, enabling access to prompts through sid

    TypeScriptaiai-toolschatgpt
    View on GitHub↗7,806
  • sylphai-inc/adalflowSylphAI-Inc avatar

    SylphAI-Inc/AdalFlow

    4,227View on GitHub↗

    AdalFlow is an autonomous AI agent framework and LLM application library designed for building modular workflows. It serves as a model-agnostic interface and RAG pipeline orchestrator, allowing users to develop ReAct agents that utilize iterative reasoning and external tool execution to solve complex tasks. The project distinguishes itself through a prompt optimization system that uses textual gradient descent to automatically refine prompt templates and few-shot examples. It treats model feedback as a differentiable signal, enabling a form of LLM backpropagation to iteratively improve output

    Python
    View on GitHub↗4,227
Compare all 30 related projects→