/ Модель

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

Контекст
131 072 токена
Параметры
69,5 млрд
Размер весов
141 ГБ
Лицензия
CC BY-NC 4.0
Архитектура
llama · dense
Библиотека
transformers
Опубликована
25 мар 2025

Llama-xLAM-2-70b-fc-r

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

Производная модели Salesforce/Llama-xLAM-2-8b-fc-r. Дообученная 8B-модель Salesforce для многоходового диалога и вызова функций в агентных системах.

132скачиваний за 30 дней51лайквеса обновлены6 мая 2025

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Карточка модели Salesforce/Llama-xLAM-2-70b-fc-r на Hugging Face совпадает с карточкой Salesforce/Llama-xLAM-2-8b-fc-r, поэтому описание составлено по ней.

Salesforce Llama-xLAM-2-8b-fc-r — языковая модель семейства xLAM-2, разработанная Salesforce на архитектуре Llama и дообученная для многоходового диалога и вызова функций. Она предназначена для агентных систем, которым нужно преобразовывать запросы пользователя в структурированные вызовы инструментов и последовательно выполнять задачи. Модель содержит 7,5 млрд параметров, принимает текст и выдаёт текст, включая инструкции и вызовы инструментов; заявленная длина контекста — 131 072 токена. Для работы доступны Transformers и vLLM.

Модель обучалась с использованием данных APIGen-MT и наборов Salesforce для вызова функций. Карточка семейства заявляет высокие результаты на BFCL и τ-bench, однако приведённые конкретные цифры относятся к модели на 70 млрд параметров и не подтверждают такие же результаты для версии 8B. Выпуск обозначен как исследовательский, а модель ориентирована прежде всего на англоязычное взаимодействие. Лицензия CC BY-NC 4.0 ограничивает коммерческое использование.

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

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

Ограничения

Выпуск предназначен для исследований; авторы рекомендуют оценивать точность, безопасность и справедливость перед развёртыванием. Лицензия CC BY-NC 4.0 не разрешает коммерческое использование без дополнительных прав.

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

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

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

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

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

Открыть на Hugging Face

Welcome to the xLAM-2 Model Family!

Large Action Models (LAMs) are advanced language models designed to enhance decision-making by translating user intentions into executable actions. As the brains of AI agents, LAMs autonomously plan and execute tasks to achieve specific goals, making them invaluable for automating workflows across diverse domains.
This model release is for research purposes only.

The new xLAM-2 series, built on our most advanced data synthesis, processing, and training pipelines, marks a significant leap in multi-turn conversation and tool usage. Trained using our novel APIGen-MT framework, which generates high-quality training data through simulated agent-human interactions. Our models achieve state-of-the-art performance on BFCL and τ-bench benchmarks, outperforming frontier models like GPT-4o and Claude 3.5. Notably, even our smaller models demonstrate superior capabilities in multi-turn scenarios while maintaining exceptional consistency across trials.

We've also refined the chat template and vLLM integration, making it easier to build advanced AI agents. Compared to previous xLAM models, xLAM-2 offers superior performance and seamless deployment across applications.

Table of Contents


Model Series

xLAM series are significant better at many things including general tasks and function calling. For the same number of parameters, the model have been fine-tuned across a wide range of agent tasks and scenarios, all while preserving the capabilities of the original model.

Model# Total ParamsContext LengthCategoryDownload ModelDownload GGUF files
Llama-xLAM-2-70b-fc-r70B128kMulti-turn Conversation, Function-calling🤗 LinkNA
Llama-xLAM-2-8b-fc-r8B128kMulti-turn Conversation, Function-calling🤗 Link🤗 Link
xLAM-2-32b-fc-r32B32k (max 128k)*Multi-turn Conversation, Function-calling🤗 LinkNA
xLAM-2-3b-fc-r3B32k (max 128k)*Multi-turn Conversation, Function-calling🤗 Link🤗 Link
xLAM-2-1b-fc-r1B32k (max 128k)*Multi-turn Conversation, Function-calling🤗 Link🤗 Link

