Modelo LLMs & Texto

meituan-longcat/LongCat-2.0

Modelo de geração de texto — 2.2 mil downloads e 188 curtidas no Hugging Face.

Hugging Face · Modelos ·meituan-longcat · ·↓ 2174 ·♥ 188

O modelo meituan-longcat/LongCat-2.0 aparece entre os mais comentados do Hugging Face — um termômetro do que a comunidade está realmente usando agora na tarefa de geração de texto.

Ficha técnica

  • Tarefa: geração de texto
  • Biblioteca: LongCat-2.0
  • Formatos: safetensors
  • Licença: MIT
  • Downloads: 2.2 mil · Curtidas: 188

Como rodar localmente

Carregue com a transformers usando o template de chat:

pip install -U transformers accelerate torch

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "meituan-longcat/LongCat-2.0"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id, torch_dtype="auto", device_map="auto"
)

msgs = [{"role": "user", "content": "Explique o que é entropia."}]
inputs = tok.apply_chat_template(
    msgs, add_generation_prompt=True, return_tensors="pt"
).to(model.device)

out = model.generate(inputs, max_new_tokens=256)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))

Para servir como API (recomendado para modelos grandes), use o vLLM:

pip install vllm
vllm serve meituan-longcat/LongCat-2.0

Tags

LongCat-2.0 safetensors transformers text-generation conversational

Abrir o modelo no Hugging Face →

compartilhar: