Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
context-segmentation — 面向本地 AI Agent 中长周期任务的多智能体自动化上下文管理 | Kitploit
工具/GitHubGitHub/9xeb/context-segmentation
CTF机器学习论文与研究学习与教育AI 安全实验室与实践
GitHub9xeb/context-segmentation

context-segmentation

面向本地 AI Agent 中长周期任务的多智能体自动化上下文管理

查看仓库
12个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

SLM 代理的上下文分割

这是科学论文中提出的解决方案的实现:Evaluating Context Segmentation in Locally Deployable SLMs for Cybersecurity CTF Tasks

设置

确保你已安装 Python 3.12.3+ 以及 Docker engine

Python 环境

root@kitploit:~
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -r requirements.txt

llama.cpp

使用 Vulkan 启动 llama.cpp

root@kitploit:~
docker compose --profile vulkan up -d

或使用 Cuda

root@kitploit:~
docker compose --profile cuda up -d

构建模型和容器

从 HuggingFace 下载你所需的大语言模型(LLM)的 GGUF 格式,然后构建 intercode-ctf 容器。

root@kitploit:~
docker exec -it llamacpp ./llama-cli -hf unsloth/gemma-4-E2B-it-GGUF:Q4_K_M  # or any other GGUF model on HF
docker build -t intercode-ctf -f intercode/docker/ctf.Dockerfile ./intercode
docker restart llamacpp

运行基准测试

运行 N 次某种策略(plain 或 explorer)的基准测试

这会将结果累积到 $MODEL_NAME.$STRATEGY.bench 文件中

root@kitploit:~
OPENAI_API_BASE=http://127.0.0.1:8080/ \
OPENAI_API_KEY=1234 \ #Mock key (we run locally)
python3 intercode_test.py \
  --model unsloth/gemma-4-E2B-it-GGUF:Q4_K_M \ #HF model
  --strategy plain \ #plain or explorer
  --count 1 #N

查看基准测试结果

root@kitploit:~
jq '.' gemma-4-E2b-it-GGUF:Q4_K_M.plain.bench

备注

intercode 目录中的代码取自 princeton-nlp/intercode,并经过调整以适用于我们的设置。

下载工具