/ Модель

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

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

tooltuned-qwen2.5-1.5b

Генерация текстаТекст → текст3 профессии

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

839скачиваний за 30 дней0лайковвеса обновлены10 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

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

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

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

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

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

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

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

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

ToolTuned Qwen2.5-1.5B-Instruct — компактная языковая модель, разработанная автором репозитория ToolTuned и дообученная с помощью QLoRA на данных для вызова функций. Адаптер объединён с базовыми весами Qwen/Qwen2.5-1.5B-Instruct, поэтому модель загружается как обычная модель Transformers. Она принимает запрос пользователя и список доступных инструментов, затем формирует один или несколько вызовов в формате Qwen либо отвечает обычным текстом, если подходящего инструмента нет.

Модель предназначена для маршрутизации запросов к инструментам и генерации аргументов вызова. README приводит сравнительные результаты на пяти категориях Berkeley Function Calling Leaderboard: оценивались 1 240 вопросов с шаблоном чата Qwen; результаты не являются официальными результатами таблицы лидеров. Поддерживаются форматы описания инструментов, использованные в xLAM, и JSON Schema.

Модель содержит 1,5 млрд параметров, построена на плотной архитектуре Qwen2 и имеет контекст 32 768 токенов. В метаданных указан английский язык. В тестах модель чаще вызывала инструменты при нерелевантных запросах, допускала ошибки в аргументах и количестве вызовов, а также могла ошибаться в многошаговой арифметике; проверяйте вызовы перед исполнением. Веса распространяются по лицензии Apache 2.0; обучающие данные основаны на Salesforce/xlam-function-calling-60k с лицензией CC-BY-4.0.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

ToolTuned: Qwen2.5-1.5B-Instruct fine-tuned for function calling

This model is Qwen/Qwen2.5-1.5B-Instruct fine-tuned with QLoRA to call functions (tools) more accurately. Given a user request and a list of tools, it answers with one or more <tool_call> blocks in Qwen's own format. If none of the tools fit, it answers in plain text instead. The LoRA adapter has been merged into the base weights, so the model loads like any other transformers model.

Code, data pipeline and full results: github.com/arsheen2244/tooltuned.

Results

Measured on 5 categories of the Berkeley Function Calling Leaderboard (BFCL), 1,240 questions in total, with bfcl-eval 2026.3.23 and vLLM on a T4 GPU in fp16. BFCL has no built-in Qwen2.5 entry, so the model is registered with a custom handler that builds prompts with Qwen's chat template. These are not official leaderboard results.

CategoryQuestionsBase modelThis modelChange
simple_python40086.50%87.50%+1.0
multiple20084.00%87.00%+3.0
parallel20074.50%78.00%+3.5
parallel_multiple20072.50%75.50%+3.0
irrelevance24072.50%57.92%−14.6

The two models answered the same questions, so the comparison is paired. An exact McNemar test counts the questions only one of the two models got right, and asks how likely a split that uneven would be by chance:

  • Tool calling (the first 4 categories, 1,000 questions): this model got 61 questions right that the base model missed, and 38 the other way (p = 0.027).
  • Irrelevance (240 questions): 18 the other way round, against 53 (p < 0.001).

Both differences are real. Fine-tuning made the model better at calling tools and clearly worse at noticing when no tool fits.

Ablation. The same recipe trained on data that skipped the verification step scored higher on tool calling. It got 36 questions right that this model missed, against 16 the other way (p = 0.008). The two did not differ beyond chance on irrelevance (12 vs 5, p = 0.143). In this experiment, verifying the training data did not help. Each model was trained once, so training luck is not ruled out.

Training data

The training data was built from Salesforce/xlam-function-calling-60k in four steps:

  1. Verify. Each of the 60,000 rows was checked against its own tool definitions: the function exists, the parameters exist, required parameters are present, and the values match the declared types. 58,485 rows passed. 1,515 were rejected: 1,241 for a type mismatch and 274 for a missing required parameter.
  2. Add no-tool examples. 6,498 examples were generated by pairing a request with the tools of a different row. Those tools were chosen to be clearly unrelated, and the reply politely declines to call them.
  3. Remove overlap with BFCL. Training rows too similar to any of the 1,240 BFCL test questions were removed. The method compares normalized text, then character 8-grams, and removes a row if more than 50% of the shorter text's 8-grams match. This removed 6 exact and 4,030 near-duplicate tool-call rows, and 400 near-duplicate no-tool rows.
  4. Sample (seed 42). The training set has 10,000 rows: 9,000 tool-call and 1,000 no-tool. The validation set has 500 rows: 450 tool-call and 50 no-tool.

Rows longer than 1,072 tokens were dropped, not cut short, so no answer was cut off.

Training settings

SettingValue
MethodQLoRA: base weights in 4-bit NF4, LoRA adapter on all linear layers
LoRAr = 16, alpha = 32, dropout = 0.05
Optimisationlearning rate 2e-4, cosine schedule, 3% warmup, 2 epochs
Batch4 per step × 4 gradient-accumulation steps = 16
Precisionfp16, with gradient checkpointing (the T4 has no bf16 support)
Max sequence length1,072 tokens
Losson the assistant's answer only
Hardware1 × NVIDIA T4 (free Kaggle notebook)
Seed42

Training ran for 1,226 updates. Validation loss fell from 0.02396 at step 200 to 0.01906 at the end and stayed flat over the last 400 updates.

Usage

import json
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "asheeee24/tooltuned-qwen2.5-1.5b"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.float16, device_map="auto")

tools = [{
    "name": "get_weather",
    "description": "Get the current weather for a city.",
    "parameters": {"city": {"description": "City name.", "type": "str"}},
}]
messages = [{"role": "user", "content": "What's the weather like in Paris right now?"}]

prompt = tokenizer.apply_chat_template(messages, tools=tools, add_generation_prompt=True, tokenize=False)
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
output = model.generate(**inputs, max_new_tokens=128, do_sample=False)
answer = tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(answer)
# <tool_call>
# {"name": "get_weather", "arguments": {"city": "Paris"}}
# </tool_call>

calls = [json.loads(block.split("</tool_call>")[0]) for block in answer.split("<tool_call>")[1:]]

The model was trained with tools written as in xLAM, as above: each parameter has a description and a Python-style type. BFCL passes JSON-schema tools, and the scores above were measured that way, so both formats work.

Limitations

  • Calls tools too eagerly. On BFCL irrelevance the model is 14.6 points worse than the base model. If a tool is on the same topic as the request, it tends to call it even when the tool can't answer, for example a route planner for "where is the nearest pharmacy?". The training data's no-tool examples only used clearly unrelated tools, so it never learned to turn down near misses. Check its calls before running them.
  • Other common errors. In a labelled sample of 20 failures, after near-miss calls came wrong argument values (4 of 20) and the wrong number of calls (3 of 20). It also sometimes drops the namespace prefix of dotted function names, such as electromagnetism.biot_savart_law.
  • Narrow evaluation. It was evaluated on 5 single-turn BFCL categories only. Multi-turn, live and agentic categories, and other programming languages, were not tested.
  • Small model. At 1.5B parameters, it can get multi-step arithmetic wrong when one call's arguments depend on another call's result.
  • Single training run. Each result comes from one training run, so differences of a few points between training variants may partly be training luck.

License

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей