Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ef1991c
Introduce pluggable decision policies for ForecasterModel (#1)
laerdon Apr 1, 2026
ed76ff6
reformulated decisionpolicy threshold tuning
Apr 11, 2026
21a314f
final 1/x
Apr 26, 2026
924f909
download config
Apr 28, 2026
e448225
update notebook
Apr 28, 2026
44f7718
Delete examples/forecaster/train_deferral.py
laerdon May 1, 2026
736f324
added more decision policies
May 25, 2026
167c71f
Merge branch 'master' into master
laerdon May 25, 2026
575f8e7
Merge branch 'master' of https://github.com/laerdon/ConvoKit
May 25, 2026
e23ad52
black formatting
May 25, 2026
431d693
fixes for imports on new Decision Policies, rst add, cleaned Transfor…
laerdon Jun 8, 2026
760403c
black reformat
laerdon Jun 8, 2026
87fc7f3
updated download config with human benchmark entry, downloader fixes …
Jun 9, 2026
184408f
updated decision rst to add arxiv
Jun 12, 2026
90e4ab2
updates to docs, added decisionpolicy demo to Run Transformer Finetun…
Jun 27, 2026
764be2c
removed extraneous from table
Jun 27, 2026
84ccf80
simulationavgdecisionpolicy citation
Jun 27, 2026
89faaf9
added citation forecaster rst
Jun 27, 2026
717caaf
decisionpolicy demo os visible device fix
Jun 27, 2026
86f07ce
Merge branch 'master' into master
laerdon Jun 27, 2026
ca4a7e9
table update
Jun 27, 2026
790289d
Merge branch 'master' of https://github.com/laerdon/ConvoKit
Jun 27, 2026
47bfa78
selector fixes
Jun 28, 2026
eb2b9f0
Merge branch 'master' of https://github.com/CornellNLP/ConvoKit
Jun 28, 2026
82f2605
bug fix forecaster demo
Jun 28, 2026
c9d3cd5
Forecaster docs bugfix
Jul 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/source/forecaster.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ Unless otherwise specified, the performance is reported using the ThresholdDecis
+=====================+===================================+=======+======+=======+=======+======+==========+=========================+
| Gemma2 9B | ThresholdDecisionPolicy | 71.0 | 69.1 | 76.1 | 72.3 | 34.2 | 3.9 | +1.8 (8.4 - 6.6) |
+---------------------+-----------------------------------+-------+------+-------+-------+------+----------+-------------------------+
| Gemma2 9B | DeferralDecisionPolicy | 70.9 | 72.0 | 68.4 | 70.1 | 26.7 | 3.8 | -0.1 (7.0 - 7.1) |
| Gemma2 9B | DeferralDecisionPolicy | 70.9 | 72.1 | 68.4 | 70.2 | 26.7 | 3.8 | -0.1 (7.0 - 7.1) |
+---------------------+-----------------------------------+-------+------+-------+-------+------+----------+-------------------------+
| Gemma2 9B | SimulationAverageDecisionPolicy | 70.2 | 68.1 | 76.6 | 72.0 | 36.1 | 4.0 | -1.2 (9.3 - 10.5) |
| Gemma2 9B | SimulationAverageDecisionPolicy | 70.2 | 68.1 | 76.6 | 72.0 | 36.2 | 4.0 | -1.2 (9.3 - 10.5) |
+---------------------+-----------------------------------+-------+------+-------+-------+------+----------+-------------------------+
| Mistral 7B | ThresholdDecisionPolicy | 70.7 | 68.8 | 76.0 | 72.1 | 34.6 | 4.0 | +2.9 (8.1 - 5.2) |
+---------------------+-----------------------------------+-------+------+-------+-------+------+----------+-------------------------+
Expand Down
49 changes: 26 additions & 23 deletions examples/forecaster/Run Transformer Fine-tuned Models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [
{
Expand All @@ -26,26 +26,29 @@
"name": "stderr",
"output_type": "stream",
"text": [
"2026-06-27 20:18:39.864582: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
"2026-06-27 20:18:39.887405: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
"/reef/lyk25/ConvoKit/dist/.venv/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
" from .autonotebook import tqdm as notebook_tqdm\n",
"WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n",
"E0000 00:00:1782591519.912052 859600 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
"E0000 00:00:1782591519.919822 859600 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
"W0000 00:00:1782591519.938735 859600 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
"W0000 00:00:1782591519.938755 859600 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
"W0000 00:00:1782591519.938757 859600 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
"W0000 00:00:1782591519.938760 859600 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
"2026-06-27 20:18:39.944875: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
"To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n"
"I0000 00:00:1782619476.409075 1013993 port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
"I0000 00:00:1782619476.481779 1013993 cpu_feature_guard.cc:227] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
"To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
"WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n",
"I0000 00:00:1782619477.990444 1013993 port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"INFO 06-27 20:18:48 [__init__.py:216] Automatically detected platform cuda.\n",
"🦥 Unsloth Zoo will now patch everything to make training faster!\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Unable to import `torchao` Tensor objects. This may affect loading checkpoints serialized with `torchao`\n"
]
}
],
"source": [
Expand Down Expand Up @@ -78,16 +81,16 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"# CPU mode (noting that it will be slower)\n",
"DEVICE = \"cuda\"\n",
"\n",
"corpus_name = \"cga-wikiconv\"\n",
"# corpus_name = \"cga-wikiconv\"\n",
"# corpus_name = \"cga-cmv-legacy\"\n",
"# corpus_name = \"cga-cmv-large\"\n",
"corpus_name = \"cga-cmv-large\"\n",
"label_metadata = \"has_removed_comment\" if 'cmv' in corpus_name else 'conversation_has_personal_attack'\n",
"\n",
"YOUR_MODEL_DIRECTORY = \"YOUR_MODEL_DIRECTORY\"\n",
Expand All @@ -96,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -125,7 +128,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -223,11 +226,11 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"def transform_selector(context_tuple, corpus_name):\n",
"def transform_selector(context_tuple):\n",
" \"\"\"\n",
" For transform we only need to check that the conversation is in the test split\n",
" \"\"\"\n",
Expand All @@ -238,7 +241,7 @@
" matches_split = (context_tuple.current_utterance.get_conversation().meta[\"split\"] == \"test\")\n",
" is_end = (len(context_tuple.context) == convo_length)\n",
"\n",
" if corpus_name.contains(\"cmv\"):\n",
" if \"cmv\" in corpus_name:\n",
" return (matches_split)\n",
" else:\n",
" return (matches_split and not is_end)\n",
Expand Down Expand Up @@ -505,7 +508,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -813,7 +816,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
Expand All @@ -827,7 +830,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.11"
"version": "3.12.4"
}
},
"nbformat": 4,
Expand Down
Loading