Text Generation
Transformers
Safetensors
qwen3
context-management
tool-use
agent
conversational
text-generation-inference
Instructions to use tencent/ContextPilot-14B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tencent/ContextPilot-14B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tencent/ContextPilot-14B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tencent/ContextPilot-14B") model = AutoModelForCausalLM.from_pretrained("tencent/ContextPilot-14B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tencent/ContextPilot-14B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tencent/ContextPilot-14B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/ContextPilot-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tencent/ContextPilot-14B
- SGLang
How to use tencent/ContextPilot-14B 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 "tencent/ContextPilot-14B" \ --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": "tencent/ContextPilot-14B", "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 "tencent/ContextPilot-14B" \ --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": "tencent/ContextPilot-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tencent/ContextPilot-14B with Docker Model Runner:
docker model run hf.co/tencent/ContextPilot-14B
Update README.md
Browse files
README.md
CHANGED
|
@@ -13,6 +13,39 @@ tags:
|
|
| 13 |
|
| 14 |
**ContextPilot: Teaching Agents for Proactive Context Management via Fine-grained RL**
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
ContextPilot-14B is the Qwen3-14B checkpoint of **ContextPilot**, a proactive context-management framework for long-horizon language-model agents. It teaches agents to plan, maintain long-term memory, and offload less useful context while they continue reasoning and using tools. For more details, see our [paper]() and [code repository](https://github.com/Tencent/ContextPilot).
|
| 17 |
|
| 18 |

|
|
|
|
| 13 |
|
| 14 |
**ContextPilot: Teaching Agents for Proactive Context Management via Fine-grained RL**
|
| 15 |
|
| 16 |
+
<p align="center">
|
| 17 |
+
<a href="https://github.com/Tencent/ContextPilot">
|
| 18 |
+
<img
|
| 19 |
+
src="https://img.shields.io/badge/ContextPilot-GitHub-blue?logo=github"
|
| 20 |
+
alt="GitHub Repo"
|
| 21 |
+
/>
|
| 22 |
+
</a>
|
| 23 |
+
<a href="https://tencent.github.io/ContextPilot/">
|
| 24 |
+
<img
|
| 25 |
+
src="https://img.shields.io/badge/ContextPilot-Live_Demo-ff725e?logo=githubpages&logoColor=white"
|
| 26 |
+
alt="ContextPilot Live Demo"
|
| 27 |
+
/>
|
| 28 |
+
</a>
|
| 29 |
+
<a href="">
|
| 30 |
+
<img
|
| 31 |
+
src="https://img.shields.io/badge/ContextPilot-Paper-red?logo=arxiv&logoColor=red"
|
| 32 |
+
alt="Paper"
|
| 33 |
+
/>
|
| 34 |
+
</a>
|
| 35 |
+
<a href="https://huggingface.co/collections/panzs19/contextpilot">
|
| 36 |
+
<img
|
| 37 |
+
src="https://img.shields.io/badge/ContextPilot-Models-yellow?logo=huggingface&logoColor=yellow"
|
| 38 |
+
alt="Hugging Face Models"
|
| 39 |
+
/>
|
| 40 |
+
</a>
|
| 41 |
+
<a href="https://github.com/Tencent/ContextPilot/tree/main#setup">
|
| 42 |
+
<img
|
| 43 |
+
src="https://img.shields.io/badge/ContextPilot-Quickstart-purple?logo=rocket&logoColor=purple"
|
| 44 |
+
alt="Quickstart"
|
| 45 |
+
/>
|
| 46 |
+
</a>
|
| 47 |
+
</p>
|
| 48 |
+
|
| 49 |
ContextPilot-14B is the Qwen3-14B checkpoint of **ContextPilot**, a proactive context-management framework for long-horizon language-model agents. It teaches agents to plan, maintain long-term memory, and offload less useful context while they continue reasoning and using tools. For more details, see our [paper]() and [code repository](https://github.com/Tencent/ContextPilot).
|
| 50 |
|
| 51 |

|