{"_id":"68d185fcf44273da274ab279","id":"LiquidAI/LFM2-2.6B","private":false,"pipeline_tag":"text-generation","library_name":"transformers","tags":["transformers","safetensors","lfm2","text-generation","liquid","edge","conversational","en","ar","zh","fr","de","ja","ko","es","arxiv:2511.23404","license:other","endpoints_compatible","deploy:azure","region:us"],"downloads":6457,"likes":197,"modelId":"LiquidAI/LFM2-2.6B","author":"LiquidAI","sha":"36ed799f7024ef169ba92ffe184821835e15cc66","lastModified":"2026-08-05T17:01:28.000Z","gated":false,"disabled":false,"widgetData":[{"text":"Hi, what can you help me with?"},{"text":"What is 84 * 3 / 2?"},{"text":"Tell me an interesting fact about the universe!"},{"text":"Explain quantum computing in simple terms."}],"model-index":null,"config":{"architectures":["Lfm2ForCausalLM"],"model_type":"lfm2","tokenizer_config":{"bos_token":"<|startoftext|>","eos_token":"<|im_end|>","pad_token":"<|pad|>","use_default_system_prompt":false},"chat_template_jinja":"{{- bos_token -}}\n{%- macro format_arg_value(arg_value) -%}\n\t{%- if arg_value is string -%}\n\t\t{{- \"'\" + (arg_value | replace(\"\\\\\", \"\\\\\\\\\") | replace(\"'\", \"\\\\'\") | replace(\"\\n\", \"\\\\n\") | replace(\"\\r\", \"\\\\r\")) + \"'\" -}}\n\t{%- elif arg_value is mapping or arg_value is iterable -%}\n\t\t{{- arg_value | tojson -}}\n\t{%- else -%}\n\t\t{{- arg_value | string -}}\n\t{%- endif -%}\n{%- endmacro -%}\n{%- macro render_tool_calls(tool_calls) -%}\n\t{%- set tool_calls_ns = namespace(tool_calls=[]) -%}\n\t{%- for tool_call in tool_calls -%}\n\t\t{%- set func = tool_call[\"function\"] if \"function\" in tool_call else tool_call -%}\n\t\t{%- set func_name = func[\"name\"] -%}\n\t\t{%- set func_args = func.get(\"arguments\") -%}\n\t\t{%- set args_ns = namespace(arg_strings=[]) -%}\n\t\t{%- if func_args is mapping -%}\n\t\t\t{%- for arg_name, arg_value in func_args.items() -%}\n\t\t\t\t{%- set args_ns.arg_strings = args_ns.arg_strings + [arg_name + \"=\" + format_arg_value(arg_value)] -%}\n\t\t\t{%- endfor -%}\n\t\t{%- elif func_args is string and (func_args | trim) not in [\"\", \"{}\", \"null\"] -%}\n\t\t\t{{- raise_exception(\"Tool call arguments must be a mapping, got a JSON-encoded string: parse arguments with json.loads() before applying the chat template\") -}}\n\t\t{%- endif -%}\n\t\t{%- set tool_calls_ns.tool_calls = tool_calls_ns.tool_calls + [func_name + \"(\" + (args_ns.arg_strings | join(\", \")) + \")\"] -%}\n\t{%- endfor -%}\n\t{{- \"<|tool_call_start|>[\" + (tool_calls_ns.tool_calls | join(\", \")) + \"]<|tool_call_end|>\" -}}\n{%- endmacro -%}\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            {%- set tool = tool | tojson -%}\n\t\t{%- endif -%}\n\t\t{%- set ns.system_prompt = ns.system_prompt + tool -%}\n        {%- if not loop.last -%}\n            {%- set ns.system_prompt = ns.system_prompt + \", \" -%}\n        {%- 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.get(\"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{%- if message[\"role\"] == \"assistant\" and message.get(\"tool_calls\") -%}\n\t\t{%- if content and content != \"null\" -%}\n\t\t\t{{- content -}}\n\t\t{%- endif -%}\n\t\t{{- render_tool_calls(message[\"tool_calls\"]) -}}\n\t\t{{- \"<|im_end|>\\n\" -}}\n\t{%- else -%}\n\t\t{{- content + \"<|im_end|>\\n\" -}}\n\t{%- endif -%}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n\t{{- \"<|im_start|>assistant\\n\" -}}\n{%- endif -%}"},"cardData":{"library_name":"transformers","license":"other","license_name":"lfm1.0","license_link":"LICENSE","language":["en","ar","zh","fr","de","ja","ko","es"],"pipeline_tag":"text-generation","tags":["liquid","lfm2","edge"],"new_version":"LiquidAI/LFM2.5-2.6B"},"transformersInfo":{"auto_model":"AutoModelForCausalLM","pipeline_tag":"text-generation","processor":"AutoTokenizer"},"siblings":[{"rfilename":".gitattributes"},{"rfilename":"LICENSE"},{"rfilename":"README.md"},{"rfilename":"chat_template.jinja"},{"rfilename":"config.json"},{"rfilename":"generation_config.json"},{"rfilename":"model.safetensors"},{"rfilename":"special_tokens_map.json"},{"rfilename":"tokenizer.json"},{"rfilename":"tokenizer_config.json"}],"spaces":["EuroEval/euroeval_leaderboard","stanley-00/slm-testing","FlameF0X/lfm2","akhaliq/LFM2-2.6B","Alovestocode/router-router-zero","ncc01/ZeroGPU-LLM-Inference","polats/ZeroGPU-LLM-Inference","Code2aum/vineyard-plotter-models","ukung/slm-testing"],"createdAt":"2025-09-22T17:23:08.000Z","safetensors":{"parameters":{"BF16":2569272320},"total":2569272320},"usedStorage":5138574880}