/ Модель

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

Контекст
262 144 токена
Параметры
3,7 млрд
Размер весов
8,8 ГБ
Лицензия
Apache 2.0
Архитектура
qwen3 · dense
Базовая модель
Qwen3-4B-Instruct-2507
Библиотека
transformers
Опубликована
22 окт 2025

FunReason-MT

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

Дообученная на базе Qwen3-4B-Instruct-2507 языковая модель для многошагового вызова функций и использования инструментов в агентных сценариях.

59скачиваний за 30 дней8лайковвеса обновлены18 ноя 2025

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

FunReason-MT-4B — языковая модель Bingguang для многошагового вызова функций и работы с инструментами в агентных сценариях. Она дообучена методом RL на базе Qwen3-4B-Instruct-2507 с использованием синтетического набора из 16 000 многоходовых примеров, созданных по методике FunReason-MT.

Модель предназначена для диалогов, в которых нужно выбрать инструменты, сформировать запросы к ним и последовательно выполнить действия. В README приведены результаты оценок на BFCLv3 и BFCLv4 OOD; они характеризуют тестирование, но не гарантируют качество в конкретном приложении. Архитектура — плотная Qwen3ForCausalLM, размер — около 3,7 млрд параметров, формат весов — safetensors, контекст — до 262 144 токенов. Основной указанный язык — английский.

Лицензия — Apache-2.0. Для корректной работы с инструментами приложению требуется соответствующий интерфейс вызова функций; результаты также зависят от описаний инструментов и используемой среды.

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

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

Ограничения

Качество оценивалось на бенчмарках BFCL, и приведённые результаты не гарантируют качество в иных средах или с произвольными инструментами. Для вызова функций приложению нужен совместимый интерфейс инструментов.

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

FunReason-MT Technical Report: Advanced Data Synthesis Solution for Real-world Multi-Turn Tool-use

arXiv Paper Model Dataset GitHub Project Page

Model Overview

The FunReason-MT-4B model is a high-performance Large Language Model (LLM) fine-tuned for complex, multi-turn Function Calling (FC) and agentic tool-use tasks. Built upon the Qwen3-4B-Instruct-2507 base model , it has been trained using the novel FunReason-MT data synthesis framework.

FunReason-MT-4B achieves ssuperior results on the Berkeley Function-Calling Leaderboard (BFCLv3) Multi-Turn and Agentic Evaluation benchmarks. This performance demonstrates that high-quality, synthesized data can effectively overcome the complexity barrier in multi-turn FC data generation.

  • Base Model: Qwen3-4B-Instruct-2507
  • Size: 4 Billion parameters
  • Key Capability: Advanced Multi-Turn Function Calling and Agentic Tool-Use

The full usage of the model is in our BFCL PR.

📊 Evaluation Results

The model was rigorously evaluated on the Berkeley Function-Calling Leaderboard (BFCL).

BFCLv3 Multi-Turn and Single-Turn Performance

Model (4B - 235B)Multi-Turn (Overall)Single-Turn (Overall)
Qwen3-4B-Instruct (Base)15.7578.19
Qwen3-4B + FunReason-MT (RL)57.7585.47
Claude-Sonnet-4-2025051454.7584.72
DeepSeek-R1-052844.5078.22
GPT-4o-2024-11-2042.5077.21

BFCL Agentic Evaluation (BFCLv4 OOD)

The FunReason-MT trained model leads in out-of-distribution agentic tasks (Web Search and Memory).

ModelBFCLv4 Overall Score
FunReason-MT-4B (RL)15.10
ToolACE-2-8B14.83
BitAgent-8B8.24
XLAM-2-3b-fc-r7.42
watt-tool-8B6.30

💻 Training Data and Framework

FunReason-MT Dataset

The training set comprises 16,000 high-quality multi-turn samples. This dataset was generated using the three-phase FunReason-MT data synthesis framework, which focuses on generating complex trajectories that require:

  1. Environment-API Graph Interactions for collecting goal-directed, correct execution traces.
  2. Advanced Tool-Query Synthesis for creating logical-jump queries that abstract multi-step actions.
  3. Guided Iterative Chain for enforcing reliable, consistent Chain-of-Thought (CoT) generation using self-correction.

Training Details

The model was fine-tuned with function calling data from APIGen and the FunReason-MT dataset.

  • Training Libraries: LLama-Factory and Verl.
  • Methodology: Supervised Fine-Tuning (SFT) followed by Reinforcement Learning (RL).
  • Hardware: Conducted on 32 NVIDIA H20 GPUs.

Usage

Here we provide a code snippet of the handler of FunReason-MT.


