/ Модель

Характеристики

Контекст
32 768 токенов
Параметры
494 млн
Лицензия
Apache 2.0
Архитектура
qwen2 · dense
Базовая модель
Qwen2.5-0.5B-Instruct
Библиотека
transformers
Опубликована
18 ноя 2026

qwen2.5-0.5b-toolcall-abstain-v6

Генерация текстаТекст → текст3 профессии
430скачиваний за 30 дней0лайковвеса обновлены18 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Компактная англоязычная модель на базе Qwen2.5-0.5B-Instruct для вызова инструментов, уточнения недостающих данных и отказа от неподходящих инструментов.

Это дообученная на базе Qwen2.5-0.5B-Instruct компактная языковая модель для выбора и вызова инструментов. Разработчик адаптировал её с помощью QLoRA и объединил адаптер с весами; модель содержит около 494 млн параметров, использует архитектуру Qwen2ForCausalLM и поддерживает контекст до 32 768 токенов. В репозитории есть веса fp16, 4-битная версия MLX для Apple Silicon и LoRA-адаптер.

Модель получает запрос пользователя и список схем инструментов в JSON. Она может вернуть один или несколько вызовов с аргументами, задать уточняющий вопрос при нехватке данных или сообщить, что подходящего инструмента нет. Предназначена для небольших локальных агентов, которым инструменты подбираются из более крупной библиотеки. Карточка сообщает об оценках на собственном тестовом контуре, а не официальном BFCL-проверяющем; результаты ограничены одним запуском и небольшими выборками. Модель рассчитана на английский язык, не проходила дополнительную настройку безопасности сверх базовой модели. Лицензия — Apache-2.0.

Сценарии применения

  • вызов API и функций по запросу пользователя
  • выбор подходящего инструмента из списка схем JSON
  • создание локального агента с ограниченным набором инструментов
  • уточнение запроса, когда для вызова инструмента не хватает данных
  • отказ от вызова, когда ни один доступный инструмент не подходит

Ограничения

Качество отказа от неподходящих инструментов и распознавания нехватки данных несовершенно; корректный формат вызова не гарантирует правильность аргументов. Оценки получены в небольших тестах, а при большом каталоге инструментов результат зависит от качества их поиска.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь рядом с другими моделями теста

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Qwen2.5-0.5B-Instruct, tool calling with abstention (v6)

Improved using Qwen. Fine-tuned from Qwen/Qwen2.5-0.5B-Instruct with QLoRA, then the adapter was merged into the weights.

Contents of this repo: merged fp16 model (root), 4-bit MLX version (mlx/, for Apple silicon with mlx-lm), and the LoRA adapter (adapter/). Code, evaluation and agent pipeline: https://github.com/siva-0104/toolcall-slm

Qwen2.5-Instruct (0.5B, 1.5B, 3B) fine-tuned with QLoRA for tool calling with abstention.

What it does

Given a user request and a list of tool schemas (JSON), the model either emits <tool_call>{"name": ..., "arguments": {...}}</tool_call> (one or several calls), asks for missing information, or says that no listed tool applies. Intended use: small local agents, with tools retrieved from a larger library (top 5 by embedding similarity) and calls validated against the schema before execution (see agent/).

Training data (all public, leak-gated)

xLAM function-calling 60k (CC-BY-4.0, gated; cite APIGen / xLAM), Glaive function-calling v2 (Apache-2.0; filler replies merged with the call that follows), Hermes function-calling v1 (Apache-2.0), ToolACE (Apache-2.0), plus synthetic mismatched-tool negatives. About 49% of call rows carry 1 to 4 look-alike distractor tools retrieved from the training tool library. 8,559 rows (8,366 after the 1,024-token limit); 24% are no-call rows. No When2Call and no BFCL rows. Splits are disjoint by tool name; leak_check.py passes (0 BFCL query matches, no test tool name in training). Disclosure: 13 of 9,314 BFCL function definitions are identical (name and description) to a training tool, an information-only overlap with different queries.

Training

