{"_id":"686fabae2fb74b6dbfe2dc8b","id":"LiquidAI/LFM2-1.2B","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":67720,"likes":366,"modelId":"LiquidAI/LFM2-1.2B","author":"LiquidAI","sha":"40f3da0d0164913923aee9462c23077868b816a3","lastModified":"2026-08-05T16:57:07.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-1.2B-Instruct"},"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":["eduagarcia/multilingual-tokenizer-leaderboard","EuroEval/euroeval_leaderboard","stanley-00/slm-testing","macadeliccc/liquid_ai_chatbot","FlameF0X/lfm2","yasserrmd/SoftwareArchitecture-Chat","paulaamb/roblox","Mihaiii/llm_steer","FlameF0X/SLM-Playground","gmonsoon/Indonesia-Energy-Transition-demo","bwilkie/Final_Assignment_Template3","dondoesstuff/LFM2-1.2B","nlpengineer/model_testing","Alovestocode/router-router-zero","ncc01/ZeroGPU-LLM-Inference","Mihaiii/repeng-demo","polats/ZeroGPU-LLM-Inference","HedronCreeper/lfm2","cdotsanghvi/lfm2-transaction-encoder","RabiaAbsar/genai-tutor-chatbot","somosnlp-hackathon-2026/mombeu","sonic-coder/CPU-LLM-Inference","mahamhamid06/financial-analyst-chatbot","angrycub/liquid_ai_chatbot","ukung/slm-testing"],"createdAt":"2025-07-10T12:01:50.000Z","safetensors":{"parameters":{"BF16":1170340608},"total":1170340608},"usedStorage":2340697936}