Instructions to use LiquidAI/LFM2-1.2B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use LiquidAI/LFM2-1.2B-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-GGUF", filename="LFM2-1.2B-F16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use LiquidAI/LFM2-1.2B-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-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf LiquidAI/LFM2-1.2B-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-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf LiquidAI/LFM2-1.2B-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-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf LiquidAI/LFM2-1.2B-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-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf LiquidAI/LFM2-1.2B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/LiquidAI/LFM2-1.2B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use LiquidAI/LFM2-1.2B-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-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-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LiquidAI/LFM2-1.2B-GGUF:Q4_K_M
- Ollama
How to use LiquidAI/LFM2-1.2B-GGUF with Ollama:
ollama run hf.co/LiquidAI/LFM2-1.2B-GGUF:Q4_K_M
- Unsloth Studio new
How to use LiquidAI/LFM2-1.2B-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-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-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-GGUF to start chatting
- Docker Model Runner
How to use LiquidAI/LFM2-1.2B-GGUF with Docker Model Runner:
docker model run hf.co/LiquidAI/LFM2-1.2B-GGUF:Q4_K_M
- Lemonade
How to use LiquidAI/LFM2-1.2B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull LiquidAI/LFM2-1.2B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.LFM2-1.2B-GGUF-Q4_K_M
List all available models
lemonade list
Func tools
#1
by ykhrustalev - opened
- .gitattributes +0 -1
- LFM2-1.2B-Q4_K_M-hip-optimized.gguf +0 -3
- README.md +28 -7
- leap/Q4_0.json +0 -15
- leap/Q4_K_M.json +0 -15
- leap/Q5_K_M.json +0 -15
- leap/Q8_0.json +0 -15
.gitattributes
CHANGED
|
@@ -39,4 +39,3 @@ LFM2-1.2B-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
|
| 39 |
LFM2-1.2B-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
LFM2-1.2B-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
LFM2-1.2B-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
-
LFM2-1.2B-Q4_K_M-hip-optimized.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 39 |
LFM2-1.2B-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
LFM2-1.2B-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
LFM2-1.2B-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
LFM2-1.2B-Q4_K_M-hip-optimized.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:5f2f0a9f648820a2cbb21fe02f5e71ab417481316508da6fb960d664e3fc9fce
|
| 3 |
-
size 796412864
|
|
|
|
|
|
|
|
|
|
|
|
README.md
CHANGED
|
@@ -25,17 +25,38 @@ base_model:
|
|
| 25 |
<center>
|
| 26 |
<div style="text-align: center;">
|
| 27 |
<img
|
| 28 |
-
src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/
|
| 29 |
alt="Liquid AI"
|
| 30 |
-
style="width: 100%; max-width:
|
| 31 |
/>
|
| 32 |
</div>
|
| 33 |
-
<div style="display: flex; justify-content: center; gap: 0.5em;">
|
| 34 |
-
<a href="https://playground.liquid.ai/"><strong>Try LFM</strong></a> • <a href="https://docs.liquid.ai/lfm/getting-started/welcome"><strong>Docs</strong></a> • <a href="https://leap.liquid.ai/"><strong>LEAP</strong></a> • <a href="https://discord.com/invite/liquid-ai"><strong>Discord</strong></a>
|
| 35 |
-
</div>
|
| 36 |
-
</center>
|
| 37 |
|
| 38 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
# LFM2-1.2B-GGUF
|
| 41 |
|
|
|
|
| 25 |
<center>
|
| 26 |
<div style="text-align: center;">
|
| 27 |
<img
|
| 28 |
+
src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/7_6D7rWrLxp2hb6OHSV1p.png"
|
| 29 |
alt="Liquid AI"
|
| 30 |
+
style="width: 100%; max-width: 66%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;"
|
| 31 |
/>
|
| 32 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
+
<a href="https://playground.liquid.ai/chat">
|
| 35 |
+
<svg width="114.8" height="20" viewBox="0 0 1300 200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Liquid Playground" style="margin-bottom: 1em;">
|
| 36 |
+
<title>Liquid: Playground</title>
|
| 37 |
+
<g>
|
| 38 |
+
<rect fill="#fff" width="600" height="200"></rect>
|
| 39 |
+
<rect fill="url(#x)" x="600" width="700" height="200"></rect>
|
| 40 |
+
</g>
|
| 41 |
+
<g transform="translate(20, 30) scale(0.4, 0.4)">
|
| 42 |
+
<path d="M172.314 129.313L172.219 129.367L206.125 188.18C210.671 195.154 213.324 203.457 213.324 212.382C213.324 220.834 210.956 228.739 206.839 235.479L275.924 213.178L167.853 33.6L141.827 76.9614L172.314 129.313Z" fill="black"/>
|
| 43 |
+
<path d="M114.217 302.4L168.492 257.003C168.447 257.003 168.397 257.003 168.352 257.003C143.515 257.003 123.385 237.027 123.385 212.387C123.385 203.487 126.023 195.204 130.55 188.24L162.621 132.503L135.966 86.7327L60.0762 213.183L114.127 302.4H114.217Z" fill="black"/>
|
| 44 |
+
<path d="M191.435 250.681C191.435 250.681 191.43 250.681 191.425 250.686L129.71 302.4H221.294L267.71 226.593L191.435 250.686V250.681Z" fill="black"/>
|
| 45 |
+
</g>
|
| 46 |
+
<g aria-hidden="true" fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="110">
|
| 47 |
+
<text x="200" y="148" textLength="329" fill="#000" opacity="0.1">Liquid</text>
|
| 48 |
+
<text x="190" y="138" textLength="329" fill="#000">Liquid</text>
|
| 49 |
+
<text x="655" y="148" textLength="619" fill="#000" opacity="0.1">Playground</text>
|
| 50 |
+
<text x="645" y="138" textLength="619">Playground</text>
|
| 51 |
+
</g>
|
| 52 |
+
|
| 53 |
+
<linearGradient id="x" x1="0%" y1="0%" x2="100%" y2="0%">
|
| 54 |
+
<stop offset="0%" style="stop-color:#000000"></stop>
|
| 55 |
+
<stop offset="100%" style="stop-color:#000000"></stop>
|
| 56 |
+
</linearGradient>
|
| 57 |
+
</svg>
|
| 58 |
+
</a>
|
| 59 |
+
</center>
|
| 60 |
|
| 61 |
# LFM2-1.2B-GGUF
|
| 62 |
|
leap/Q4_0.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"inference_type": "llama.cpp/text-to-text",
|
| 3 |
-
"schema_version": "1.0.0",
|
| 4 |
-
"load_time_parameters": {
|
| 5 |
-
"model": "../LFM2-1.2B-Q4_0.gguf",
|
| 6 |
-
"chat_template": "{{- bos_token -}}\n{%- set system_prompt = \"\" -%}\n{%- set ns = namespace(system_prompt=\"\") -%}\n{%- if messages[0][\"role\"] == \"system\" -%}\n\t{%- set ns.system_prompt = messages[0][\"content\"] -%}\n\t{%- set messages = messages[1:] -%}\n{%- endif -%}\n{%- if tools -%}\n\t{%- set ns.system_prompt = ns.system_prompt + (\"\\n\" if ns.system_prompt else \"\") + \"List of tools: <|tool_list_start|>[\" -%}\n\t{%- for tool in tools -%}\n\t\t{%- if tool is not string -%}\n\t\t\t{%- set tool = tool | tojson -%}\n\t\t{%- endif -%}\n\t\t{%- set ns.system_prompt = ns.system_prompt + tool -%}\n\t\t{%- if not loop.last -%}\n\t\t\t{%- set ns.system_prompt = ns.system_prompt + \", \" -%}\n\t\t{%- endif -%}\n\t{%- endfor -%}\n\t{%- set ns.system_prompt = ns.system_prompt + \"]<|tool_list_end|>\" -%}\n{%- endif -%}\n{%- if ns.system_prompt -%}\n\t{{- \"<|im_start|>system\\n\" + ns.system_prompt + \"<|im_end|>\\n\" -}}\n{%- endif -%}\n{%- for message in messages -%}\n\t{{- \"<|im_start|>\" + message[\"role\"] + \"\\n\" -}}\n\t{%- set content = message[\"content\"] -%}\n\t{%- if content is not string -%}\n\t\t{%- set content = content | tojson -%}\n\t{%- endif -%}\n\t{%- if message[\"role\"] == \"tool\" -%}\n\t\t{%- set content = \"<|tool_response_start|>\" + content + \"<|tool_response_end|>\" -%}\n\t{%- endif -%}\n\t{{- content + \"<|im_end|>\\n\" -}}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n\t{{- \"<|im_start|>assistant\\n\" -}}\n{%- endif -%}\n"
|
| 7 |
-
},
|
| 8 |
-
"generation_time_parameters": {
|
| 9 |
-
"sampling_parameters": {
|
| 10 |
-
"temperature": 0.3,
|
| 11 |
-
"min_p": 0.15,
|
| 12 |
-
"repetition_penalty": 1.05
|
| 13 |
-
}
|
| 14 |
-
}
|
| 15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
leap/Q4_K_M.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"inference_type": "llama.cpp/text-to-text",
|
| 3 |
-
"schema_version": "1.0.0",
|
| 4 |
-
"load_time_parameters": {
|
| 5 |
-
"model": "../LFM2-1.2B-Q4_K_M.gguf",
|
| 6 |
-
"chat_template": "{{- bos_token -}}\n{%- set system_prompt = \"\" -%}\n{%- set ns = namespace(system_prompt=\"\") -%}\n{%- if messages[0][\"role\"] == \"system\" -%}\n\t{%- set ns.system_prompt = messages[0][\"content\"] -%}\n\t{%- set messages = messages[1:] -%}\n{%- endif -%}\n{%- if tools -%}\n\t{%- set ns.system_prompt = ns.system_prompt + (\"\\n\" if ns.system_prompt else \"\") + \"List of tools: <|tool_list_start|>[\" -%}\n\t{%- for tool in tools -%}\n\t\t{%- if tool is not string -%}\n\t\t\t{%- set tool = tool | tojson -%}\n\t\t{%- endif -%}\n\t\t{%- set ns.system_prompt = ns.system_prompt + tool -%}\n\t\t{%- if not loop.last -%}\n\t\t\t{%- set ns.system_prompt = ns.system_prompt + \", \" -%}\n\t\t{%- endif -%}\n\t{%- endfor -%}\n\t{%- set ns.system_prompt = ns.system_prompt + \"]<|tool_list_end|>\" -%}\n{%- endif -%}\n{%- if ns.system_prompt -%}\n\t{{- \"<|im_start|>system\\n\" + ns.system_prompt + \"<|im_end|>\\n\" -}}\n{%- endif -%}\n{%- for message in messages -%}\n\t{{- \"<|im_start|>\" + message[\"role\"] + \"\\n\" -}}\n\t{%- set content = message[\"content\"] -%}\n\t{%- if content is not string -%}\n\t\t{%- set content = content | tojson -%}\n\t{%- endif -%}\n\t{%- if message[\"role\"] == \"tool\" -%}\n\t\t{%- set content = \"<|tool_response_start|>\" + content + \"<|tool_response_end|>\" -%}\n\t{%- endif -%}\n\t{{- content + \"<|im_end|>\\n\" -}}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n\t{{- \"<|im_start|>assistant\\n\" -}}\n{%- endif -%}\n"
|
| 7 |
-
},
|
| 8 |
-
"generation_time_parameters": {
|
| 9 |
-
"sampling_parameters": {
|
| 10 |
-
"temperature": 0.3,
|
| 11 |
-
"min_p": 0.15,
|
| 12 |
-
"repetition_penalty": 1.05
|
| 13 |
-
}
|
| 14 |
-
}
|
| 15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
leap/Q5_K_M.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"inference_type": "llama.cpp/text-to-text",
|
| 3 |
-
"schema_version": "1.0.0",
|
| 4 |
-
"load_time_parameters": {
|
| 5 |
-
"model": "../LFM2-1.2B-Q5_K_M.gguf",
|
| 6 |
-
"chat_template": "{{- bos_token -}}\n{%- set system_prompt = \"\" -%}\n{%- set ns = namespace(system_prompt=\"\") -%}\n{%- if messages[0][\"role\"] == \"system\" -%}\n\t{%- set ns.system_prompt = messages[0][\"content\"] -%}\n\t{%- set messages = messages[1:] -%}\n{%- endif -%}\n{%- if tools -%}\n\t{%- set ns.system_prompt = ns.system_prompt + (\"\\n\" if ns.system_prompt else \"\") + \"List of tools: <|tool_list_start|>[\" -%}\n\t{%- for tool in tools -%}\n\t\t{%- if tool is not string -%}\n\t\t\t{%- set tool = tool | tojson -%}\n\t\t{%- endif -%}\n\t\t{%- set ns.system_prompt = ns.system_prompt + tool -%}\n\t\t{%- if not loop.last -%}\n\t\t\t{%- set ns.system_prompt = ns.system_prompt + \", \" -%}\n\t\t{%- endif -%}\n\t{%- endfor -%}\n\t{%- set ns.system_prompt = ns.system_prompt + \"]<|tool_list_end|>\" -%}\n{%- endif -%}\n{%- if ns.system_prompt -%}\n\t{{- \"<|im_start|>system\\n\" + ns.system_prompt + \"<|im_end|>\\n\" -}}\n{%- endif -%}\n{%- for message in messages -%}\n\t{{- \"<|im_start|>\" + message[\"role\"] + \"\\n\" -}}\n\t{%- set content = message[\"content\"] -%}\n\t{%- if content is not string -%}\n\t\t{%- set content = content | tojson -%}\n\t{%- endif -%}\n\t{%- if message[\"role\"] == \"tool\" -%}\n\t\t{%- set content = \"<|tool_response_start|>\" + content + \"<|tool_response_end|>\" -%}\n\t{%- endif -%}\n\t{{- content + \"<|im_end|>\\n\" -}}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n\t{{- \"<|im_start|>assistant\\n\" -}}\n{%- endif -%}\n"
|
| 7 |
-
},
|
| 8 |
-
"generation_time_parameters": {
|
| 9 |
-
"sampling_parameters": {
|
| 10 |
-
"temperature": 0.3,
|
| 11 |
-
"min_p": 0.15,
|
| 12 |
-
"repetition_penalty": 1.05
|
| 13 |
-
}
|
| 14 |
-
}
|
| 15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
leap/Q8_0.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"inference_type": "llama.cpp/text-to-text",
|
| 3 |
-
"schema_version": "1.0.0",
|
| 4 |
-
"load_time_parameters": {
|
| 5 |
-
"model": "../LFM2-1.2B-Q8_0.gguf",
|
| 6 |
-
"chat_template": "{{- bos_token -}}\n{%- set system_prompt = \"\" -%}\n{%- set ns = namespace(system_prompt=\"\") -%}\n{%- if messages[0][\"role\"] == \"system\" -%}\n\t{%- set ns.system_prompt = messages[0][\"content\"] -%}\n\t{%- set messages = messages[1:] -%}\n{%- endif -%}\n{%- if tools -%}\n\t{%- set ns.system_prompt = ns.system_prompt + (\"\\n\" if ns.system_prompt else \"\") + \"List of tools: <|tool_list_start|>[\" -%}\n\t{%- for tool in tools -%}\n\t\t{%- if tool is not string -%}\n\t\t\t{%- set tool = tool | tojson -%}\n\t\t{%- endif -%}\n\t\t{%- set ns.system_prompt = ns.system_prompt + tool -%}\n\t\t{%- if not loop.last -%}\n\t\t\t{%- set ns.system_prompt = ns.system_prompt + \", \" -%}\n\t\t{%- endif -%}\n\t{%- endfor -%}\n\t{%- set ns.system_prompt = ns.system_prompt + \"]<|tool_list_end|>\" -%}\n{%- endif -%}\n{%- if ns.system_prompt -%}\n\t{{- \"<|im_start|>system\\n\" + ns.system_prompt + \"<|im_end|>\\n\" -}}\n{%- endif -%}\n{%- for message in messages -%}\n\t{{- \"<|im_start|>\" + message[\"role\"] + \"\\n\" -}}\n\t{%- set content = message[\"content\"] -%}\n\t{%- if content is not string -%}\n\t\t{%- set content = content | tojson -%}\n\t{%- endif -%}\n\t{%- if message[\"role\"] == \"tool\" -%}\n\t\t{%- set content = \"<|tool_response_start|>\" + content + \"<|tool_response_end|>\" -%}\n\t{%- endif -%}\n\t{{- content + \"<|im_end|>\\n\" -}}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n\t{{- \"<|im_start|>assistant\\n\" -}}\n{%- endif -%}\n"
|
| 7 |
-
},
|
| 8 |
-
"generation_time_parameters": {
|
| 9 |
-
"sampling_parameters": {
|
| 10 |
-
"temperature": 0.3,
|
| 11 |
-
"min_p": 0.15,
|
| 12 |
-
"repetition_penalty": 1.05
|
| 13 |
-
}
|
| 14 |
-
}
|
| 15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|