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
Download model.safetensors from tiny-random/longcat-flash-lite-sparse: direct link, hf CLI and curl.
- Browser
- Download file 23.5 MB
-
https://huggingface.co/tiny-random/longcat-flash-lite-sparse/resolve/main/model.safetensors
- Command line
-
hf download hf://tiny-random/longcat-flash-lite-sparse/model.safetensors
-
curl -L -o model.safetensors https://huggingface.co/tiny-random/longcat-flash-lite-sparse/resolve/main/model.safetensors
23.5 MB
- Xet hash:
- d50ea05ff3c7a96575d2140ee833a156a35006e24752e6feecf2516843de755a
- Size of remote file:
- 23.5 MB
- SHA256:
- b111d4db9736604ddb8056de5512cab0cd1dcb33179178c527f8b5399fe7078f
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.