*Note: The default context length for Qwen-2.5-based models is 32k, but you can use techniques like YaRN (Yet Another Recursive Network) to achieve maximum 128k context length. Please refer to here for more details.

You can also explore our previous xLAM series here.

The -fc suffix indicates that the models are fine-tuned for function calling tasks, while the -r suffix signifies a research release.

✅ All models are fully compatible with vLLM and Transformers-based inference frameworks.

Usage

Framework versions

  • Transformers 4.46.1 (or later)
  • PyTorch 2.5.1+cu124 (or later)
  • Datasets 3.1.0 (or later)
  • Tokenizers 0.20.3 (or later)

Basic Usage with Huggingface Chat Template

The new xLAM models are designed to work seamlessly with the Hugging Face Transformers library and utilize natural chat templates for an easy and intuitive conversational experience. Below are examples of how to use these models.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("Salesforce/Llama-xLAM-2-3b-fc-r")
model = AutoModelForCausalLM.from_pretrained("Salesforce/Llama-xLAM-2-3b-fc-r", torch_dtype=torch.bfloat16, device_map="auto")

# Example conversation with a tool call
messages = [
    {"role": "user", "content": "Hi, how are you?"},
    {"role": "assistant", "content": "Thanks. I am doing well. How can I help you?"},
    {"role": "user", "content": "What's the weather like in London?"},
]

tools = [
    {
        "name": "get_weather",
        "description": "Get the current weather for a location",
        "parameters": {
            "type": "object",
            "properties": {
                "location": {"type": "string", "description": "The city and state, e.g. San Francisco, CA"},
                "unit": {"type": "string", "enum": ["celsius", "fahrenheit"], "description": "The unit of temperature to return"}
            },
            "required": ["location"]
        }
    }
]

print("====== prompt after applying chat template ======")
print(tokenizer.apply_chat_template(messages, tools=tools, add_generation_prompt=True, tokenize=False))

inputs = tokenizer.apply_chat_template(messages, tools=tools, add_generation_prompt=True, return_dict=True, return_tensors="pt")
input_ids_len = inputs["input_ids"].shape[-1] # Get the length of the input tokens
inputs = {k: v.to(model.device) for k, v in inputs.items()}
print("====== model response ======")
outputs = model.generate(**inputs, max_new_tokens=256)
generated_tokens = outputs[:, input_ids_len:] # Slice the output to get only the newly generated tokens
print(tokenizer.decode(generated_tokens[0], skip_special_tokens=True))

Using vLLM for Inference

The xLAM models can also be efficiently served using vLLM for high-throughput inference. Please use vllm>=0.6.5 since earlier versions will cause degraded performance for Qwen-based models.

Setup and Serving

  1. Install vLLM with the required version:
pip install "vllm>=0.6.5"
  1. Download the tool parser plugin to your local path:
wget https://huggingface.co/Salesforce/xLAM-2-1b-fc-r/raw/main/xlam_tool_call_parser.py
  1. Start the OpenAI API-compatible endpoint:
vllm serve Salesforce/xLAM-2-1b-fc-r \
  --enable-auto-tool-choice \
  --tool-parser-plugin ./xlam_tool_call_parser.py \
  --tool-call-parser xlam \
  --tensor-parallel-size 1

Note: Ensure that the tool parser plugin file is downloaded and that the path specified in --tool-parser-plugin correctly points to your local copy of the file. The xLAM series models all utilize the same tool call parser, so you only need to download it once for all models.

Testing with OpenAI API

Here's a minimal example to test tool usage with the served endpoint:

import openai
import json

# Configure the client to use your local vLLM endpoint
client = openai.OpenAI(
    base_url="http://localhost:8000/v1",  # Default vLLM server URL
    api_key="empty"  # Can be any string
)

# Define a tool/function
tools = [
    {
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Get the current weather for a location",
            "parameters": {
                "type": "object",
                "properties": {
                    "location": {
                        "type": "string",
                        "description": "The city and state, e.g. San Francisco, CA"
                    },
                    "unit": {
                        "type": "string",
                        "enum": ["celsius", "fahrenheit"],
                        "description": "The unit of temperature to return"
                    }
                },
                "required": ["location"]
            }
        }
    }
]

