Based on
LFM2-1.2B
, LFM2-1.2B-Tool is designed for
concise and precise tool calling
. The key challenge was designing a non-thinking model that outperforms similarly sized thinking models for tool use.
Use cases
:
Mobile and edge devices requiring instant API calls, database queries, or system integrations without cloud dependency.
Real-time assistants in cars, IoT devices, or customer support, where response latency is critical.
Resource-constrained environments like embedded systems or battery-powered devices needing efficient tool execution.
You can find more information about other task-specific models in this
blog post
.
📄 Model details
Generation parameters
: We recommend using greedy decoding with a
temperature=0
.
System prompt
: The system prompt must provide all the available tools
Supported languages
: English, Arabic, Chinese, French, German, Japanese, Korean, Portuguese, and Spanish.
Tool use
: It consists of four main steps:
Function definition
: LFM2 takes JSON function definitions as input (JSON objects between
<|tool_list_start|>
and
<|tool_list_end|>
special tokens), usually in the system prompt
Function call
: LFM2 writes Pythonic function calls (a Python list between
<|tool_call_start|>
and
<|tool_call_end|>
special tokens), as the assistant answer.
Function execution
: The function call is executed and the result is returned (string between
<|tool_response_start|>
and
<|tool_response_end|>
special tokens), as a "tool" role.
Final answer
: LFM2 interprets the outcome of the function call to address the original user prompt in plain text.
Here is a simple example of a conversation using tool use:
<|startoftext|><|im_start|>system
List of tools: <|tool_list_start|>[{"name": "get_candidate_status", "description": "Retrieves the current status of a candidate in the recruitment process", "parameters": {"type": "object", "properties": {"candidate_id": {"type": "string", "description": "Unique identifier for the candidate"}}, "required": ["candidate_id"]}}]<|tool_list_end|><|im_end|>
<|im_start|>user
What is the current status of candidate ID 12345?<|im_end|>
<|im_start|>assistant
<|tool_call_start|>[get_candidate_status(candidate_id="12345")]<|tool_call_end|>Checking the current status of candidate ID 12345.<|im_end|>
<|im_start|>tool
<|tool_response_start|>{"candidate_id": "12345", "status": "Interview Scheduled", "position": "Clinical Research Associate", "date": "2023-11-20"}<|tool_response_end|><|im_end|>
<|im_start|>assistant
The candidate with ID 12345 is currently in the "Interview Scheduled" stage for the position of Clinical Research Associate, with an interview date set for 2023-11-20.<|im_end|>
⚠️ The model supports both single-turn and multi-turn conversations.
📈 Performance
For edge inference, latency is a crucial factor in delivering a seamless and satisfactory user experience. Consequently, while test-time-compute inherently provides more accuracy, it ultimately compromises the user experience due to increased waiting times for function calls.
Therefore, the goal was to develop a tool calling model that is competitive with thinking models, yet operates without any internal chain-of-thought process.
We evaluated each model on a proprietary benchmark that was specifically designed to prevent data contamination. The benchmark ensures that performance metrics reflect genuine tool-calling capabilities rather than memorized patterns from training data.
LFM2-1.2B-Tool huggingface.co is an AI model on huggingface.co that provides LFM2-1.2B-Tool's model effect (), which can be used instantly with this LiquidAI LFM2-1.2B-Tool model. huggingface.co supports a free trial of the LFM2-1.2B-Tool model, and also provides paid use of the LFM2-1.2B-Tool. Support call LFM2-1.2B-Tool model through api, including Node.js, Python, http.
LFM2-1.2B-Tool huggingface.co is an online trial and call api platform, which integrates LFM2-1.2B-Tool's modeling effects, including api services, and provides a free online trial of LFM2-1.2B-Tool, you can try LFM2-1.2B-Tool online for free by clicking the link below.
LiquidAI LFM2-1.2B-Tool online free url in huggingface.co:
LFM2-1.2B-Tool is an open source model from GitHub that offers a free installation service, and any user can find LFM2-1.2B-Tool on GitHub to install. At the same time, huggingface.co provides the effect of LFM2-1.2B-Tool install, users can directly use LFM2-1.2B-Tool installed effect in huggingface.co for debugging and trial. It also supports api for free installation.