class FunReasonMTHandler(OSSHandler):
    def __init__(self, model_name, temperature) -> None:
        super().__init__(model_name, temperature)
        self.is_fc_model = False
        self.top_p = 0.7
        self.max_output_len = 20000
        self.max_context_length = 247000

    @override
    def _query_prompting(self, inference_data: dict):
        print("overide _query_prompting")
        # We use the OpenAI Completions API
        function: list[dict] = inference_data["function"]
        message: list[dict] = inference_data["message"]

        formatted_prompt: str = self._format_prompt(message, function)
        inference_data["inference_input_log"] = {"formatted_prompt": formatted_prompt}

        # Tokenize the formatted prompt to get token count
        input_token_count = len(self.tokenizer.tokenize(formatted_prompt))

        # Determine the number of tokens to request. Cap it at 4096 if the model has a larger limit.
        if self.max_context_length < input_token_count + 2:
            # If the prompt is already at the max length, just request 1000 token, we will get an error anyway
            leftover_tokens_count = 1000
        else:
            leftover_tokens_count = min(
                self.max_output_len,
                self.max_context_length - input_token_count - 2,
            )

        extra_body = {}
        if hasattr(self, "stop_token_ids"):
            extra_body["stop_token_ids"] = self.stop_token_ids
        if hasattr(self, "skip_special_tokens"):
            extra_body["skip_special_tokens"] = self.skip_special_tokens

        start_time = time.time()
        if len(extra_body) > 0:
            api_response = self.client.completions.create(
                model=self.model_path_or_id,
                temperature=self.temperature,
                top_p=self.top_p,
                prompt=formatted_prompt,
                max_tokens=leftover_tokens_count,
                extra_body=extra_body,
                timeout=72000,  # Avoid timeout errors
            )
        else:
            api_response = self.client.completions.create(
                model=self.model_path_or_id,
                temperature=self.temperature,
                top_p=self.top_p,
                prompt=formatted_prompt,
                max_tokens=leftover_tokens_count,
                timeout=72000,  # Avoid timeout errors
            )
        end_time = time.time()

        return api_response, end_time - start_time

    def _process_tool_response(self, tool_response_lst):
        processed_tool_response = []
        for tool_response in tool_response_lst:
            processed_tool_response.append(tool_response)
        return processed_tool_response

    @override
    def _format_prompt(self, messages, function):
        new_messages = []
        tool_content = []
        for idx, message in enumerate(messages):
            role = message["role"]
            content = message["content"]
            if role != "tool":
                if len(tool_content) != 0:
                    tool_message = {
                        "role": "tool",
                        "content": str(tool_content),
                    }
                    new_messages.append(tool_message)
                    tool_content = []
                new_messages.append(message)
            else:
                tool_content.append(content)
        if len(tool_content) != 0:
            tool_message = {
                "role": "tool",
                "content": str(tool_content),
            }
            new_messages.append(tool_message)
            tool_content = []
        print("new_messages", new_messages)
        formatted_prompt = self.tokenizer.apply_chat_template(
            new_messages, tokenize=False, add_generation_prompt=True
        )
        formatted_prompt += "<think>"
        print("formated_prompt", formatted_prompt)
        return formatted_prompt

    @override
    def _parse_query_response_prompting(self, api_response: Any) -> dict:
        reasoning_content = ""
        model_response = api_response.choices[0].text
        cleaned_response = ""
        reasoning_content = ""
        cleaned_response = model_response
        if "</think>" in model_response:
            parts = model_response.split("</think>")
            reasoning_content = parts[0].rstrip("
").split("<think>")[-1].lstrip("
")
            cleaned_response = parts[-1].lstrip("
")
        else:
            cleaned_response = "response outputs too long or no slash think in response."
        print("cleaned_response: ", cleaned_response)
        response_data = {
            "model_responses": cleaned_response,
            "model_responses_message_for_chat_history": {
                "role": "assistant",
                "content": cleaned_response,
            },
            "reasoning_content": reasoning_content,
            "input_token": api_response.usage.prompt_tokens,
            "output_token": api_response.usage.completion_tokens,
        }

        # Attach reasoning content to the assistant message for the next turn if present
        if reasoning_content:
            response_data["model_responses_message_for_chat_history"][
                "reasoning_content"
            ] = reasoning_content

        if not reasoning_content:
            del response_data["reasoning_content"]

        return response_data

🔗 Related Projects and Citation

This work is part of the open-source project AWorld, InclusionAI.

If you use FunReason-MT in your research, please cite the technical report:

@article{xu2025funreason,
  title={FunReason-MT Technical Report: Advanced Data Synthesis Solution for Real-world Multi-Turn Tool-use},
  author={Zengzhuang Xu, Bingguang Hao, Zechuan Wang, Yuntao Wen, Xinyi Xu, Yang Liu, Long Chen, Dong Wang, Maolin Wang, Tong Zhao, Yicheng Chen, Cunyin Peng, Jinjie Gu, Leilei Gan, Xiangyu Zhao, Chenyi Zhuang, Shi Gu},
  journal={arXiv preprint arXiv:2510.24645},
  year={2025}
}

Contact

For inquiries, please contact:

  • bingguanghao7@gmail.com

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
Qwen3ForCausalLM
Ревизия весов
785b1c8

0 моделей