Instructions to use meituan-longcat/LongCat-2.0-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use meituan-longcat/LongCat-2.0-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="meituan-longcat/LongCat-2.0-FP8") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import LongcatCausalLM model = LongcatCausalLM.from_pretrained("meituan-longcat/LongCat-2.0-FP8", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use meituan-longcat/LongCat-2.0-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "meituan-longcat/LongCat-2.0-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meituan-longcat/LongCat-2.0-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/meituan-longcat/LongCat-2.0-FP8
- SGLang
How to use meituan-longcat/LongCat-2.0-FP8 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "meituan-longcat/LongCat-2.0-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meituan-longcat/LongCat-2.0-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "meituan-longcat/LongCat-2.0-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meituan-longcat/LongCat-2.0-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use meituan-longcat/LongCat-2.0-FP8 with Docker Model Runner:
docker model run hf.co/meituan-longcat/LongCat-2.0-FP8
Update README.md
Browse files
README.md
CHANGED
|
@@ -32,13 +32,13 @@ tags:
|
|
| 32 |
<a href="https://discord.com/invite/jmuv5TQzKU" target="_blank" style="margin: 2px;">
|
| 33 |
<img alt="Discord" src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
| 34 |
</a>
|
| 35 |
-
<a href="https://x.com/Meituan_LongCat" target="
|
| 36 |
<img alt="Twitter Follow" src="https://img.shields.io/badge/Twitter-LongCat-white?logo=x&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
| 37 |
</a>
|
| 38 |
</div>
|
| 39 |
|
| 40 |
<div align="center" style="line-height: 1;">
|
| 41 |
-
<a href="https://huggingface.co/meituan-longcat/LongCat-2.0/blob/main/LICENSE" style="margin: 2px;">
|
| 42 |
<img alt="License" src="https://img.shields.io/badge/License-MIT-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>
|
| 43 |
</a>
|
| 44 |
</div>
|
|
|
|
| 32 |
<a href="https://discord.com/invite/jmuv5TQzKU" target="_blank" style="margin: 2px;">
|
| 33 |
<img alt="Discord" src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
| 34 |
</a>
|
| 35 |
+
<a href="https://x.com/Meituan_LongCat" target="_blank" style="margin: 2px;">
|
| 36 |
<img alt="Twitter Follow" src="https://img.shields.io/badge/Twitter-LongCat-white?logo=x&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
| 37 |
</a>
|
| 38 |
</div>
|
| 39 |
|
| 40 |
<div align="center" style="line-height: 1;">
|
| 41 |
+
<a href="https://huggingface.co/meituan-longcat/LongCat-2.0-FP8/blob/main/LICENSE" style="margin: 2px;">
|
| 42 |
<img alt="License" src="https://img.shields.io/badge/License-MIT-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>
|
| 43 |
</a>
|
| 44 |
</div>
|