TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Controlling GPT-3 with Logit Bias

44 点作者 ve55超过 4 年前

1 comment

sweezyjeezy超过 4 年前
Not sure if useful - but if you know the initial biases of outputs, you can recalibrate these yourselves, provided you have output probabilities for all tokens (or all non-negligible ones at least).<p>Say the model outputs n tokens, and the prior (bias) in the model for tokens is m = (m_1, m_2, .... m_n), and the new prior you want is n=(n_1, n_2, ..._)<p>Then if the model outputs prediction p = (p_1, ... , p_n) for all tokens, then the new output you are looking for is<p>bias_shift(p) = softmax(logit(p) + log(n) - log(m))<p>You can prove this using Bayes rule + a bit of algebra. Most ML people don&#x27;t seem to know this trick, but it&#x27;s super useful for domain adaptation &#x2F; class upsampling, where you know that the class balance in your training set is different to the one you want to predict on.
评论 #25905709 未加载
评论 #25904784 未加载