Spaces:
Running
Running
nicholasKluge
commited on
Commit
•
c1ee7c5
1
Parent(s):
b5249c1
Update app.py
Browse files
app.py
CHANGED
@@ -63,14 +63,23 @@ toxiciyTokenizer = AutoTokenizer.from_pretrained(toxicitymodel_id)
|
|
63 |
|
64 |
intro = """
|
65 |
## What is `Aira`?
|
|
|
66 |
[`Aira`](https://huggingface.co/nicholasKluge/Aira-Instruct-124M) is a `chatbot` designed to simulate the way a human (expert) would behave during a round of questions and answers (Q&A). `Aira` has many iterations, from a closed-domain chatbot based on pre-defined rules to an open-domain chatbot achieved via instruction-tuning.
|
|
|
67 |
## Limitations
|
|
|
68 |
We developed our open-domain conversational chatbots via conditional text generation/instruction-tuning. This approach has a lot of limitations. Even though we can make a chatbot that can answer questions about anything, forcing the model to produce good-quality responses is hard. And by good, we mean **factual** and **nontoxic** text. This leads us to two of the most common problems with generative models used in conversational applications:
|
|
|
69 |
🤥 Generative models can perpetuate the generation of pseudo-informative content, that is, false information that may appear truthful.
|
|
|
70 |
🤬 In certain types of tasks, generative models can produce harmful and discriminatory content inspired by historical stereotypes.
|
|
|
71 |
## Intended Use
|
|
|
72 |
`Aira` is intended only for academic research. For more information, read our [model card](https://huggingface.co/nicholasKluge/Aira-2-124M) to see how we developed `Aira`.
|
|
|
73 |
## How this demo works?
|
|
|
74 |
For this demo, we use the lighter model we have trained (`Aira-2-124M`). This demo employs a [`reward model`](https://huggingface.co/nicholasKluge/RewardModel) and a [`toxicity model`](https://huggingface.co/nicholasKluge/ToxicityModel) to evaluate the score of each candidate's response, considering its alignment with the user's message and its level of toxicity. The generation function arranges the candidate responses in order of their reward scores and eliminates any responses deemed toxic or harmful. Subsequently, the generation function returns the candidate response with the highest score that surpasses the safety threshold, or a default message if no safe candidates are identified.
|
75 |
"""
|
76 |
|
@@ -84,6 +93,7 @@ Users can use this to explore how the model interpolates on the fine-tuning data
|
|
84 |
|
85 |
disclaimer = """
|
86 |
**Disclaimer:** You should use this demo for research purposes only. Moderators do not censor the model output, and the authors do not endorse the opinions generated by this model.
|
|
|
87 |
If you would like to complain about any message produced by `Aira`, please contact [nicholas@airespucrs.org](mailto:nicholas@airespucrs.org).
|
88 |
"""
|
89 |
|
|
|
63 |
|
64 |
intro = """
|
65 |
## What is `Aira`?
|
66 |
+
|
67 |
[`Aira`](https://huggingface.co/nicholasKluge/Aira-Instruct-124M) is a `chatbot` designed to simulate the way a human (expert) would behave during a round of questions and answers (Q&A). `Aira` has many iterations, from a closed-domain chatbot based on pre-defined rules to an open-domain chatbot achieved via instruction-tuning.
|
68 |
+
|
69 |
## Limitations
|
70 |
+
|
71 |
We developed our open-domain conversational chatbots via conditional text generation/instruction-tuning. This approach has a lot of limitations. Even though we can make a chatbot that can answer questions about anything, forcing the model to produce good-quality responses is hard. And by good, we mean **factual** and **nontoxic** text. This leads us to two of the most common problems with generative models used in conversational applications:
|
72 |
+
|
73 |
🤥 Generative models can perpetuate the generation of pseudo-informative content, that is, false information that may appear truthful.
|
74 |
+
|
75 |
🤬 In certain types of tasks, generative models can produce harmful and discriminatory content inspired by historical stereotypes.
|
76 |
+
|
77 |
## Intended Use
|
78 |
+
|
79 |
`Aira` is intended only for academic research. For more information, read our [model card](https://huggingface.co/nicholasKluge/Aira-2-124M) to see how we developed `Aira`.
|
80 |
+
|
81 |
## How this demo works?
|
82 |
+
|
83 |
For this demo, we use the lighter model we have trained (`Aira-2-124M`). This demo employs a [`reward model`](https://huggingface.co/nicholasKluge/RewardModel) and a [`toxicity model`](https://huggingface.co/nicholasKluge/ToxicityModel) to evaluate the score of each candidate's response, considering its alignment with the user's message and its level of toxicity. The generation function arranges the candidate responses in order of their reward scores and eliminates any responses deemed toxic or harmful. Subsequently, the generation function returns the candidate response with the highest score that surpasses the safety threshold, or a default message if no safe candidates are identified.
|
84 |
"""
|
85 |
|
|
|
93 |
|
94 |
disclaimer = """
|
95 |
**Disclaimer:** You should use this demo for research purposes only. Moderators do not censor the model output, and the authors do not endorse the opinions generated by this model.
|
96 |
+
|
97 |
If you would like to complain about any message produced by `Aira`, please contact [nicholas@airespucrs.org](mailto:nicholas@airespucrs.org).
|
98 |
"""
|
99 |
|