QLoRA, 4-bit NF4, LoRA r=16 alpha=32, lr 2e-4 cosine, effective batch 16, 1 epoch, loss on the reply only, free Kaggle T4 (0.5B 44 min, 1.5B 100 min, 3B 169 min).

Results (own scorer, not the official BFCL checker; one seed; BFCL report-only)

0.5B1.5B3B
BFCL simple, exact match79.383.789.7
BFCL irrelevance, abstained75.884.287.1
BFCL live simple / live irrelevance44.6 / 71.756.6 / 77.066.3 / 77.0
xLAM / Hermes / ToolACE exact (leak-free tests)68.0 / 48.0 / 44.371.7 / 53.3 / 49.077.3 / 59.3 / 53.7
Mismatched tools, abstained99.799.7100
Agent over MCP, 49 queries, 10 tools: call success80.6%93.5%93.5%

Comparison with the base model

Set0.5B base -> v6
BFCL simple, exact4.0 -> 79.3
BFCL live simple, exact6.7 -> 44.6
BFCL irrelevance, abstained96.0 -> 75.8
BFCL live irrelevance, abstained98.0 -> 71.7
xLAM, exact5.3 -> 68.0
Hermes, exact6.0 -> 48.0
ToolACE, exact1.3 -> 44.3
Glaive, decision accuracy34.7 -> 95.0
Mismatched tools, abstained96.7 -> 99.7

Reading it: the untouched 0.5B model almost never calls a tool (4% of BFCL simple prompts), so its 96-98% "abstention" on the irrelevance sets is not a good result; it only means it does nothing. Fine-tuning takes calling from 4% to 79% exact on BFCL simple and from 5% to 68% on xLAM, and abstention stays at 72-76% while it now calls almost always.

Base = the untouched Qwen2.5-Instruct model with the same prompt and scorer. Base rows use the first 150 items per set (BFCL from results_v2, other sets from results_v4); v6 rows use up to 300, so base numbers are noisier (about ±8 points). A fresh same-size rerun was not possible (free GPU quota exhausted).

Limitations

  • Weak on missing information: the 1.5B model often calls with an invented value instead of asking (4 of 6 test queries; 3B: 3 of 6).
  • Abstention is imperfect (BFCL irrelevance 76 to 84%); a similarity gate adds a few points at a cost on valid calls.
  • With thousands of tools the retriever is a bottleneck: right tool in the top 5 for 70% of queries at 12,641 tools (94% at 100), and "no tool fits" handling falls from 93-100% at 10 tools to 15-19% when the top 5 come from the full library (laptop sample, n = 100 per condition). Putting 100 tools in the prompt is worse still (exact match 6% at 0.5B, 29% at 1.5B).
  • Schema-constrained decoding (lm-format-enforcer) gave 100% parsed and schema-valid calls and no invented tool names on xLAM, BFCL simple and live simple at 0.5B and 1.5B (100 items per set; plain decoding is 90% and 97% valid on live simple). It does not make arguments correct. The 3B model was not tested with it (memory).
  • Hand-written agent evaluation is small (49 queries); differences under about 10 points are noise.
  • English only; not safety-tuned beyond the base model; tool outputs should be treated as untrusted.

Quick start

from transformers import AutoModelForCausalLM, AutoTokenizer
m='siva-0104/qwen2.5-0.5b-toolcall-abstain-v6'
tok=AutoTokenizer.from_pretrained(m); model=AutoModelForCausalLM.from_pretrained(m, torch_dtype='auto')

Prompt with the Qwen chat template and your tool list in the system message; the model answers with <tool_call>{...}</tool_call>, a clarifying question, or a statement that no tool applies. See the GitHub repo for the exact prompt format (tc_eval_lib.py) and the validating agent loop.

Licence

Apache-2.0 (the base model Qwen/Qwen2.5-0.5B-Instruct is Apache-2.0). Training data licences as above (CC-BY-4.0 attribution for xLAM). Improved using Qwen.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen2ForCausalLM
Ревизия весов
08783a9

0 моделей