返回资讯中心
外部精选
大数据
#数据科学#机器学习

七个不足百亿参数的开源专用模型在单项任务上媲美大模型

来源标题:7 Small Specialist Models That Beat Giant LLMs at One Job

七个参数量均低于100亿的开源专用模型,分别在转写、OCR、路由、语音等单项任务上达到远超其规模的大模型水平。其中路由模型 katanemo/Arch-Router-1.5B 可通过 transformers 直接加载,并按模型卡指定的提示模板完成意图路由。这些模型面向单一任务,而非通用对话。

KDnuggetsShittu Olumide2026/11/4 · 2 天前9 分钟阅读

以下正文由 AI 翻译自 KDnuggets(原文版权归原站所有),可能存在偏差,重要内容请以原文为准。

pip install -U transformers accelerate torch import json from transformers import AutoModelForCausalLM, AutoTokenizer model_name = “katanemo/Arch-Router-1.5B” model = AutoModelForCausalLM.from_pretrained( model_name, device_map=“auto”, torch_dtype=“auto” ) tokenizer = AutoTokenizer.from_pretrained(model_name)

Prompt 模板来自模型卡片;模型在使用这段确切措辞时效果最佳

TASK_INSTRUCTION = “”“ You are a helpful assistant designed to find the best suited route. You are provided with route description within <routes></routes> XML tags: <routes> {routes} </routes> <conversation> {conversation} </conversation> FORMAT_PROMPT = ”“” Your task is to decide which route is best suit with user intent on the conversation in <conversation></conversation> XML tags. Follow the instruction:

  1. If the latest intent from user is irrelevant or user intent is full filled, response with other route {“route”: “other”}.
  2. You must analyze the route descriptions and find the best match route for user latest intent.
  3. You only response the name of the route that best matches the user's request, use the exact name in the <routes></routes>. Based on your analysis, provide your response in the following JSON formats if you decide to match any route: {“route”: “route_name”}

你的路由,用通俗英文编写

route_config = [ {“name”: “billing

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →