Instructions to use liufanfanlff/C3-Context-Cascade-Compression with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use liufanfanlff/C3-Context-Cascade-Compression with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="liufanfanlff/C3-Context-Cascade-Compression", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("liufanfanlff/C3-Context-Cascade-Compression", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use liufanfanlff/C3-Context-Cascade-Compression with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "liufanfanlff/C3-Context-Cascade-Compression" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "liufanfanlff/C3-Context-Cascade-Compression", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/liufanfanlff/C3-Context-Cascade-Compression
- SGLang
How to use liufanfanlff/C3-Context-Cascade-Compression 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 "liufanfanlff/C3-Context-Cascade-Compression" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "liufanfanlff/C3-Context-Cascade-Compression", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "liufanfanlff/C3-Context-Cascade-Compression" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "liufanfanlff/C3-Context-Cascade-Compression", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use liufanfanlff/C3-Context-Cascade-Compression with Docker Model Runner:
docker model run hf.co/liufanfanlff/C3-Context-Cascade-Compression
Update model card: add pipeline, library tags, correct license, and fix paper link
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
---
|
| 2 |
-
license:
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
---
|
| 7 |
-
<h3><a href="">Context Cascade Compression: Exploring the Upper Limits of Text Compression</a></h3>
|
| 8 |
|
| 9 |
|
| 10 |
[🌟GitHub](https://github.com/liufanfanlff/C3-Context-Cascade-Compression) | [📜Paper](https://arxiv.org/abs/2511.15244)
|
|
@@ -60,3 +60,4 @@ Don't hesitate to contact me by email, liufanfan19@mails.ucas.ac.cn, if you have
|
|
| 60 |
journal={arXiv preprint arXiv:2511.15244},
|
| 61 |
year={2025}
|
| 62 |
}
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pipeline_tag: text-generation
|
| 4 |
+
library_name: transformers
|
| 5 |
---
|
| 6 |
+
|
| 7 |
+
### <a href="https://huggingface.co/papers/2511.15244">Context Cascade Compression: Exploring the Upper Limits of Text Compression</a></h3>
|
|
|
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
[🌟GitHub](https://github.com/liufanfanlff/C3-Context-Cascade-Compression) | [📜Paper](https://arxiv.org/abs/2511.15244)
|
|
|
|
| 60 |
journal={arXiv preprint arXiv:2511.15244},
|
| 61 |
year={2025}
|
| 62 |
}
|
| 63 |
+
```
|