Home/Model Training/P-tuning-v2
P-tuning-v2 logo

P-tuning-v2

THUDM/P-tuning-v2

Optimized deep prompt tuning strategy comparable to fine-tuning across scales and tasks

GraphCanon updated Sep 26, 2026 · GitHub synced Sep 26, 2026

41views this month

2.1k stars212 forksLast push Nov 16, 2023 Python Apache-2.0

Decision brief

P-tuning-v2 is an optimized deep prompt tuning strategy that can be used for tasks like natural language processing and parameter-efficient learning where few parameters need to be adjusted compared to full fine-tuning.

Good fit when

  • For scenarios requiring efficient use of resources, as P-tuning v2 requires fewer parameters than traditional fine-tuning methods.
  • When working with small to medium-sized models or tasks that are challenging for sequence tagging where deep prompt tuning can bridge the performance gap without full model fine-tuning.

Avoid when

  • Avoid using P-tuning v2 when you have large-scale datasets and model architectures, as it might not be as effective compared to full fine-tuning methods.
  • If your project requires a high level of customization beyond prompt tuning or continuous prompts do not align with the problem complexity.
Requirements:
Min 8 GB RAM; Experiments were conducted on NVIDIA DGX-A100; however, RTX 3090 or RTX 2080 Ti GPUs can suffice given certain conditions.; CUDA version should be at least 11.1 and specific versions of pytorch (1.7.1), torchvision (0.8.2) and torchaudio (0.7.2).; A conda environment setup with Python 3.8.5 is recommended for optimal performance.

Observed Jul 17, 2026 · Source: enrich:decision_facts

Verify the decision

Maintenance and security

Full trust report
Maintenance
Dormant (1045d since push)
As of Sep 26, 2026
Provenance
Not a fork · Organization account
As of Sep 26, 2026
Security (OSV)
50 low (50 low)
As of Jul 11, 2026

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

pip install P-tuning-v2
PyPI

Similar tools

Same-category neighbours. No typed graph edges are catalogued for this tool yet.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

Repository for P-tuning v2, an optimized prompt tuning approach that provides performance similar to traditional fine-tuning but with fewer parameters.

Capability facts

Languages
python

Source: github.language · Sep 26, 2026

Categories

Compatibility

Sourced claims from the README excerpt - not unsourced marketing copy.

Python runtimePython

Source: README excerpt (regex_v1, Sep 26, 2026)

conda create -n pt2 python=3.8.5
Source link

Tags

README

P tuning v2 Source codes and data for [ACL 2022] P Tuning v2: Prompt Tuning Can Be Comparable to Finetuning Universally Across Scales and Tasks [Findings of EMNLP 2023] Parameter Efficient Prompt Tuning Makes Generalized and Calibrated Neural Text Retrievers [[Code]](https://gith...

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.