/ Модель

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

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

qwen2.5-0.5b-instruct-fc

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

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

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

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

SwapniL-pr1117/qwen2.5-0.5b-instruct-fc — дообученная автором карточки компактная модель Qwen2.5-0.5B-Instruct для выбора вызовов инструментов и формирования аргументов. Она принимает запрос пользователя и список доступных инструментов, а затем при заданном системном промпте генерирует JSON-массив вызовов. Модель не запускает инструменты самостоятельно и рассчитана на однократный выбор вызова, без обработки результатов инструмента и подготовки итогового ответа.

Модель построена на плотной архитектуре Qwen2 и содержит 494 млн параметров; контекст — до 32 768 токенов. Она дообучена методом QLoRA на данных Salesforce/xlam-function-calling-60k, адаптер объединён с базовой моделью. README сообщает о тестировании на 2 929 примерах xLAM и улучшении точного совпадения относительно базовой модели, но качество на совершенно новых схемах инструментов изучено слабо.

Модель ориентирована на английские запросы и API-подобные описания инструментов. Для корректного JSON автор рекомендует жадное декодирование; модель не умеет надёжно отказываться от неподходящего вызова и может выбирать ближайший инструмент или придумывать значения аргументов. Она не предназначена для обычного диалога: качество чат-ответов ограничено. Лицензия — Apache-2.0.

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

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

Ограничения

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

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

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

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

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

Источники: 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-fc

Qwen2.5-0.5B-Instruct fine-tuned with QLoRA (Unsloth) for function calling. Give it a list of tools and a request; it returns the tool call(s) to make as a JSON array. Small enough to run on a laptop CPU or a 6 GB GPU.

Code, evaluation and serving stack (vLLM + LangGraph gateway with guardrails + Langfuse): https://github.com/SwapnilGEU/Toolcaller-SLM

Results

Frozen test set of 2,929 xLAM questions, greedy decoding, scored by the same code for base and fine-tuned model.

MetricFine-tuned95% CI
exact_match78.0%76.5–79.4
function_match97.3%96.7–97.8
argument_f190.3%89.5–91.1
schema_valid99.4%99.0–99.6

Exact match: base 61.6% → fine-tuned 78.0% (592 questions fixed, 112 broken, McNemar p < 0.001).

Call patternnExact match
single1,38681.8%
parallel_same_tool53080.4%
multi_distinct_tools93671.3%
mixed7774.0%

Prompt format (important)

The model was trained on this exact format. It is not Qwen's native <tool_call> format, and it does not read OpenAI-style tools= parameters.

System:

You are a function-calling assistant.

Your task is to select the appropriate tool and provide the arguments required
to answer the user's request.

Return ONLY valid JSON.

The output must be a JSON array of tool calls in this format:

[
  {
    "name": "function_name",
    "arguments": {
      "argument_name": "value"
    }
  }
]

If none of the available tools can answer the request, return an empty array: []

Do not explain your answer.
Do not output markdown.
Do not invent tools.

User:

Available tools:

<tools as a JSON list: name, description, parameters>

User request:

<the request>

Return the required tool call(s) as JSON.

Assistant: [{"name": "get_weather", "arguments": {"city": "Pune"}}]

Usage

transformers

import json
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "SwapniL-pr1117/qwen2.5-0.5b-instruct-fc"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype="auto", device_map="auto")

SYSTEM_PROMPT = """<copy the system prompt above>"""
tools = [{"name": "get_weather", "description": "Current weather for a city.",
          "parameters": {"city": {"type": "str", "description": "City name"}}}]
user = (f"Available tools:\n\n{json.dumps(tools, indent=2)}\n\n"
        f"User request:\n\nWhat's the weather in Pune?\n\n"
        f"Return the required tool call(s) as JSON.")

messages = [{"role": "system", "content": SYSTEM_PROMPT}, {"role": "user", "content": user}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True,
                                 return_tensors="pt", return_dict=True).to(model.device)
out = model.generate(**inputs, max_new_tokens=256)          # greedy is the default
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

vLLM (OpenAI-compatible server)

vllm serve SwapniL-pr1117/qwen2.5-0.5b-instruct-fc --max-model-len 4096

Send the same two messages to /v1/chat/completions with temperature=0, then json.loads the reply.

Ollama (GGUF, Q8_0)

ollama run Avahan/qwen2.5_0.5b-instruct-fc-Chat

No system prompt is baked in: send the system prompt above yourself (plain ollama run gives the chat behaviour described below).

Decoding

Use greedy decoding. generation_config.json already sets do_sample=False; with OpenAI-compatible servers pass temperature=0. Sampling and repetition penalties hurt JSON accuracy.

How it behaves

  • With the system prompt above: always answers with a JSON array of tool calls. It's a tool-calling specialist, not a chatbot.
  • Without it (plain chat): answers in normal text. In our checks 0% of plain chat messages turned into tool calls. Chat quality is that of a 0.5B model, further degraded by fine-tuning (it gets basic facts wrong): don't use it as a chatbot.
  • It does not execute anything. It only writes the call; your code runs the tool. Validate the JSON against your tool schemas before running it, and ask the user before running tools with side effects.

Limitations

  • Doesn't abstain: when no tool fits, the right answer is [], but it returned [] in 0% of such cases. It picks the closest tool and may invent argument values. Guard against this (e.g. check arguments appear in the request).
  • Unseen tools: almost every tool in the test set also appears in training (only a handful are new), so the score measures new requests for familiar tools. Accuracy on completely new tool schemas may be lower.
  • Most errors are wrong argument values (19% of questions), e.g. formats or units, not wrong tools.
  • Single turn only: it picks the call; it doesn't read tool results or write a final natural-language answer.
  • English only; trained on xLAM's API-style tools.

Training

QLoRA (4-bit base) with Unsloth, r=16, alpha=32, all linear layers, 1 epoch on ~48.7k xLAM examples, effective batch 16, lr 0.0002, max length 1536, loss on the answer only. LoRA merged into the bf16 base model.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей