A function calling model from the xLAM model family.

Tools 1B 7B

802 Pulls Updated 7 weeks ago

7 weeks ago

72e458458dc6 · 873MB

model
llama
·
1.35B
·
Q4_K_M
template
{{- if .System }}{{ .System }} {{ end }} {{- range $i, $_ := .Messages }} {{- if eq .Role "user" }}### Instruction: {{- if and $.Tools (le (len (slice $.Messages $i)) 2) }} [BEGIN OF TASK INSTRUCTION] You are an expert in composing functions. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose. If none of the functions can be used, point it out and refuse to answer. If the given question lacks the parameters required by the function, also point it out. [END OF TASK INSTRUCTION] [BEGIN OF AVAILABLE TOOLS] {{ $.Tools }} [END OF AVAILABLE TOOLS] [BEGIN OF FORMAT INSTRUCTION] The output MUST strictly adhere to the following JSON format, and NO other text MUST be included. 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 '[]'. ``` { "tool_calls": [ {"name": "func_name1", "arguments": {"argument1": "value1", "argument2": "value2"}}, ... (more tool calls as required) ] } ``` [END OF FORMAT INSTRUCTION] [BEGIN OF QUERY] {{ .Content }} [END OF QUERY] {{ else }} {{ .Content }} {{ end }} {{- else if .ToolCalls }}### Response: {"tool_calls": [{{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}{{ end }}]} <|EOT|> {{ else if eq .Role "assistant" }}### Response: {{ .Content }} <|EOT|> {{ end }} {{- end }}### Response:

Readme

xLAM
[Homepage] | [Paper] | [Dataset] | [Github]


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.

License

xLAM-1b-fc-r is distributed under the CC-BY-NC-4.0 license, with additional terms specified in the Deepseek license

Citation

If you find this repo helpful, please cite our paper:

@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 Kokane, Shirley and Tan, Juntao and Yao, Weiran and Liu, Zhiwei and Feng, Yihao and others},
  journal={arXiv preprint arXiv:2406.18518},
  year={2024}
}