{"Code":200,"Data":{"AigcAttributes":"{}","AigcIsTop":0,"AigcType":"","AlreadyStar":false,"ApplyMeta":"{}","ApprovalMode":0,"ApprovalNotifyEmail":"","Architectures":["LongcatFlashNgramForCausalLM"],"Avatar":"https://img.alicdn.com/imgextra/i1/O1CN01yhHrHg1Pdl3UKPhGc_!!6000000001864-2-tps-88-88.png","Backbone":[],"BackendSupport":{"architectures":null,"backend_info":{"deploy_task":null,"lmdeploy":null,"lmdeploy_turbomind":null,"ollama":null,"sglang":null,"vllm":null},"model_id":"meituan-longcat/LongCat-Flash-Lite"},"BaseModel":null,"BaseModelRelation":"","CardReady":0,"CardUnreadyReason":"","CertificationCreateBy":"","CertificationCreatedTime":-62135596800,"ChineseName":"","CoverHeight":0,"CoverImages":[],"CoverWidth":0,"CreatedBy":"systemd","CreatedTime":1769624536,"DashSdkParameter":"","Datasets":{},"DemoAvailable":0,"DemoUnavailableReason":"","Description":"","Domain":[],"Downloads":1717,"ExampleCodeAvailable":0,"ExampleCodeUnavailableReason":"","ForbiddenVisibilityUpdate":false,"Frameworks":["pytorch"],"FromSite":"github","Id":649464,"Integrating":0,"IntegrationFailureLog":"","IntegrationFailureReason":"","IsAccessible":1,"IsCertification":4,"IsHot":0,"IsNewModel":false,"IsOnline":1,"IsOrgClaimed":false,"IsPreTrain":0,"IsPublished":1,"IsTop":0,"Language":[],"LastUpdatedTime":1770430488,"Libraries":["transformer","safetensors","pytorch"],"License":"mit","LicenseLink":"","LicenseName":"","Meta":"","Metrics":[],"ModelDetail":{},"ModelInfos":{"safetensor":{"chat_template":"{%- set tool_choice = tool_choice | default('auto') %}\n{%- set ns = namespace(tool_types = [], last_query_index = -1) %}\n\n{%- if tools and tool_choice != 'none' %}\n    {{- \"\u003clongcat_tool_declare\u003e\\n\"-}}\n    {{- \"# Tools\\n\" }}\n    {{- \"You have access to the following tools:\\n\\n\" }}\n    {%- for tool in tools %}\n        {%- if tool.type not in ns.tool_types %}\n            {%- set ns.tool_types = ns.tool_types + [tool.type] %}\n            {{- \"## Tool namespace: \" ~ tool.type ~ \"\\n\\n\" }}\n        {%- endif %}\n        {%- if tool.type == 'code_interpreter' %}\n            {%- set tool = {\"type\":\"code_interpreter\",\"function\":{\"name\":\"code_interpreter_preview\",\"description\":\"The code will be executed in a stateful Jupyter notebook sandbox environment, only supports local computation, data processing, and file operations.\\nCode sandbox environment (network isolated) Any external network requests or online API calls are prohibited.\\nIf online functionality is needed, please use other permitted tools.\\nCode will respond with the output of the execution or time out after 60.0 seconds. \",\"parameters\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\",\"description\":\"The programming language of the code to be executed. Available values: python (Default), java, go, js, ts, c, c++.\"},\"code\":{\"type\":\"string\",\"description\":\"Python code to be executed must not include the following:\\n- Importing network libraries such as requests, httplib, etc.\\n- Any form of HTTP requests.\\n- External API calls.\\n- Network port operations. Example: ```python\\nimport pandas as pd\\npd.DataFrame({'A':[1,2]})\\n```\"},\"timeout\":{\"type\":\"number\",\"description\":\"The maximum execution time of the code, in seconds. Default is 60.0.\"}}},\"required\":[\"code\"]}} %}\n        {%- endif %}\n        {{- \"### Tool name: \" + tool.function.name + \"\\n\" }}\n        {{- \"Description: \" + tool.function.description + \"\\n\\n\" }}\n        {{- \"InputSchema: \" + tool.function.parameters | tojson(ensure_ascii=False) + \"\\n\\n\" }}\n    {%- endfor %}\n    {{- '**Note**: For each function call, output the function name and arguments within the following XML format:\\n\u003clongcat_tool_call\u003e{function-name}\\n\u003clongcat_arg_key\u003e{arg-key-1}\u003c/longcat_arg_key\u003e\\n\u003clongcat_arg_value\u003e{arg-value-1}\u003c/longcat_arg_value\u003e\\n\u003clongcat_arg_key\u003e{arg-key-2}\u003c/longcat_arg_key\u003e\\n\u003clongcat_arg_value\u003e{arg-value-2}\u003c/longcat_arg_value\u003e\\n...\\n\u003c/longcat_tool_call\u003e\\n' }}\n    {{- \"\u003c/longcat_tool_declare\u003e\"-}}\n    {%- for idx in range(messages|length - 1) %}\n        {%- set msg = messages[idx] %}\n        {%- if msg.role == 'assistant' and not msg.tool_calls %}\n            {%- set ns.last_query_index = idx %}\n        {%- endif %}\n    {%- endfor%}\n{%- endif %}\n\n{%- for msg in messages %}\n    {%- if msg.role == \"system\" %}\n        {{- \"\u003clongcat_system\u003e\" + msg.content }}\n    {%- elif msg.role == \"user\" %}\n        {{- \"\u003clongcat_user\u003e\" }}\n        {%- if msg[\"files\"] %}\n            {{- '\u003clongcat_files\u003e\\n' ~ msg.files | tojson(indent=2) ~ '\\n\u003c/longcat_files\u003e' }}\n        {%- endif %}\n        {{- msg.content }}\n    {%- elif msg.role == \"assistant\" %}\n        {{- \"\u003clongcat_assistant\u003e\" }}\n        {%- if enable_thinking == true and msg.reasoning_content and ns.tool_types != [] and loop.index0 \u003e ns.last_query_index %}\n            {{- \"\\n\u003clongcat_think\u003e\\n\" ~ msg.reasoning_content ~ \"\\n\u003c/longcat_think\u003e\\n\" }}\n        {%- endif %}\n        {%- if msg.content%}\n            {{- msg.content }}\n        {%- endif %}\n        {%- if msg.tool_calls %}\n            {%- for tool_call in msg.tool_calls -%}\n                {{- \"\u003clongcat_tool_call\u003e\" ~ tool_call.function.name ~ \"\\n\" -}}\n                {% set _args = tool_call.function.arguments %}\n                {% for k, v in _args.items() %}\n                    {{- \"\u003clongcat_arg_key\u003e\" ~ k ~ \"\u003c/longcat_arg_key\u003e\\n\" -}}\n                    {{- \"\u003clongcat_arg_value\u003e\" ~ (v if v is string else v | tojson(ensure_ascii=False)) ~ \"\u003c/longcat_arg_value\u003e\\n\" -}}\n                {% endfor %}\n                {{- \"\u003c/longcat_tool_call\u003e\\n\" }}\n            {%- endfor %}\n        {%- endif %}\n        {{- \"\u003c/longcat_s\u003e\" -}}\n    {%- elif msg.role == \"tool\" %}\n        {%- if messages[loop.index0 - 1].role != \"tool\"%}\n            {{- \"\u003clongcat_user\u003e\" -}}\n        {%- endif %}\n        {{- \"\u003clongcat_tool_response\u003e\" ~ msg.content ~ \"\u003c/longcat_tool_response\u003e\"-}}\n    {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n    {%- if enable_thinking == true %}\n        {{- \" /think_on\" }}\n        {%- if thinking_budget %}\n            {%- if thinking_budget \u003c 1024 %}\n                {%- set thinking_budget = 1024 %}\n            {%- endif%}\n            {{- \"\\nthinking_budget: \u003c \" ~ thinking_budget ~ \".\"}}\n        {%- endif %}\n        {{- \" \u003clongcat_assistant\u003e\u003clongcat_think\u003e\\n\"}}\n    {%- elif enable_thinking == false %}\n        {{- \" /think_off \u003clongcat_assistant\u003e\u003clongcat_think\u003e\\n\\n\u003c/longcat_think\u003e\\n\" }}\n    {%- else %}\n        {{- \"\u003clongcat_assistant\u003e\" }}\n    {%- endif %}\n{%- endif %}","files":[{"name":"model.safetensors.index.json","sha256":"5dfb90170455b0489b89d56d3e53ea87d5aeedbd1c79c6d841ec7fc3c9ac8bcd","size":1005293},{"name":"model-00000-of-00026.safetensors","sha256":"19412c9358bc484c8c9af94bb2e135a6939a39441488c6c042b16261bfe746ad","size":5313604160},{"name":"model-00001-of-00026.safetensors","sha256":"bff23594192d36756bdac96c7ee67dd641b8969f7d37c12d2a68a5e3ed9b8d87","size":5313604768},{"name":"model-00002-of-00026.safetensors","sha256":"3dcfc95fd273d4a8a57674916db168d977c10cddb87e0cc5b1fd5fc682ad121f","size":5313604016},{"name":"model-00003-of-00026.safetensors","sha256":"b465510bc231ab86c9f7403bd82e03a12b72b323cbe319547453b786577791d1","size":5313604136},{"name":"model-00004-of-00026.safetensors","sha256":"bd0ca68e274a10a89944da1984cf583adb7b51a9f54782f4e72ba6e6305aa7c8","size":5315503392},{"name":"model-00005-of-00026.safetensors","sha256":"edfcfed05027a48b2cab645e44b7dc8ec0544c1a64a0277bb0b76de703e85913","size":5313604136},{"name":"model-00006-of-00026.safetensors","sha256":"29959ee6a47ed392e05966031f46a589d9c41cfce369ee0be0f32a83246bc3ba","size":5313604136},{"name":"model-00007-of-00026.safetensors","sha256":"ba85ee575bdafb34270bbab3f7256c87178c3a2c05a5e637bb9ee83e565fdf2b","size":5313604760},{"name":"model-00008-of-00026.safetensors","sha256":"0533404a0b7ee44b0ade17bf9b9c00969e37cf864ff5d5f7818b030c702abb06","size":5313604216},{"name":"model-00009-of-00026.safetensors","sha256":"b65ca6876f65b690af110232c4d460c912beab21c195c4e0170e9f01ca1d8bb2","size":5315105048},{"name":"model-00010-of-00026.safetensors","sha256":"8d1032fedf9f1029544ac164405278774fd2f9e3b8399d8466b797d08f756fc6","size":5315104024},{"name":"model-00011-of-00026.safetensors","sha256":"1e13ef0f626c36a424cbed2e4181b853384de4cb8ad0660b65084c7408cfc729","size":5315103008},{"name":"model-00012-of-00026.safetensors","sha256":"d1c91f60ac661af3c195337d4ca771e274947ef8e7f258607b79e0e19a02c30d","size":5315190600},{"name":"model-00013-of-00026.safetensors","sha256":"2b6994f58b462df2107a899881309116d8b668e78588786e33fdcda5deee7308","size":5315190584},{"name":"model-00014-of-00026.safetensors","sha256":"a646727dce5f710bb23f38b01faae5a97e22966c0152a7f538ba711ec730ea9e","size":5315190384},{"name":"model-00015-of-00026.safetensors","sha256":"2fe62f582173fe86bac2a206b5b0d358a745355136c968401203305456b3e220","size":5315199112},{"name":"model-00016-of-00026.safetensors","sha256":"97d63ab634d0d6ee498b3e97db332c283b7d4c2c4aa65f2d5d949d7451a6c75c","size":5315199120},{"name":"model-00017-of-00026.safetensors","sha256":"d3cc16384a3b881669a1616091877297f08c6e6fd1a212b79a991f1adc7d3192","size":5315199120},{"name":"model-00018-of-00026.safetensors","sha256":"6130194e56cd991ffc0bcaab6f2ca2198e2a38db30b9cf3eef1833da86b97c80","size":5315199168},{"name":"model-00019-of-00026.safetensors","sha256":"19b89d889c49b935ba4c6579c2b5f9fd3a5005b97cd719059ac9ee3237f99e7c","size":5315199192},{"name":"model-00020-of-00026.safetensors","sha256":"2d274ec0a1f29bd9fa060c39de83e8dafd62e5b3882d6f907bf6f7fc40535a4b","size":5314674968},{"name":"model-00021-of-00026.safetensors","sha256":"701ed226f316cd6d608234d2f77714b54fc071445beba1fd9da9375d2115b831","size":5314674952},{"name":"model-00022-of-00026.safetensors","sha256":"6c194582d2c6af1bcf698927aeff47128401c0302047c8465b5ab5882e7e697d","size":5315068040},{"name":"model-00023-of-00026.safetensors","sha256":"4a084318a109e2776edd5a0fe71f87db3a513843c1eda6c374eed9469ad2c965","size":5315068048},{"name":"model-00024-of-00026.safetensors","sha256":"b2b2af8fa51ccc188f5c55afac3e3e0b59fb4c713dda44f9ec7820749cd851d6","size":5315199128},{"name":"model-00025-of-00026.safetensors","sha256":"c7643ca1f768712f319b01e552071b67f8550fb42c633bcee98b5fc40ab5501a","size":5315199232}],"model_size":69073335552,"tensor_type":["BF16","F32"]}},"ModelRevisions":null,"ModelSource":"USER_UPLOAD","ModelTools":"","ModelType":[],"MuseInfo":null,"NEXA":{"Catalogues":null,"ModelCover":"","ScientificField":"","Source":"","SubScientificField":null},"Name":"LongCat-Flash-Lite","NewVersion":"","NickName":"","OfficialTags":null,"OpenAiSwingDeployInfo":{"Order":0,"Recommend":null,"lmdeploy":{"eas":{"Script":"","requirements":""},"ens":{"Script":"","requirements":""},"fc":{"Script":"","requirements":""},"image_tag":""},"ollama":{"eas":{"Script":"","requirements":""},"ens":{"Script":"","requirements":""},"fc":{"Script":"","requirements":""},"image_tag":""},"pipeline":{"eas":{"Script":"","requirements":""},"ens":{"Script":"","requirements":""},"fc":{"Script":"","requirements":""},"image_tag":""},"vllm":{"eas":{"Script":"","requirements":""},"ens":{"Script":"","requirements":""},"fc":{"Script":"","requirements":""},"image_tag":""}},"Organization":{"ApplyFailureReason":"","ApplyReason":"","Avatar":"https://resouces.modelscope.cn/avatar/41115e46-28dc-47db-92a7-b17ab70865e5.webp","CreateCompetition":false,"CreatedBy":"yingda","Description":"[\"root\",{},[\"p\",{},[\"span\",{\"data-type\":\"text\"},[\"span\",{\"data-type\":\"leaf\"},\"\"]]]]","DisplayUrl":"","Email":"","EmailDomain":"","FollowerCnt":0,"FromSite":"","FullName":"美团-龙猫","GithubAddress":"","GmtCreated":"2025-08-30T23:29:41Z","GmtModified":"2025-09-01T06:14:46Z","Id":2574,"InitAdminMembers":"","IsApply":false,"IsCertification":"","MemberCnt":0,"Mobile":"","Name":"meituan-longcat","Path":"","Roles":null,"SocialLinks":null,"StarCnt":0,"Status":0,"SubscribeVo":null,"Type":1},"PaiModelGalleryUrl":null,"PaiSdkParameter":null,"Path":"meituan-longcat","ProtectedMode":0,"ReadMeContent":"\n# LongCat-Flash-Lite\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/meituan-longcat/LongCat-Flash-Chat/main/figures/longcat_logo.svg\" \n       width=\"300\" \n       alt=\"LongCat Logo\"/\u003e\n\u003c/div\u003e\n\n\u003chr\u003e\n\n\n\u003cdiv align=\"center\" style=\"line-height: 1;\"\u003e\n\n  \u003ca href=\"https://huggingface.co/meituan-longcat\" target=\"_blank\" style=\"margin: 2px;\"\u003e\n    \u003cimg alt=\"Hugging Face\" src=\"https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-LongCat-ffc107?color=ffc107\u0026logoColor=white\" style=\"display: inline-block; vertical-align: middle;\"/\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\" style=\"line-height: 1;\"\u003e\n  \u003ca href=\"https://github.com/meituan-longcat/LongCat-Flash-Chat/blob/main/figures/wechat_official_accounts.png\" target=\"_blank\" style=\"margin: 2px;\"\u003e\n    \u003cimg alt=\"Wechat\" src=\"https://img.shields.io/badge/WeChat-LongCat-brightgreen?logo=wechat\u0026logoColor=white\" style=\"display: inline-block; vertical-align: middle;\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://x.com/Meituan_LongCat\" target=\"_blank\" style=\"margin: 2px;\"\u003e\n    \u003cimg alt=\"Twitter Follow\" src=\"https://img.shields.io/badge/Twitter-LongCat-white?logo=x\u0026logoColor=white\" style=\"display: inline-block; vertical-align: middle;\"/\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\" style=\"line-height: 1;\"\u003e\n  \u003ca href=\"https://huggingface.co/meituan-longcat/LongCat-Flash-Chat/blob/main/LICENSE\" style=\"margin: 2px;\"\u003e\n    \u003cimg alt=\"License\" src=\"https://img.shields.io/badge/License-MIT-f5de53?\u0026color=f5de53\" style=\"display: inline-block; vertical-align: middle;\"/\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://arxiv.org/abs/2601.21204\"\u003e\u003cb\u003eTech Report\u003c/b\u003e\u0026nbsp;📄\u003c/a\u003e\n\u003c/p\u003e\n\n## Model Introduction\nWe introduce LongCat-Flash-Lite, a non-thinking 68.5B parameter Mixture-of-Experts (MoE) model with approximately 3B activated parameters, supporting a 256k context length through the YaRN method. Building upon the LongCat-Flash architecture, LongCat-Flash-Lite distinguishes itself through the integration of an **N-gram embedding** table designed to enhance both model performance and inference speed. Despite allocating over 30B parameters to embeddings, LongCat-Flash-Lite not only outperforms parameter-equivalent MoE baselines but also demonstrates exceptional competitiveness against existing models of comparable scale, particularly in the agentic and coding domains.\n\n\n\n### Key Features\n\n#### 🌟  Superior Scaling Efficiency: A Better Alternative to MoE\nThrough comprehensive scaling experiments across diverse scenarios, we identify specific regimes where embedding scaling achieves a superior Pareto frontier compared to increasing the number of experts, thereby offering a highly efficient alternative for model scaling. We further delineate a comprehensive set of architectural factors that determine embedding scaling efficacy, encompassing integration timing, parameter budgeting, hash collision mitigation, hyperparameter configuration, and embedding initialization, alongside the impacts of model width and depth. \n\n#### 🌟 Superior Inference Efficiency with Specialized System Optimization\nIn contrast to FFN-based experts, the N-gram embedding table inherently mitigates I/O bottlenecks within MoE layers, yielding substantial improvements in inference latency. Furthermore, we introduce a specialized N-gram Cache and develop synchronized kernels, which collectively and significantly boost inference efficiency.\n\n#### 🌟 Strong Agentic and Coding Performance\nLongCat-Flash-Lite demonstrates robust capabilities in agentic tool use and coding proficiency that are highly competitive relative to its model scale. \n\nPlease refer to our [technical report](https://arxiv.org/abs/2601.21204) for details!\n\n## Evaluation Results\n\n| Benchmark | Kimi-Linear-48B-A3B | Qwen3-Next-80B-A3B-Instruct | Gemini 2.5 Flash-Lite | LongCat-Flash-Lite |\n|----------|---------------------|----------------------------|----------------------|---------|\n| **Architecture** | MoE | MoE | - | MoE + NE |\n| **# Total Params** | 48B | 80B | - | 68.5B |\n| **# Activated Params** | 3B | 3B | - | 2.9B~4.5B |\n| **Agentic Tool Use** | | | | |\n| Tau2-Airline(avg@8) | 44.00 | 45.5* | 35.00 | 58.00 |\n| Tau2-Retail(avg@8) | 18.86 | 57.3* | 37.50 | 73.10 |\n| Tau2-Telecom(avg@8) | 15.68 | 13.2* | 21.93 | 72.80 |\n| **Agentic Coding** | | | | |\n| SWE-Bench(acc) | 32.80 | 37.60 | 41.3* | 54.40 |\n| TerminalBench(acc) | 20.00 | 15.19 | 20.00 | 33.75 |\n| SWE-Bench Multiligual | 37.20 | 31.30 | - | 38.10 |\n|PRDBench | - | 15.36 | - |  39.63 |\n| **General Domains** | | | | |\n| GPQA-Diamond(avg@16) | 69.89 | 74.33 | 70.20* | 66.78 |\n| MMLU(acc) | 79.91 | 89.28 | 84.68 | 85.52 |\n| MMLU-Pro(acc) | 67.22 | 82.93 | 78.95 | 78.29 |\n| CEval(acc) | 78.48 | 90.91 | 75.16 | 86.55 |\n| CMMLU(acc) | 76.26 | 86.50 | 72.06 | 82.48 |\n| **Mathematical Reasoning** | | | | |\n| MATH500(acc) | 94.20 | 98.00 | 95.20 | 96.80 |\n| AIME24(avg@32) | 70.52 | 81.35 | 63.33 | 72.19 |\n| AIME25(avg@32) | 59.58 | 68.44 | 50.1* | 63.23 |\n\n\u003e **Note:** Values marked with * are sourced from public reports. NE is an abbreviation of N-gram Embedding.\n\n## Quick Start\nTo use LongCat-Flash-Lite with transformers, we need at least 2 GPUs (80GB VRAM each, e.g., H100/A100 80GB), and we recommend the following environment:\n\n* `python` \u003e= 3.10\n* `torch` \u003e= 2.6\n* `transformers` \u003e= 4.57.6\n* `accelerate` \u003e= 1.10.0\n\n```shell\npip install -U transformers==4.57.6 accelerate==1.10.0\n```\n\nBasic Usage Example:\n```py\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nmodel_name = \"meituan-longcat/LongCat-Flash-Lite\"\nmodel = AutoModelForCausalLM.from_pretrained(\n    model_name,\n    torch_dtype=\"auto\",\n    device_map=\"auto\",\n    trust_remote_code=True\n)\ntokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)\n\nmessages = [\n    {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n    {\"role\": \"user\", \"content\": \"Give me a brief introduction to large language models.\"}\n]\ninput_ids = tokenizer.apply_chat_template(\n    messages, \n    add_generation_prompt=True, \n    return_tensors=\"pt\"\n).to(model.device)\ngenerated_ids = model.generate(inputs=input_ids, max_new_tokens=256)\noutput_ids = generated_ids[0][len(input_ids[0]):].tolist()\nresponse = tokenizer.decode(output_ids, skip_special_tokens=True).strip(\"\\n\")\nprint(response)\n```\n\nTool Calling Example:\n```py\ntools = [\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"func_add\",\n            \"description\": \"Calculate the sum of two numbers\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"x1\": {\"type\": \"number\", \"description\": \"The first addend\"},\n                    \"x2\": {\"type\": \"number\", \"description\": \"The second addend\"}\n                },\n                \"required\": [\"x1\", \"x2\"]\n            }\n        }\n    }\n]\nmessages = [\n    {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n    {\"role\": \"user\", \"content\": \"Please tell me what is $$125679 + 234519$$?\"},\n    {\n        \"role\": \"assistant\", \n        \"content\": \"I'll calculate the sum of 125679 and 234519 for you.\", \n        \"tool_calls\": [{\"type\": \"function\", \"function\": {\"name\": \"func_add\", \"arguments\": {\"x1\": 125679, \"x2\": 234519}}}]\n    },\n    {\"role\": \"tool\", \"name\": \"func_add\", \"content\": '{\"ans\": 360198}'}\n]\n\ninput_ids = tokenizer.apply_chat_template(\n    messages, \n    tools=tools,\n    add_generation_prompt=True, \n    return_tensors=\"pt\"\n).to(model.device)\ngenerated_ids = model.generate(inputs=input_ids, max_new_tokens=256)\noutput_ids = generated_ids[0][len(input_ids[0]):].tolist()\nresponse = tokenizer.decode(output_ids, skip_special_tokens=True).strip(\"\\n\")\nprint(response)\n```\n\nResponse Parsing:\n\n```python\nfrom parse_model_response import parse_model_response\n\nresponse = tokenizer.decode(output_ids, skip_special_tokens=True).strip(\"\\n\")\nparsed_message = parse_model_response(response, tools)\n```\nSee [`parse_model_response.py`](./parse_model_response.py) for detailed implementation and examples.\n\n\u003cbr\u003e\n\nRecommended Sampling Setting:\n```shell\n{ \"repetition_penalty\": 1.06, \"temperature\": 0.7, \"top_p\": 0.95, \"top_k\": 4 }\n```\n\n## Deployment\n\nWe have implemented basic adaptations in SGLang ([PR](https://github.com/sgl-project/sglang/pull/17838)) to support the deployment of LongCat-Flash-Lite.\n\nLongCat-Flash-Lite can be served on a single node (e.g., 8xH20-141G) using a combination of Tensor Parallelism and Expert Parallelism.\n\nCompile and update sgl-kernel first.\n\n```shell\ncd sgl-kernel\npython3 -m uv build --wheel --color=always --no-build-isolation \\\n        -Ccmake.define.SGL_KERNEL_ENABLE_SM90A=1 \\\n        -Ccmake.define.CMAKE_POLICY_VERSION_MINIMUM=3.5 \\\n        -Cbuild-dir=build .\npip3 install dist/sgl_kernel-0.3.21-cp310-abi3-linux_x86_64.whl --force-reinstall\n```\nThen launch the server.\n```py\npython3 -m sglang.launch_server \\\n    --model meituan-longcat/LongCat-Flash-Lite \\\n    --port 8080 \\\n    --host 0.0.0.0 \\\n    --mem-fraction-static 0.9 \\\n    --max-running-requests 64 \\\n    --trust-remote-code \\\n    --skip-server-warmup \\\n    --attention-backend flashinfer \\\n    --ep 8 \\\n    --tp 8 \\\n    --disable-cuda-graph\n```\n\n## License Agreement\n\nThis repository, including both the model weights and the source code, is released under the **MIT License**. \n\nAny contributions to this repository are licensed under the MIT License, unless otherwise stated. This license does not grant any rights to use Meituan trademarks or patents. \n\nFor details, see the [LICENSE](./LICENSE) file. \n\n## Usage Considerations \nThis model has not been specifically designed or comprehensively evaluated for every possible downstream application. \n\nDevelopers should take into account the known limitations of large language models, including performance variations across different languages, and carefully assess accuracy, safety, and fairness before deploying the model in sensitive or high-risk scenarios. \nIt is the responsibility of developers and downstream users to understand and comply with all applicable laws and regulations relevant to their use case, including but not limited to data protection, privacy, and content safety requirements. \n\nNothing in this Model Card should be interpreted as altering or restricting the terms of the MIT License under which the model is released. \n\n\n## Citation\n\nWe kindly encourage citation of our work if you find it useful.\n\n```\n@misc{liu2026scalingembeddingsoutperformsscaling,\n      title={Scaling Embeddings Outperforms Scaling Experts in Language Models}, \n      author={Hong Liu and Jiaqi Zhang and Chao Wang and Xing Hu and Linkun Lyu and Jiaqi Sun and Xurui Yang and Bo Wang and Fengcun Li and Yulei Qian and Lingtong Si and Yerui Sun and Rumei Li and Peng Pei and Yuchen Xie and Xunliang Cai},\n      year={2026},\n      eprint={2601.21204},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL},\n      url={https://arxiv.org/abs/2601.21204}, \n}\n```\n\n\n## Contact\nPlease contact us at \u003ca href=\"mailto:longcat-team@meituan.com\"\u003elongcat-team@meituan.com\u003c/a\u003e or open an issue if you have any questions.\n\n\n","ReadMeTips":null,"RelatedArxivId":["2601.21204"],"RelatedPaper":[237311],"Revision":"master","Stars":32,"StorageSize":138189357062,"Studios":[],"SubVisionFoundation":"","SupportApiInference":false,"SupportDashDeployment":0,"SupportDashInference":0,"SupportDashTraining":0,"SupportDeployment":0,"SupportExperience":1,"SupportFinetuning":0,"SupportFlexTrain":0,"SupportInference":"txt2txt","SupportPaiModelGallery":null,"SupportPaiSdk":0,"SupportPivotEval":true,"SwingDeployInfo":null,"Tags":["transformers"],"Tasks":[{"ChineseName":"文本生成","Description":"","DomainName":"nlp","Id":22,"IsExhibition":true,"IsHot":0,"IsLeaf":true,"IsLoginRequired":true,"IsRetrieval":true,"Level":1,"Name":"text-generation","ParentId":-1,"ParentTask":null,"Sorting":0,"SupportWidgets":false,"TypicalModel":"","WidgetConfig":"{\"task\": \"text-generation\", \"inputs\": [{\"type\": \"text\", \"validator\": {\"max_words\": \"1000\"}, \"displayType\": \"OnlyTextArea\"}], \"output\": {\"displayType\": \"ReadonlyText\", \"transformOutputs\": [{\"outputKey\": \"text\"}], \"displayOutputMapping\": \"text\"}, \"examples\": []}","WidgetValidator":""}],"Tools":[],"TriggerWords":null,"Visibility":5,"VisionFoundation":"","_":null,"widgets":[{"enable":true,"enabled":false,"examples":[{"inputs":[{"data":"你好","name":"text"}],"name":"","parameters":null,"title":""}],"inferencespec":null,"inputs":null,"parameters":null,"task":"text-generation","template":{"general":true}}]},"Message":"success","RequestId":"4d4f2e1a-e911-4517-87d0-79e0f94053d6","Success":true}