Model reference · open weights

xLAM-8x-r

Available as managed deployment Licence fee LLMs Salesforce Text gen 1 variants 17k dl/mo

xLAM-8x-r is an open-weight language model from Salesforce. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.

Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.

What it is

MakerSalesforce
TypeLanguage models
TaskText gen
Parameters (lead)140.6B
Context64k tokens
Runs withtransformers
Released2024-08-28
Popularity17k downloads / month
LicenceCommercial licence needed

About

What xLAM-8x-r is

Welcome to the xLAM model family! Large Action Models (LAMs) are advanced large language models designed to enhance decision-making and translate user intentions into executable actions that interact with the world. LAMs autonomously plan and execute tasks to achieve specific goals, serving as the brains of AI agents. They have the potential to automate workflow processes across various domains, making them invaluable for a wide range of applications. The model release is exclusively for research purposes. A new and enhanced version of xLAM will soon be available exclusively to customers on our Platform.

Trained with ActionStudio: A Lightweight Framework for Data and Training of Action Models.

Table of Contents

Model Series

We provide a series of xLAMs in different sizes to cater to various applications, including those optimized for function-calling and general agent applications:

Model# Total ParamsContext LengthRelease DateCategoryDownload ModelDownload GGUF files
xLAM-7b-r7.24B32kSep. 5, 2024General, Function-calling🤗 Link--
xLAM-8x7b-r46.7B32kSep. 5, 2024General, Function-calling🤗 Link--
xLAM-8x22b-r141B64kSep. 5, 2024General, Function-calling🤗 Link--
xLAM-1b-fc-r1.35B16kJuly 17, 2024Function-calling🤗 Link🤗 Link
xLAM-7b-fc-r6.91B4kJuly 17, 2024Function-calling🤗 Link🤗 Link
xLAM-v0.1-r46.7B32kMar. 18, 2024General, Function-calling🤗 Link--

For our Function-calling series (more details are included at here), we also provide their quantized GGUF files for efficient deployment and execution. GGUF is a file format designed to efficiently store and load large language models, making GGUF ideal for running AI models on local devices with limited resources, enabling offline functionality and enhanced privacy.

For more details, check our GitHub and paper.

Check Latest Examples on Interaction with xLAM

Here is the latest examples and tokenizer on interacting with xLAM models.

Repository Overview

This repository is about the general tool use series. For more specialized function calling models, please take a look into our fc series here.

The instructions will guide you through the setup, usage, and integration of our model series with HuggingFace.

Framework Versions

  • Transformers 4.41.0
  • Pytorch 2.3.0+cu121
  • Datasets 2.19.1
  • Tokenizers 0.19.1

Usage

Basic Usage with Huggingface

To use the model from Huggingface, please first install the transformers library:

pip install transformers>=4.41.0

Please note that, our model works best with our provided prompt format. It allows us to extract JSON output that is similar to the function-calling mode of ChatGPT.

We use the following example to illustrate how to use our model for 1) single-turn use case, and 2) multi-turn use case

1. Single-turn use case

import json
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

torch.random.manual_seed(0)

model_name = "Salesforce/xLAM-7b-r"
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype="auto", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_name)

# Please use our provided instruction prompt for best performance
task_instruction = """
Based on the previous context and API request history, generate an API request or a response as an AI assistant.""".strip()

format_instruction = """
The output should be of the JSON format, which specifies a list of generated function calls. The example format is as follows, please make sure the parameter type is correct. If no function call is needed, please make
tool_calls an empty list "[]".
```
{"thought": "the thought process, or an empty string", "tool_calls": [{"name": "api_name1", "arguments": {"argument1": "value1", "argument2": "value2"}}]}
```
""".strip()

# Define the input query and available tools
query = "What's the weather like in New York in fahrenheit?"

get_weather_api = {
    "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, New York"
            },
            "unit": {
                "type": "string",
                "enum": ["celsius", "fahrenheit"],
                "description": "The unit of temperature to return"

From the published model card. Full card on the HuggingFace links in the sidebar.

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys xlam-8x-r for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (xlam-8x-r below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/chat/completions \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"xlam-8x-r","messages":[{"role":"user","content":"Hello"}]}'

Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms