
If you're deploying LLMs in production, this breaks down concrete techniques for controlling toxic and biased generation—the safety layer that separates a demo from a shippable product.
“Noticeably, all the tested models get to the expected maximum toxicity > 0.5 after 100 generations. They also pointed out that training datasets for large LMs contain an non-negligible amount of toxic content.”
Lilian Weng
“Some prompts that do not contain any toxic language still can trigger very offensive completion.”
Lilian Weng
“recent work has found that systems are overestimating the prevalence of toxicity in text that contains a minority identity mention (e.g., “I’m a gay man”) or text by racial minorities (e.g., text in African American English). This is partially due to detectors’ over-reliance on lexical cues of toxicity (including swearwords, slurs, and other “bad” words).”
Gehman et al. 2020
“Bad word filtering is a pretty intuitive and effective way to avoid explicit profane words in the language model generation. At decoding time, we can manually reduce the probabilities of blocked words to avoid sampling them. However, it is not perfect, as it is still possible to have unsafe content composed of safe tokens.”
Lilian Weng
“Second, there is no clearly and widely agreed-upon categorization and definition of unsafe behavior in pretrained language models. Individual perceptions could vary a lot due to different social backgrounds.”
Lilian Weng
Checking sign-in…
Loading comments…