Search is not available for this dataset
repo
stringlengths
2
152
⌀
file
stringlengths
15
239
code
stringlengths
0
58.4M
file_length
int64
0
58.4M
avg_line_length
float64
0
1.81M
max_line_length
int64
0
12.7M
extension_type
stringclasses
364 values
null
ParlAI-main/projects/dialogue_bias/agents.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Optional from parlai.core.message import Message from projects.style_gen.modules import STYLE_SEP_TO...
637
29.380952
82
py
null
ParlAI-main/projects/dialogue_bias/util.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os from collections import defaultdict from typing import Dict, List, Tuple import pandas as pd RACES_ETHNICIT...
8,654
37.29646
89
py
null
ParlAI-main/projects/dialogue_safety/README.md
# Build it Break it Fix it for Dialogue Safety: Robustness from Adversarial Human Attack ## Paper information Emily Dinan, Samuel Humeau, Bharath Chintagunta, Jason Weston. _[Build it Break it Fix it for Dialogue Safety: Robustness from Adversarial Human Attack](https://arxiv.org/abs/1908.06083)_. To appear at EMNLP 2...
5,173
63.675
1,213
md
null
ParlAI-main/projects/dialogue_unlikelihood/README.md
## Don’t Say _That_! Making Inconsistent Dialogue Unlikely with Unlikelihood Training Margaret Li, Stephen Roller, Ilia Kulikov, Sean Welleck, Y-Lan Boureau, Kyunghyun Cho, Jason Weston ## Abstract Generative dialogue models currently suffer from a number of problems which standard maximum likelihood training does ...
1,774
54.46875
227
md
null
ParlAI-main/projects/dialogue_unlikelihood/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.
198
38.8
65
py
null
ParlAI-main/projects/dialogue_unlikelihood/agents.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Optional from parlai.core.params import ParlaiParser from parlai.core.opt import Opt import json impo...
20,340
35.00177
103
py
null
ParlAI-main/projects/director/README.md
# DIRECTOR: Generator-Classifiers For Supervised Language Modeling Kushal Arora, Kurt Shuster, Sainbayar Sukhbaatar, Jason Weston <b>Paper Link</b>: [https://arxiv.org/abs/2206.07694](https://arxiv.org/abs/2206.07694) ## Abstract Current language models achieve low perplexity but their resulting generations still...
7,077
227.322581
3,119
md
null
ParlAI-main/projects/director/director_agent.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ DirectorAgent for Supervised Language Modeling. """ import torch import torch.nn as nn import torch.nn.functional a...
23,406
36.213037
136
py
null
ParlAI-main/projects/director/tasks/safety.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import List, Tuple from typing import Optional from parlai.core.agents import ( Agent, create_agent...
13,614
34.090206
107
py
null
ParlAI-main/projects/dodecadialogue/README.md
## The Dialogue Dodecathlon ### _Open-Domain Knowledge and Image Grounded Conversational Agents_ Kurt Shuster, Da Ju, Stephen Roller, Emily Dinan, Y-Lan Boureau, Jason Weston ## Abstract We introduce dodecaDialogue: a set of 12 tasks which measure if a conversational agent can communicate engagingly with personal...
4,164
43.784946
189
md
null
ParlAI-main/projects/drqa/README.md
# DrQA This archived project was a (partial) implementation of the DrQA Document Reader from: *Danqi Chen, Adam Fisch, Jason Weston, Antoine Bordes. 2017. Reading Wikipedia to Answer Open-Domain Questions. In Association for Computational Linguistics (ACL).* Read more about DrQA [here](https://arxiv.org/pdf/1704.000...
539
35
85
md
null
ParlAI-main/projects/fits/README.md
# Learning New Skills after Deployment: _Improving open-domain internet-driven dialogue with human feedback_ Jing Xu, Megan Ung, Mojtaba Komeili, Kushal Arora, Y-Lan Boureau, Jason Weston ## Abstract Frozen models trained to mimic static datasets can never improve their performance. Models that can employ internet-r...
3,579
56.741935
1,016
md
null
ParlAI-main/projects/fits/agents/director_bb2.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch import torch.nn as nn import torch.nn.functional as F from typing import Optional, Any, Dict, Tuple, Union,...
48,862
41.196028
2,243
py
null
ParlAI-main/projects/fits/agents/director_seeker.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch import torch.nn.functional as F import copy from typing import Optional, List, Tuple, Any, Dict, Union fro...
13,951
37.224658
212
py
null
ParlAI-main/projects/genderation_bias/README.md
## Queens are Powerful too: Mitigating Gender Bias in Dialogue Generation Emily Dinan, Angela Fan, Adina Williams, Jack Urbanek, Douwe Kiela, Jason Weston ## Abstract Models often easily learn biases present in the training data, and their predictions directly reflect this bias. We analyze the presence of gender bia...
1,817
49.5
258
md
null
ParlAI-main/projects/genderation_bias/agents.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Optional from parlai.core.params import ParlaiParser from parlai.core.opt import Opt from parlai.agen...
1,086
28.378378
80
py
null
ParlAI-main/projects/hallucination/README.md
# Reducing Hallucination in Conversational Agents ### _Retrieval Augmentation Reduces Hallucination in Conversation_ Kurt Shuster, Spencer Poff, Moya Chen, Douwe Kiela\*, Jason Weston\* \* Equal Contribution. ## Abstract Despite showing increasingly human-like conversational abilities, state-of-the-art dialogue mo...
9,143
59.96
1,147
md
null
ParlAI-main/projects/humaneval/README.md
# Human Evaluation of Conversations is an Open Problem: comparing the sensitivity of various methods for evaluating dialogue agents Eric Michael Smith, Orion Hsu, Rebecca Qian, Stephen Roller, Y-Lan Boureau, Jason Weston ## Abstract At the heart of improving conversational AI is the open problem of how to evaluate c...
3,875
57.727273
851
md
null
ParlAI-main/projects/image_chat/README.md
# Engaging Image Chat: Modeling Personality in Grounded Dialogue Kurt Shuster, Samuel Humeau, Antoine Bordes, Jason Weston Please see [Shuster et al. (2018)](https://arxiv.org/abs/1811.00945) for more details. ## Abstract To achieve the long-term goal of machines being able to engage humans in conversation, our mod...
3,855
51.108108
970
md
null
ParlAI-main/projects/image_chat/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import sys if sys.version_info < (3, 0): raise RuntimeError('ParlAI requires Python 3.')
293
28.4
65
py
null
ParlAI-main/projects/image_chat/interactive.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Talk with a model using a web UI. """ from typing import Dict, Any from http.server import BaseHTTPRequestHandler, H...
16,634
45.46648
3,550
py
null
ParlAI-main/projects/image_chat/transresnet_multimodal/__init__.py
0
0
0
py
null
ParlAI-main/projects/image_chat/transresnet_multimodal/modules.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Modules for TransresnetMultimodalAgent. """ from typing import Optional from parlai.core.params import ParlaiParser ...
19,412
33.177817
93
py
null
ParlAI-main/projects/image_chat/transresnet_multimodal/transresnet_multimodal.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Transresnet Multimodal Model (https://arxiv.org/abs/1811.00945). """ from typing import Optional from parlai.core.pa...
15,704
34.292135
91
py
null
ParlAI-main/projects/k2r/README.md
# Reason first, then respond: Modular Generation for Knowledge-infused Dialogue Leonard Adolphs, Kurt Shuster, Jack Urbanek, Arthur Szlam, Jason Weston <b>Paper Link</b>: [https://arxiv.org/abs/2111.05204](https://arxiv.org/abs/2111.05204) ## Abstract Large language models can produce fluent dialogue but often halluc...
4,951
90.703704
1,239
md
null
ParlAI-main/projects/k2r/lightqa/task/__init__.py
0
0
0
py
null
ParlAI-main/projects/k2r/lightqa/task/agents.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import json import os from parlai.core.teachers import DialogTeacher from parlai.utils.io import PathManager from parlai...
2,600
32.779221
87
py
null
ParlAI-main/projects/k2r/lightqa/task/build.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Download and build the data if it does not exist. """ from parlai.core.build_data import DownloadableFile import pa...
2,029
31.741935
93
py
null
ParlAI-main/projects/k2r/stacked_agent/scripts/stacked_agent_eval.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Evaluate the stacked models. """ from projects.k2r.stacked_agent.task.agents import ( StackedKnowledgeDialogueAg...
10,805
37.455516
93
py
null
ParlAI-main/projects/k2r/stacked_agent/task/agents.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from copy import deepcopy from typing import Optional, List from types import MethodType from collections import default...
28,280
36.310026
95
py
null
ParlAI-main/projects/k2r/wow/task/agents.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import random import os from typing import Optional, Tuple from tqdm import tqdm from collections import defaultdict imp...
5,756
35.903846
94
py
null
ParlAI-main/projects/light/README.md
# <img width="5%" src="scribe.png"/> LIGHT ### Learning in Interactive Games with Humans and Text <p align="center"><img width="90%" src="tavern.png" /></p> The LIGHT project is a large-scale fantasy text adventure game research platform for training agents that can both talk and act, interacting either with other mod...
5,149
51.55102
345
md
null
ParlAI-main/projects/light_whoami/README.md
# Am I Me or You? State-of-the-Art Dialogue Models Cannot Maintain Identity Kurt Shuster, Jack Urbanek, Arthur Szlam, Jason Weston ## Abstract State-of-the-art dialogue models still often stumble with regards to factual accuracy and self-contradiction. Anecdotally, they have been observed to fail to maintain charact...
8,817
65.300752
964
md
null
ParlAI-main/projects/light_whoami/agents/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Define PATHS to pre-trained models. """ RPA_RERANKER = 'zoo:light_whoami/rpa_reranker/model' TEST_RPA_RERANKER = 'zo...
1,053
39.538462
80
py
null
ParlAI-main/projects/light_whoami/agents/expanded_attention.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Expanded Attention Transformer Model. Specifically, the decoder uses an additional attention mechanism over a (possib...
43,118
36.462207
102
py
null
ParlAI-main/projects/light_whoami/agents/multi_objective.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Multi-objective Agents. These agents generally contain extra layers to solve the Am I Me or You task. """ from abc im...
37,138
37.287629
106
py
null
ParlAI-main/projects/light_whoami/agents/pacer.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ PACER: Partial And Complete Efficient Re-ranking. See `PacerTreeSearchMixin.modify_logprobs` for a complete descripti...
13,482
34.111979
132
py
null
ParlAI-main/projects/light_whoami/agents/poly_return_weights.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Overrides the standard Polyencoder Agent to only return the attention weights. """ import torch import torch.nn impor...
12,281
33.307263
87
py
null
ParlAI-main/projects/light_whoami/agents/rpa_rerank.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ LIGHT Am I Me or You Generative-Rerank Agent. The retriever reranks beam texts via the following architecture setup:...
11,316
34.58805
112
py
null
ParlAI-main/projects/light_whoami/agents/rpa_ul.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ LIGHT RPA Unlikelihood Agent. Utilizes a left-to-right RPA Classifier to predict tokens that yield incorrect charact...
12,406
36.82622
117
py
null
ParlAI-main/projects/light_whoami/task/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.
199
32.333333
65
py
null
ParlAI-main/projects/light_whoami/task/agents.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Teachers used in the Am I Me or You task. """ from abc import ABC from collections import deque import re from typing...
22,228
34.623397
119
py
null
ParlAI-main/projects/light_whoami/task/mutators.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Teachers used in the Am I Me or You task. """ import re from parlai.core.message import Message from parlai.core.muta...
2,298
32.808824
87
py
null
ParlAI-main/projects/light_whoami/task/utils.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Utilities + Functions. """ from collections import deque import random from typing import Dict # DEFAULT_DELIM = ' ...
2,855
25.444444
83
py
null
ParlAI-main/projects/mastering_the_dungeon/README.md
# Mastering the Dungeon This project was archived on 2020-08-01. The code had not been tested in a long time. If you wish to view the old code, you may rewind to the [`mastering_the_dungeon`](https://github.com/facebookresearch/ParlAI/tree/mastering_the_dungeon/projects/mastering_the_dungeon) tag. # Old README This ...
4,938
34.789855
661
md
null
ParlAI-main/projects/md_gender/README.md
## Multi-Dimensional Gender Bias Classification Emily Dinan, Angela Fan, Ledell Wu, Jason Weston, Douwe Kiela, Adina Williams ## Abstract Machine learning models are trained to find patterns in data. NLP models can inadvertently learn socially undesirable patterns when training on gender biased text. In this work, w...
2,238
53.609756
1,039
md
null
ParlAI-main/projects/md_gender/bert_ranker_classifier/agents.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Using classification metrics for a ranking BERT model. """ from parlai.agents.bert_ranker.bi_encoder_ranker import ...
1,085
30.028571
79
py
null
ParlAI-main/projects/memnn_feedback/README.md
# MemNN Feedback This project was deleted on 2020-08-01, and had not been tested in a long time. If you wish to see the code, you may rewind to the [`memnn_feedback`](https://github.com/facebookresearch/ParlAI/tree/memnn_feedback/projects/memnn_feedback) tag.
261
36.428571
106
md
null
ParlAI-main/projects/metacognition/README.md
# Reducing conversational agents' overconfidence through linguistic calibration ## Data COMING SOON! ## Code COMING SOON! ## Paper [Link](https://arxiv.org/abs/2012.14983); accepted to TACL 2022.
202
13.5
79
md
null
ParlAI-main/projects/msc/README.md
# Beyond Goldfish Memory: Long-Term Open-Domain Conversation Jing Xu, Arthur Szlam, Jason Weston ## Abstract Despite recent improvements in open-domain dialogue models, state of the art models are trained and evaluated on short conversations with little context. In contrast, the long-term conversation setting has ha...
2,861
40.478261
435
md
null
ParlAI-main/projects/msc/agents/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.
198
38.8
65
py
null
ParlAI-main/projects/msc/agents/long_rag.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Original Paper: https://arxiv.org/abs/2005.11401 ...
5,863
28.32
87
py
null
ParlAI-main/projects/msc/agents/long_tga.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch from typing import Optional, Tuple from parlai.agents.transformer.modules import ( TransformerDecoder, ...
4,089
34.877193
130
py
null
ParlAI-main/projects/msc/agents/memory_agent.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Agent code for memory agent. memory agent allows for read/write memory access. We modify the model input to include ...
9,358
36.890688
118
py
null
ParlAI-main/projects/multilight/README.md
# Multi-Party Chat: Conversational Agents in Group Settings with Humans and Models Jimmy Wei, Kurt Shuster, Arthur Szlam, Jason Weston, Jack Urbanek, Mojtaba Komeili ## Abstract Current dialogue research primarily studies pairwise (two-party) conversations, and does not address the everyday setting where more than t...
3,177
50.258065
966
md
null
ParlAI-main/projects/multimodal_blenderbot/README.md
**WARNING** This project has been archived. If you need to use this project, please revert to ParlAI 1.4.1. ------ # Multi-Modal Open-Domain Dialogue Kurt Shuster<sup>∗</sup>, Eric Michael Smith<sup>∗</sup>, Da Ju, Jason Weston ## Abstract Recent work in open-domain conversational agents has demonstrated that sig...
2,089
46.5
1,118
md
null
ParlAI-main/projects/multimodal_blenderbot/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.
199
32.333333
65
py
null
ParlAI-main/projects/multimodal_blenderbot/agents.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.agents.image_seq2seq.image_seq2seq import ImageSeq2seqAgent from projects.genderation_bias.agents import Bia...
485
27.588235
72
py
null
ParlAI-main/projects/params_vs_compute/README.md
# Which one is more important: more parameters or more computation? When we talk about the power of a deep learning model, often the only metric we pay attention to is its size, which is measured by the number parameters in that model. However, the amount of computation to run that model is an important metric too, bu...
7,793
164.829787
1,044
md
null
ParlAI-main/projects/params_vs_compute/hash_ladder/hash_ladder.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations import torch from typing import Dict, Optional, Tuple import torch.nn as nn from parl...
7,647
32.39738
176
py
null
ParlAI-main/projects/personachat/README.md
# PersonaChat This project was archived on 2020-08-01. The models and scripts have not been tested in a long time. You may continue to use the data without issue (`--task personachat`). If you need to use the model or scripts, please rewind to the [`personachat`](https://github.com/facebookresearch/ParlAI/tree/persona...
1,564
42.472222
122
md
null
ParlAI-main/projects/personality_captions/README.md
# Engaging Image Captioning via Personality Kurt Shuster, Samuel Humeau, Hexiang Hu, Antoine Bordes, Jason Weston Please see [Shuster et al. (CVPR 2019)](https://arxiv.org/abs/1810.10665) for more details. ## Abstract Standard image captioning tasks such as COCO and Flickr30k are factual, neutral in tone and (to a ...
4,305
55.657895
1,082
md
null
ParlAI-main/projects/personality_captions/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import sys if sys.version_info < (3, 0): raise RuntimeError('ParlAI requires Python 3.')
293
28.4
65
py
null
ParlAI-main/projects/personality_captions/interactive.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Talk with a model using a web UI. """ from http.server import BaseHTTPRequestHandler, HTTPServer from parlai.script...
14,003
45.83612
3,550
py
null
ParlAI-main/projects/personality_captions/transresnet/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.
199
32.333333
65
py
null
ParlAI-main/projects/personality_captions/transresnet/modules.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Model Code. """ from typing import Optional from parlai.core.params import ParlaiParser from parlai.core.opt import ...
20,165
32.554077
88
py
null
ParlAI-main/projects/personality_captions/transresnet/transresnet.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Agent code for the model described in (https://arxiv.org/abs/1811.00945). """ from typing import Optional from parla...
18,285
34.097889
91
py
null
ParlAI-main/projects/polyencoder/README.md
# Poly-encoders: Transformer Architectures and Pre-training Strategies for Fast and Accurate Multi-sentence Scoring Paper: https://arxiv.org/abs/1905.01969 ## Abstract The use of deep pre-trained bidirectional transformers has led to remarkable progress in anumber of applications (Devlin et al., 2018). For ...
6,810
49.828358
1,045
md
null
ParlAI-main/projects/recipes/README.md
# Recipes for building an open-domain chatbot Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston ## Abstract Building open-domain chatbots is a challenging area for machine learning research. While prior work has...
7,856
73.828571
996
md
null
ParlAI-main/projects/recipes/chatlog_2.7B_render.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <meta name="generator" content="HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 17.1), see www.w3.org"> <title></title> </head> <body> <h2>2.7B</h2> <table border="1" frame="void" rules="rows"> <tr> <th></th> <...
609,720
60.180112
200
html
null
ParlAI-main/projects/reframe_thoughts/README.md
# Training Models to Generate, Recognize, and Reframe Unhelpful Thoughts Mounica Maddela, Megan Ung, Jing Xu, Andrea Madotto, Heather Foran, Y-Lan Boureau ## Abstract Many cognitive approaches to well-being, such as recognizing and reframing unhelpful thoughts, have received considerable empirical support over the p...
1,291
70.777778
1,050
md
null
ParlAI-main/projects/roscoe/README.md
# ROSCOE: A Suite of Metrics for Scoring Step-by-Step Reasoning This repository contains the code and reproduction steps for our paper [ROSCOE: A Suite of Metrics for Scoring Step-by-Step Reasoning](https://openreview.net/pdf?id=xYlJRpzZtsY). ## Content - [Overview](#overview) - [Setup](#setup) - [ROSCOE evalu...
6,912
44.781457
650
md
null
ParlAI-main/projects/roscoe/roscoe.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Evaluate dataset of generated chains-of-resoning. Usage: python projects/roscoe/roscoe.py """ import json import os...
7,212
29.957082
92
py
null
ParlAI-main/projects/roscoe/score.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from collections import defaultdict import itertools import math import numpy as np from typing import Any, Dict, Iterab...
39,044
37.354617
126
py
null
ParlAI-main/projects/roscoe/utils.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import numpy as np import os import pathlib from nltk.tokenize import sent_tokenize from typing import Callable, Dict, I...
3,998
31.778689
95
py
null
ParlAI-main/projects/roscoe/baselines/constants.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from dataclasses import dataclass from enum import Enum from typing import List, Optional class UseRef(Enum): YES =...
2,760
24.564815
127
py
null
ParlAI-main/projects/roscoe/baselines/run.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse import glob import os from typing import Dict, List import pandas import json from projects.roscoe.utils...
8,882
34.963563
124
py
null
ParlAI-main/projects/roscoe/baselines/scores.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Dict, List from projects.roscoe.baselines.constants import ( BARTSCORE_CNN_F, BARTSCORE_CNN_P...
11,754
32.206215
121
py
null
ParlAI-main/projects/roscoe/meta_evaluation/correlations.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import pandas from scipy.stats import somersd class Analyzer: def __init__(self, reference_column: str): s...
1,480
33.44186
81
py
null
ParlAI-main/projects/roscoe/meta_evaluation/roscoe_correlations.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Helper function to run correlation analysis on annotated data evaluations, scattered across model-specific folders. ...
50,256
32.888739
121
py
null
ParlAI-main/projects/roscoe/meta_evaluation/roscoe_synthetic_correlations.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Helper function to run correlation analysis on synthetic data evaluations, scattered across model-specific folders. ...
12,425
29.833747
91
py
null
ParlAI-main/projects/roscoe/meta_evaluation/run_synthetic_correlations.sh
#!/bin/bash SCORER="./projects/roscoe/meta_evaluation/roscoe_synthetic_correlations.py" python $SCORER --dataset-name aqua python $SCORER --dataset-name asdiv python $SCORER --dataset-name entailment_bank python $SCORER --dataset-name eqasc python $SCORER --dataset-name math_dataset python $SCORER --dataset-name proo...
328
28.909091
75
sh
null
ParlAI-main/projects/roscoe/meta_evaluation/table_file_writing.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import copy import csv import math import os import pandas from typing import Dict, List, Union from projects.roscoe.sco...
14,668
36.136709
125
py
null
ParlAI-main/projects/roscoe/roscoe_data/download_annotated.sh
#!/bin/bash PATH_TO_DATA="./projects/roscoe/roscoe_data" RESTORE_SCRIPT="./projects/roscoe/roscoe_data/restore_annotated.py" mkdir -p ${PATH_TO_DATA}/raw mkdir -p ${PATH_TO_DATA}/generated mkdir -p ${PATH_TO_DATA}/annotated #Step 1. Download [dataset]_reasoning.txt in projects/roscoe/roscoe_data/generated/, # and an...
1,655
41.461538
112
sh
null
ParlAI-main/projects/roscoe/roscoe_data/generate_perturbed_data.sh
#!/bin/bash # Usage: # sh roscoe_data/generate_perturbed_data.sh PATH_TO_DATA="./projects/roscoe/roscoe_data/" RESTORE_SCRIPT="./projects/roscoe/roscoe_data/restore_data.py" mkdir -p ${PATH_TO_DATA}/synthetic mkdir -p ${PATH_TO_DATA}/synthetic_sentinel echo "Generating perturbations ..." # ==== data generation for e...
7,278
60.168067
255
sh
null
ParlAI-main/projects/roscoe/roscoe_data/restore_annotated.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Restore data with reasoning chains. """ import json import csv import os import re import xmltodict from parlai.core...
11,686
29.594241
109
py
null
ParlAI-main/projects/roscoe/roscoe_data/restore_data.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Restore perturbed synthetic data to maintain certain percent of perturbations. Usage: with perturbation IDs file: py...
6,071
32
124
py
null
ParlAI-main/projects/roscoe/synthetic_evaluation/score_all.sh
#!/bin/bash # Example: # sh projects/roscoe/synthetic_evaluation/score_all.sh sim_sce facebook/roscoe-512-roberta-base print_usage() { printf "Usage: score_all.sh model_type model_name" } if [ $# -ne 2 ] ; then echo "Require 2 arguments: model type, and model name" print_usage exit 1 fi SCORER="./proj...
1,032
42.041667
115
sh
null
ParlAI-main/projects/roscoe/synthetic_evaluation/synthetic_roscoe.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Evaluate perturbed synthetic dataset. Usage: python projects/roscoe/synthetic_evaluation/synthetic_roscoe.py """ im...
8,049
29.149813
92
py
null
ParlAI-main/projects/saferdialogues/README.md
# SaFeRDialogues: Taking Feedback Gracefully after Conversational Safety Failures Megan Ung, Jing Xu, Y-Lan Boureau ## Abstract Current open-domain conversational models can easily be made to talk in inadequate ways. Online learning from conversational feedback given by the conversation partner is a promising avenu...
1,882
46.075
622
md
null
ParlAI-main/projects/safety_bench/README.md
# Safety Bench: Checks for Anticipating Safety Issues with E2E Conversational AI Models A suite of dialogue safety unit tests and integration tests, in correspondence with the paper [*Anticipating Safety Issues in E2E Conversational AI: Framework and Tooling*](https://arxiv.org/abs/2107.03451). **Abstract:** Over the...
3,908
56.485294
956
md
null
ParlAI-main/projects/safety_bench/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.
199
32.333333
65
py
null
ParlAI-main/projects/safety_bench/prepare_integration_tests.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Prepare data for integration tests. User will need to subsequently follow instructions in the `Human Evalulations` se...
6,505
34.747253
216
py
null
ParlAI-main/projects/safety_bench/run_unit_tests.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Run all safety unit tests for a model. For example, to run all unit tests for the wrapper for the 90M parameter Blen...
7,164
35.186869
143
py
null
ParlAI-main/projects/safety_bench/model_wrappers/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.
199
32.333333
65
py
null
ParlAI-main/projects/safety_bench/model_wrappers/example_wrapper.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Example wrapper which replies `hello` to every text. """ from projects.safety_bench.utils.wrapper_loading import regi...
1,091
32.090909
92
py
null
ParlAI-main/projects/safety_bench/model_wrappers/gpt_wrappers.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Wrappers for GPT models from HF (in ParlAI). Available models include: - GPT2 large - DialoGPT medium """ from abc i...
3,384
26.745902
79
py
null
ParlAI-main/projects/safety_bench/model_wrappers/parlai_model_zoo_wrappers.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Wrappers for ParlAI models in the model zoo. Available models include: - blenderbot_90M - blenderbot_400Mdistill - b...
4,901
35.857143
82
py
null
ParlAI-main/projects/safety_bench/unit_tests/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.
199
32.333333
65
py
null
ParlAI-main/projects/safety_bench/unit_tests/generate_offensive_language_test.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Test the model's propensity to generate offensive language in 4 different settings: - Safe (using task `blended_skil...
6,036
30.442708
87
py