Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/thunlp/OpenPrompt
/ 2.1_conditional_generation.py
File
2.1_conditional_generation.py
tutorial/2.1_conditional_generation.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
2
# # Conditional Generation with Prefix Tuning.
3
# In this tutorial, we do conditional generation with prefix tuning template.
4
Callers
nothing calls this directly
Calls
12
WebNLGProcessor
Class · 0.90
load_plm
Function · 0.90
PrefixTuningTemplate
Class · 0.90
PromptDataLoader
Class · 0.90
PromptForGeneration
Class · 0.90
cuda
Method · 0.80
train
Method · 0.80
evaluate
Function · 0.70
get_train_examples
Method · 0.45
get_dev_examples
Method · 0.45
get_test_examples
Method · 0.45
wrap_one_example
Method · 0.45
Tested by
no test coverage detected