Instructions to use tiny-random/longcat-flash-lite-sparse with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiny-random/longcat-flash-lite-sparse with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tiny-random/longcat-flash-lite-sparse") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import LongcatCausalLM model = LongcatCausalLM.from_pretrained("tiny-random/longcat-flash-lite-sparse", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tiny-random/longcat-flash-lite-sparse with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tiny-random/longcat-flash-lite-sparse" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiny-random/longcat-flash-lite-sparse", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tiny-random/longcat-flash-lite-sparse
- SGLang
How to use tiny-random/longcat-flash-lite-sparse 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 "tiny-random/longcat-flash-lite-sparse" \ --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": "tiny-random/longcat-flash-lite-sparse", "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 "tiny-random/longcat-flash-lite-sparse" \ --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": "tiny-random/longcat-flash-lite-sparse", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tiny-random/longcat-flash-lite-sparse with Docker Model Runner:
docker model run hf.co/tiny-random/longcat-flash-lite-sparse
Upload folder using huggingface_hub
Browse files- .meta/model.log +1 -0
- README.md +7 -3
.meta/model.log
CHANGED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
LongcatCausalLM (direct SGLang-schema tiny checkpoint): 4 dual-sublayer LongCat Flash decoder layers with shortcut MoE (32 routed + 128 identity zero experts, top-k 12), compressed MLA (q_lora_rank=32, kv_lora_rank=32, 32 heads, nope 32 / rope 64 / value 32), LSA indexers (16 heads, head dim 128, CLI factor 2), two over-embedding windows, one MTP/NextN draft layer, 131,072-row untied token tables.
|
README.md
CHANGED
|
@@ -25,11 +25,15 @@ This is a randomly initialized tiny model based on [meituan-longcat/LongCat-Flas
|
|
| 25 |
| Routers / correction bias | FP32 | Same |
|
| 26 |
| Stored precision | BF16 | Same |
|
| 27 |
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
### Example usage
|
| 31 |
|
| 32 |
-
#### SGLang serving (
|
| 33 |
|
| 34 |
LSA is implemented in SGLang (main branch; the LongCat Sparse adaptation landed via PR #32918). The checkpoint keeps the source's LongcatCausalLM architecture and serves text only, like the upstream deployment guide.
|
| 35 |
|
|
@@ -59,6 +63,6 @@ curl http://127.0.0.1:30000/v1/chat/completions \
|
|
| 59 |
|
| 60 |
### Change log
|
| 61 |
|
| 62 |
-
- 2026-11-03: Initial version
|
| 63 |
|
| 64 |
*This repo is generated by GPT-6.1-Sol.*
|
|
|
|
| 25 |
| Routers / correction bias | FP32 | Same |
|
| 26 |
| Stored precision | BF16 | Same |
|
| 27 |
|
| 28 |
+
SGLang-only: the source ships no Transformers code and the tensors follow SGLang's `longcat_flash` schema. The n-gram hash modulus is internal embedding machinery, so it follows [tiny-random/longcat-flash-lite](https://huggingface.co/tiny-random/longcat-flash-lite).
|
| 29 |
+
|
| 30 |
+
| File path | Size |
|
| 31 |
+
|------|------|
|
| 32 |
+
| model.safetensors | 23.5MB |
|
| 33 |
|
| 34 |
### Example usage
|
| 35 |
|
| 36 |
+
#### SGLang serving (unverified)
|
| 37 |
|
| 38 |
LSA is implemented in SGLang (main branch; the LongCat Sparse adaptation landed via PR #32918). The checkpoint keeps the source's LongcatCausalLM architecture and serves text only, like the upstream deployment guide.
|
| 39 |
|
|
|
|
| 63 |
|
| 64 |
### Change log
|
| 65 |
|
| 66 |
+
- 2026-11-03: Initial version: direct SGLang-schema LSA checkpoint (shortcut-MoE, CLI indexers, ngram over-embeddings and one NextN MTP draft).
|
| 67 |
|
| 68 |
*This repo is generated by GPT-6.1-Sol.*
|