# Create a chat completion
response = client.chat.completions.create(
    model="Salesforce/xLAM-2-1b-fc-r",  # Model name doesn't matter, vLLM uses the served model
    messages=[
        {"role": "system", "content": "You are a helpful assistant that can use tools."},
        {"role": "user", "content": "What's the weather like in San Francisco?"}
    ],
    tools=tools,
    tool_choice="auto"
)

# Print the response
print("Assistant's response:")
print(json.dumps(response.model_dump(), indent=2))

For more advanced configurations and deployment options, please refer to the vLLM documentation.

Benchmark Results

Berkeley Function-Calling Leaderboard (BFCL v3)

τ-bench Benchmark

Ethical Considerations

This release is for research purposes only in support of an academic paper. Our models, datasets, and code are not specifically designed or evaluated for all downstream purposes. We strongly recommend users evaluate and address potential concerns related to accuracy, safety, and fairness before deploying this model. We encourage users to consider the common limitations of AI, comply with applicable laws, and leverage best practices when selecting use cases, particularly for high-risk scenarios where errors or misuse could significantly impact people's lives, rights, or safety. For further guidance on use cases, refer to our AUP and AI AUP.

Model Licenses

For all Llama relevant models, please also follow corresponding Llama license and terms. Meta Llama 3 is licensed under the Meta Llama 3 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.

Citation

If you use our model or dataset in your work, please cite our paper:

@article{prabhakar2025apigen,
  title={APIGen-MT: Agentic PIpeline for Multi-Turn Data Generation via Simulated Agent-Human Interplay},
  author={Prabhakar, Akshara and Liu, Zuxin and Zhu, Ming and Zhang, Jianguo and Awalgaonkar, Tulika and Wang, Shiyu and Liu, Zhiwei and Chen, Haolin and Hoang, Thai and others},
  journal={arXiv preprint arXiv:2504.03601},
  year={2025}
}

Additionally, please check our other awesome related works regarding xLAM series and consider citing them as well:

@article{zhang2025actionstudio,
  title={ActionStudio: A Lightweight Framework for Data and Training of Action Models},
  author={Zhang, Jianguo and Hoang, Thai and Zhu, Ming and Liu, Zuxin and Wang, Shiyu and Awalgaonkar, Tulika and Prabhakar, Akshara and Chen, Haolin and Yao, Weiran and Liu, Zhiwei and others},
  journal={arXiv preprint arXiv:2503.22673},
  year={2025}
}
@article{zhang2024xlam,
  title={xLAM: A Family of Large Action Models to Empower AI Agent Systems},
  author={Zhang, Jianguo and Lan, Tian and Zhu, Ming and Liu, Zuxin and Hoang, Thai and Kokane, Shirley and Yao, Weiran and Tan, Juntao and Prabhakar, Akshara and Chen, Haolin and others},
  journal={arXiv preprint arXiv:2409.03215},
  year={2024}
}

@article{liu2024apigen,
  title={Apigen: Automated pipeline for generating verifiable and diverse function-calling datasets},
  author={Liu, Zuxin and Hoang, Thai and Zhang, Jianguo and Zhu, Ming and Lan, Tian and Tan, Juntao and Yao, Weiran and Liu, Zhiwei and Feng, Yihao and RN, Rithesh and others},
  journal={Advances in Neural Information Processing Systems},
  volume={37},
  pages={54463--54482},
  year={2024}
}
@article{zhang2024agentohana,
  title={AgentOhana: Design Unified Data and Training Pipeline for Effective Agent Learning},
  author={Zhang, Jianguo and Lan, Tian and Murthy, Rithesh and Liu, Zhiwei and Yao, Weiran and Tan, Juntao and Hoang, Thai and Yang, Liangwei and Feng, Yihao and Liu, Zuxin and others},
  journal={arXiv preprint arXiv:2402.15506},
  year={2024}
}

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

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

GPU в ailist

vLLM

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

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
783caf5

0 моделей