Instructions to use fcyp/RCC_Ins_Reconstruction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fcyp/RCC_Ins_Reconstruction with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="fcyp/RCC_Ins_Reconstruction")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("fcyp/RCC_Ins_Reconstruction") model = AutoModelForCausalLM.from_pretrained("fcyp/RCC_Ins_Reconstruction", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use fcyp/RCC_Ins_Reconstruction with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fcyp/RCC_Ins_Reconstruction" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fcyp/RCC_Ins_Reconstruction", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/fcyp/RCC_Ins_Reconstruction
- SGLang
How to use fcyp/RCC_Ins_Reconstruction 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 "fcyp/RCC_Ins_Reconstruction" \ --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": "fcyp/RCC_Ins_Reconstruction", "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 "fcyp/RCC_Ins_Reconstruction" \ --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": "fcyp/RCC_Ins_Reconstruction", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use fcyp/RCC_Ins_Reconstruction with Docker Model Runner:
docker model run hf.co/fcyp/RCC_Ins_Reconstruction
Update README.md
Browse files
README.md
CHANGED
|
@@ -4,7 +4,7 @@ license: apache-2.0
|
|
| 4 |
|
| 5 |
|
| 6 |
# Recurrent Context Compression: Efficiently Expanding the Context Window of LLM
|
| 7 |
-
[[paper]()]
|
| 8 |
|
| 9 |
|
| 10 |
## TL;DR
|
|
@@ -18,7 +18,7 @@ Due to the limitations of the fine-tuning dataset, the model currently only supp
|
|
| 18 |
|
| 19 |
For the latest information, please follow us on [github](https://github.com/WUHU-G/RCC_Transformer/tree/main)
|
| 20 |
|
| 21 |
-
- [2024/6/10] We released the RCC-Pythia-1.4b model and the [paper]()
|
| 22 |
|
| 23 |
## Model Overview
|
| 24 |
RCC employs an encoder-decoder framework, with both the encoder and decoder weights initialized from a large language model. The trained encoder compresses fixed-length context information into a more compact form, applicable to both instructions and regular text. When context exceeds the fixed length, the encoder performs cyclic compression and concatenates all compressed feature vectors. The decoder uses these compressed vectors as input for final text generation.
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
# Recurrent Context Compression: Efficiently Expanding the Context Window of LLM
|
| 7 |
+
[[paper](https://arxiv.org/abs/2406.06110)]
|
| 8 |
|
| 9 |
|
| 10 |
## TL;DR
|
|
|
|
| 18 |
|
| 19 |
For the latest information, please follow us on [github](https://github.com/WUHU-G/RCC_Transformer/tree/main)
|
| 20 |
|
| 21 |
+
- [2024/6/10] We released the RCC-Pythia-1.4b model and the [paper](https://arxiv.org/abs/2406.06110)
|
| 22 |
|
| 23 |
## Model Overview
|
| 24 |
RCC employs an encoder-decoder framework, with both the encoder and decoder weights initialized from a large language model. The trained encoder compresses fixed-length context information into a more compact form, applicable to both instructions and regular text. When context exceeds the fixed length, the encoder performs cyclic compression and concatenates all compressed feature vectors. The decoder uses these compressed vectors as input for final text generation.
|