Baseten 的 Mammoth-1 和 Elephant-1 现已在 AI Gateway 上免费开放
Baseten 的 Mammoth-1 和 Elephant-1 已在 AI Gateway 上免费开放一周,免费使用截至 10 月 27 日。这两款决策模型(decision model)可以做文本分类、请求路由,以及按你设定的标准给内容打分。
Mammoth-1 是较大的 27B 模型,Elephant-1 则是较小的 9B 版本。在 Jev Decision Index 上 Mammoth-1 排第一,Elephant-1 在 Artificial Analysis Decision Index 上并列第一。
两者都支持 16k token 的上下文窗口,返回结果包含选项、概率和分数。你可以在一次请求里对同一段输入提多个问题:用 Choice 类型的问题挑选合适的客服团队,用 Boolean 类型判断用户是否在申请退款,用 Score 类型给紧急程度打分。至于达到多大把握就自动处理、多大把握转人工复核,由你的应用设定概率阈值。
调用时把模型名写成 baseten/mammoth-1 或 baseten/elephant-1:
import { experimental_decide as decide } from 'ai';
const result = await decide({
model: 'baseten/mammoth-1',
state: 'I was charged twice. Please refund the duplicate.',
questions: {
refund: {
type: 'boolean',
instructions: 'Is the customer asking for a refund?',
},
},
});
console.log(result.answers.refund);
各问题类型的具体用法和其他细节,见决策模型文档。
AI Gateway 提供统一的 API,用来调用模型并跟踪用量与成本。决策调用会出现在日志里,并和其他模型请求一样计入预算。