Tabbit
ResourcesBlogModels
Tabbit LogoTabbit

Tabbit — The AI Browser that Works for You

Topics

  • AI Browser Resources
  • Agentic Browser Resources
  • Browser Downloads and Install Guides
  • Browser Comparisons
  • AI Browser Alternatives
  • Browser Productivity Resources

Popular Guides

  • AI Browser
  • Agentic Browser Download
  • Best AI Browser 2026: Top 9 Tested & Ranked
  • AI Browser Download
  • Free AI Browser
  • Best AI Browser 2026
  • AI Browser Comparison 2026
  • AI Browser for Windows
  • AI Browser for Mac
  • Chrome Alternative 2026

Events

  • Tabbit Skill Competition
  • KPOP SBTI Fandom Personality Test
  • Tabbit Campus Creator Program
  • fifi's Picks: AI Skills for Research Papers
  • User Survey

About

  • Tabbit Blog
  • Press & Media
Prompt guide
MediaLongCat 2.0

LongCat-2.0 Chat Template and Tool-Calling Configuration (Official Hugging Face Model Card)

Original source

Hugging Face

Authormeituan-longcat (Meituan LongCat team)

Source date2026-06-30

Tabbit curation2026-08-19

Read original

One-sentence takeaway

The model card provides directly reusable chat-template invocation examples: how to enable or disable thinking mode (enable_thinking / save_reasoning_content), the function-calling format (arguments must be a dict rather than a string), and deployment commands for vLLM, SGLang, and Docker.

Use cases

  • Suitable tasks: Self-host LongCat-2.0 (on GPU or NPU); correctly construct message sequences with tool calls in Transformers / vLLM / SGLang; control the thinking-mode switch

  • Unsuitable tasks: Quick trials outside a code environment (use the official web chat at https://longcat.ai or the API instead); quantized deployment instructions (see the separate model cards meituan-longcat/LongCat-2.0-FP8 and LongCat-2.0-INT8 for INT8/FP8)

  • Applicable model versions: LongCat-2.0 (including the FP8/INT8 quantized versions)

  • Applicable clients, Agents, or APIs: Transformers (LongcatCausalLM), vLLM, SGLang, Docker Model Runner

  • Recommended reasoning tier and parameters: The official source describes enabling thinking mode while retaining all reasoning content (enable_thinking=True, save_reasoning_content=True) as "for better performance"; disable thinking (enable_thinking=False) "for better token efficiency"

Ready-to-use content

1. Load with Transformers

from transformers import LongcatCausalLM
model = LongcatCausalLM.from_pretrained("meituan-longcat/LongCat-2.0", device_map="auto")

2. vLLM service

pip install vllm
vllm serve "meituan-longcat/LongCat-2.0"
curl -X POST "http://localhost:8000/v1/chat/completions" \
  -H "Content-Type: application/json" \
  --data '{"model": "meituan-longcat/LongCat-2.0",
           "messages": [{"role": "user", "content": "What is the capital of France?"}]}'

3. SGLang service (GPU)

pip install sglang
python3 -m sglang.launch_server \
    --model-path "meituan-longcat/LongCat-2.0" \
    --host 0.0.0.0 \
    --port 30000

For NPU deployment, see SGLang-FluentLLM; the official source also provides a GPU deployment cookbook (the GitHub repository README points to it).

4. Chat template with tool calls (official example; note that arguments is a dict)

from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("meituan-longcat/LongCat-2.0", trust_remote_code=True)

tools = [
    {"type": "function", "function": {
        "name": "func_add", "description": "Calculate the sum of two numbers",
        "parameters": {"type": "object", "properties": {
            "x1": {"type": "number", "description": "The first number to add"},
            "x2": {"type": "number", "description": "The second number to add"}},
            "required": ["x1", "x2"]}}},
    {"type": "function", "function": {
        "name": "func_multiply", "description": "Calculate the product of two numbers",
        "parameters": {"type": "object", "properties": {
            "x1": {"type": "number", "description": "The first number to multiply"},
            "x2": {"type": "number", "description": "The second number to multiply"}},
            "required": ["x1", "x2"]}}},
]

messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Calculate 1+1"},
    {"role": "assistant", "reasoning_content": "Calling func_add to calculate 1+1",
     # Note: Unlike the standard OpenAI format, the official requirement is for arguments to be a dict rather than a string
     "tool_calls": [{"type": "function", "function": {"name": "func_add", "arguments": {"x1": 1, "x2": 1}}}]},
    {"role": "tool", "name": "func_add", "content": '{"ans": 2}'},
    {"role": "assistant", "reasoning_content": "The result is 2", "content": "2"},
    {"role": "user", "content": "Check your answer, is it correct?"},
]

# Thinking mode on (recommended; retain all reasoning content)
prompt_full = tokenizer.apply_chat_template(
    messages, tools=tools, tokenize=False,
    enable_thinking=True, add_generation_prompt=True, save_reasoning_content=True)

# Thinking mode off (more token-efficient)
prompt_no_think = tokenizer.apply_chat_template(
    messages, tools=tools, tokenize=False,
    enable_thinking=False, add_generation_prompt=True)

Raw data and verification notes

  • Official model card specifications: 1.6T total parameters and approximately 48B active parameters per token (HF metadata shows a model size of 1.8T, including N-gram Embedding and other components); native 1M context; MIT license.

  • Key features: LongCat Sparse Attention (three orthogonal optimizations, SI/CLI/HI), 3-step MTP speculative decoding, and 135B N-gram Embedding (n-gram size=5).

  • Community (r/LocalLLaMA) supplement: approximately 3.55TB for full BF16 weights and 2.05TB for FP8; the FP8/INT8 quantized model cards also provide vLLM/SGLang deployment commands.

  • Training data: 35T+ tokens and more than 50,000 Chinese-made compute chips, with no rollback (according to the official blog).

Scope and limitations

  • The self-hosting threshold is high: 3.55TB for full BF16 weights is impractical on personal devices; FP8 (2.05TB) still requires a multi-GPU cluster. The official deployment documentation targets multi-node SGLang (prefill-decode separation and KVP sharding).

  • The tool-calling format differs from standard OpenAI (arguments is a dict), so custom Agent integrations must adapt to this format; whether the official API and OpenRouter channel are fully consistent is not stated in the model card.

  • The model card benchmarks are official self-tests (using a unified harness); see the document in the reviews directory for third-party independent verification.

Curated by Tabbit

Prompt material is summarized from public sources and Tabbit editorial notes. Check the original licensing and intended use before copying it.

LongCat 2.0

Use in Tabbit

LongCat 2.0

Related prompts

MediaLongCat official API documentation site (longcat.chat)2026-07

LongCat-2.0 API Platform Quick Start (Official Quick Start + Chat Completions Reference + Pricing)

MediaLongCat official API documentation site (longcat.chat); X (@NousResearch official account as evidence for the free entry)2026-08-13

Hermes Agent Integration with LongCat-2.0 (Official Documentation + Nous Portal Free Entry)

MediaLongCat official API documentation site (longcat.chat)2026-06-30

Claude Code Integration with LongCat-2.0 (Official Documentation)

MediaLongCat official API documentation site (longcat.chat)2026-06-30

OpenClaw Integration with LongCat-2.0 (Official Documentation)

LongCat 2.0

Related reviews

MediaHugging Face (meituan-longcat/LongCat-2.0)2026-06-30

LongCat-2.0 Official Model Card: Specifications and Official Benchmarks (Including Comparison Tables with Gemini/GPT-5.5/Claude Opus)

MediaLongCat official blog (longcat.chat)2026-06-30

LongCat-2.0 Official Technical Blog: Architecture, Training on Domestic Compute, and Inference Deployment (Release Notes)

MediaOpenRouter (third-party model routing platform)2026-07-20

OpenRouter Channel Data: LongCat-2.0 Pricing, Measured Performance, and Third-Party Benchmarks (Artificial Analysis)

Mediaaiprofitboardroom.com (blog, part of Julian Goldie's AI Profit Boardroom community)2026-05-29

AI Profit Boardroom field test: LongCat 2.0 game-building test and same-task comparison with GLM 5.2