Instructions to use LiquidAI/LFM2-1.2B-Tool-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LiquidAI/LFM2-1.2B-Tool-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LiquidAI/LFM2-1.2B-Tool-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("LiquidAI/LFM2-1.2B-Tool-GGUF", dtype="auto") - llama-cpp-python
How to use LiquidAI/LFM2-1.2B-Tool-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="LiquidAI/LFM2-1.2B-Tool-GGUF", filename="LFM2-1.2B-Tool-F16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use LiquidAI/LFM2-1.2B-Tool-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M
Use Docker
docker model run hf.co/LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use LiquidAI/LFM2-1.2B-Tool-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LiquidAI/LFM2-1.2B-Tool-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LiquidAI/LFM2-1.2B-Tool-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M
- SGLang
How to use LiquidAI/LFM2-1.2B-Tool-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "LiquidAI/LFM2-1.2B-Tool-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LiquidAI/LFM2-1.2B-Tool-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "LiquidAI/LFM2-1.2B-Tool-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LiquidAI/LFM2-1.2B-Tool-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use LiquidAI/LFM2-1.2B-Tool-GGUF with Ollama:
ollama run hf.co/LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M
- Unsloth Studio
How to use LiquidAI/LFM2-1.2B-Tool-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LiquidAI/LFM2-1.2B-Tool-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LiquidAI/LFM2-1.2B-Tool-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for LiquidAI/LFM2-1.2B-Tool-GGUF to start chatting
- Pi
How to use LiquidAI/LFM2-1.2B-Tool-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use LiquidAI/LFM2-1.2B-Tool-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use LiquidAI/LFM2-1.2B-Tool-GGUF with Docker Model Runner:
docker model run hf.co/LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M
- Lemonade
How to use LiquidAI/LFM2-1.2B-Tool-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.LFM2-1.2B-Tool-GGUF-Q4_K_M
List all available models
lemonade list
LFM2-1.2B-Tool-Q4_K_M-cuda
============================================================
TOOL CALLING LIMITS - THREE-AXIS TESTING
Server: http://localhost:8080/v1
Model: LFM2-1.2B-Tool-Q4_K_M-cuda
============================================================
AXIS 1: Single Tool - Parameter Scaling
--- Testing 1 parameters ---
Query: Call the test tool with these values: value1...
Calls: ['test_tool(param_1="value1")']
Final: <|tool_call_start|>[test_tool(param_1="value1")]<|tool_call_...
Result: β - Included 1/1 params
--- Testing 2 parameters ---
Query: Call the test tool with these values: value1, value2...
Calls: ['test_tool(param_1="value1", param_2="value2")']
Final: <|tool_call_start|>[test_tool(param_1="mocked_result", param...
Result: β - Included 2/2 params
--- Testing 5 parameters ---
Query: Call the test tool with these values: value1, value2, value3...
Calls: ['test_tool(param_1="value1", param_2="value2", param_3="value3", param_4="value4", param_5="value5")']
Final: <|tool_call_start|>[test_tool(param_1="value1", param_2="val...
Result: β - Included 5/5 params
--- Testing 10 parameters ---
Query: Call the test tool with these values: value1, value2, value3...
Calls: ['test_tool(param_1="value1", param_2="value2", param_3="value3", param_4="value4", param_5="value5", param_6="value6", param_7="value7", param_8="value8", param_9="value9", param_10="value10")']
Final: The provided function test_tool successfully executed with...
Result: β - Included 10/10 params
--- Testing 15 parameters ---
Query: Call the test tool with these values: value1, value2, value3...
Calls: ['test_tool(param_1="value1", param_2="value2", param_3="value3", param_4="value4", param_5="value5", param_6="value6", param_7="value7", param_8="value8", param_9="value9", param_10="value10", param_11="value11", param_12="value12", param_13="value13", param_14="value14", param_15="value15")']
Final: The tool test was successful with the provided parameters. H...
Result: β - Included 15/15 params
--- Testing 20 parameters ---
Query: Call the test tool with these values: value1, value2, value3...
Calls: ['test_tool(param_1="value1", param_2="value2", param_3="value3", param_4="value4", param_5="value5", param_6="value6", param_7="value7", param_8="value8", param_9="value9", param_10="value10", param_11="value11", param_12="value12", param_13="value13", param_14="value14", param_15="value15", param_16="value16", param_17="value17", param_18="value18", param_19="value19", param_20="value20")']
Final: The tool has been tested with the specified parameters. Here...
Result: β - Included 20/20 params
--- Testing 25 parameters ---
Query: Call the test tool with these values: value1, value2, value3...
Calls: ['test_tool(param_1="value1", param_2="value2", param_3="value3", param_4="value4", param_5="value5", param_6="value6", param_7="value7", param_8="value8", param_9="value9", param_10="value10", param_11="value11", param_12="value12", param_13="value13", param_14="value14", param_15="value15", param_16="value16", param_17="value17", param_18="value18", param_19="value19", param_20="value20", param_21="value21", param_22="value22", param_23="value23", param_24="value24", param_25="value25")']
Final: The tool has been tested successfully with the provided para...
Result: β - Included 25/25 params
--- Testing 30 parameters ---
Query: Call the test tool with these values: value1, value2, value3...
Calls: ['test_tool(param_1="value1", param_2="value2", param_3="value3", param_4="value4", param_5="value5", param_6="value6", param_7="value7", param_8="value8", param_9="value9", param_10="value10", param_11="value11", param_12="value12", param_13="value13", param_14="value14", param_15="value15", param_16="value16", param_17="value17", param_18="value18", param_19="value19", param_20="value20", param_21="value21", param_22="value22", param_23="value23", param_24="value24", param_25="value25", param_26="value26", param_27="value27", param_28="value28", param_29="value29", param_30="value30")']
Final: It seems like you're trying to test a tool with a set of par...
Result: β - Included 30/30 params
AXIS 1 SUMMARY:
1 params: β (1/1 included)
2 params: β (2/2 included)
5 params: β (5/5 included)
10 params: β (10/10 included)
15 params: β (15/15 included)
20 params: β (20/20 included)
25 params: β (25/25 included)
30 params: β (30/30 included)
Limit: 30 parameters
============================================================
AXIS 2: Multiple Tools - Simple Parameters
--- Testing 1 tools ---
Query: Use tool_1 with input 'test'...
Calls: ['tool_1(input="test")']
Final: The tool_1 function has been called with the input 'test'. T...
Result: β
--- Testing 5 tools ---
Query: Use tool_1 with input 'test'...
Calls: ['tool_1(input="test")']
Final: <|tool_call_start|>[tool_1(input="test")]<|tool_call_end|>...
Result: β
--- Testing 10 tools ---
Query: Use tool_1 with input 'test'...
Calls: ['tool_1(input="test")']
Final: <|tool_call_start|>[tool_1(input="test")]<|tool_call_end|>...
Result: β
--- Testing 20 tools ---
Query: Use tool_1 with input 'test'...
Calls: ['tool_1(input="test")']
Final: <|tool_call_start|>[tool_1(input="test")]<|tool_call_end|>...
Result: β
--- Testing 30 tools ---
Query: Use tool_1 with input 'test'...
Calls: ['tool_1(input="test")']
Final: <|tool_call_start|>[tool_1(input="test")]<|tool_call_end|>...
Result: β
--- Testing 50 tools ---
Query: Use tool_1 with input 'test'...
Calls: ['tool_1(input="test")']
Final: <|tool_call_start|>[tool_1(input="test")]<|tool_call_end|>...
Result: β
--- Testing 75 tools ---
Query: Use tool_1 with input 'test'...
Calls: ['tool_1(input="test")']
Final: <|tool_call_start|>[tool_1(input="test")]<|tool_call_end|>...
Result: β
--- Testing 100 tools ---
Query: Use tool_1 with input 'test'...
Calls: ['tool_1(input="test")']
Final: <|tool_call_start|>[tool_2(input="mocked_result")]<|tool_cal...
Result: β
AXIS 2 SUMMARY:
1 tools: β
5 tools: β
10 tools: β
20 tools: β
30 tools: β
50 tools: β
75 tools: β
100 tools: β
Limit: 100 tools
============================================================
AXIS 3: Sequential Calls - Simple Tools
--- Testing 1 sequential calls ---
Query: Call these tools in order: tool_1...
Calls: ['tool_1()']
Final: <|tool_call_start|>[tool_1(input="mocked_result")]<|tool_cal...
Result: β - Got 1/1 calls, 1 correct
--- Testing 2 sequential calls ---
Query: Call these tools in order: tool_1, tool_2...
Calls: ['tool_1(input="tool_1")', 'tool_2(input="tool_2")']
Final: <|tool_call_start|>[tool_3(input="mocked_result")]<|tool_cal...
Result: β - Got 2/2 calls, 2 correct
--- Testing 3 sequential calls ---
Query: Call these tools in order: tool_1, tool_2, tool_3...
Calls: ['tool_1()', 'tool_2()', 'tool_3()']
Final: <|tool_call_start|>[tool_1(input="mocked_result")]<|tool_cal...
Result: β - Got 3/3 calls, 3 correct
--- Testing 5 sequential calls ---
Query: Call these tools in order: tool_1, tool_2, tool_3, tool_4, t...
Calls: ['tool_1(input="tool_1")', 'tool_2(input="tool_2")', 'tool_3(input="tool_3")', 'tool_4(input="tool_4")', 'tool_5(input="tool_5")']
Final: <|tool_call_start|>[tool_1(input="mocked_result")]<|tool_cal...
Result: β - Got 5/5 calls, 5 correct
--- Testing 7 sequential calls ---
Query: Call these tools in order: tool_1, tool_2, tool_3, tool_4, t...
Calls: ['tool_1(input="tool_1")', 'tool_2(input="tool_2")', 'tool_3(input="tool_3")', 'tool_4(input="tool_4")', 'tool_5(input="tool_5")', 'tool_6(input="tool_6")', 'tool_7(input="tool_7")']
Final: {
"tool_response": {
"content": "{"status": "succes...
Result: β - Got 7/7 calls, 7 correct
--- Testing 10 sequential calls ---
Query: Call these tools in order: tool_1, tool_2, tool_3, tool_4, t...
Calls: ['tool_1()', 'tool_2()', 'tool_3()', 'tool_4()', 'tool_5()', 'tool_6()', 'tool_7()', 'tool_8()', 'tool_9()', 'tool_10()']
Final: {
"tool_response": {
"content": "{"status": "succes...
Result: β - Got 10/10 calls, 10 correct
--- Testing 15 sequential calls ---
Query: Call these tools in order: tool_1, tool_2, tool_3, tool_4, t...
Calls: ['tool_1()', 'tool_2()', 'tool_3()', 'tool_4()', 'tool_5()', 'tool_6()', 'tool_7()', 'tool_8()', 'tool_9()', 'tool_10()', 'tool_11()', 'tool_12()', 'tool_13()', 'tool_14()', 'tool_15()']
Final: {
"tool_response": {
"content": "{"status": "succes...
Result: β - Got 15/15 calls, 15 correct
--- Testing 20 sequential calls ---
Query: Call these tools in order: tool_1, tool_2, tool_3, tool_4, t...
Calls: ['tool_1()', 'tool_2()', 'tool_3()', 'tool_4()', 'tool_5()', 'tool_6()', 'tool_7()', 'tool_8()', 'tool_9()', 'tool_10()', 'tool_11()', 'tool_12()', 'tool_13()', 'tool_14()', 'tool_15()', 'tool_16()', 'tool_17()', 'tool_18()', 'tool_19()', 'tool_20()']
Final: {
"tool_response": {
"content": "{"status": "succes...
Result: β - Got 20/20 calls, 20 correct
AXIS 3 SUMMARY:
1 calls: β (got 1, 1 correct)
2 calls: β (got 2, 2 correct)
3 calls: β (got 3, 3 correct)
5 calls: β (got 5, 5 correct)
7 calls: β (got 7, 7 correct)
10 calls: β (got 10, 10 correct)
15 calls: β (got 15, 15 correct)
20 calls: β (got 20, 20 correct)