chenleixu
|
1b5380ce24
|
fix(plugin): 拦截响应补 5 字以内理由 reason 字段并缀入 message
- 新增 CATEGORY_REASON 映射与 reason_for(),把模型类别翻成 暴力/违法/色情/隐私 等短理由
- 守卫模型只报 Safety 不报类别时,按输入/输出位置兜底为 输入违规/输出违规
- 400 响应 error 新增 reason 扩展字段,同时以 [理由] 缀在 message 末尾,客户端忽略亦兼容
- 503 复核失败场景给固定理由 复核失败
|
2026-11-29 16:30:45 +00:00 |
|
chenleixu
|
dce015f5f6
|
docs: 交付包重建,更新镜像 sha256(98d5112f)与层摘要(a4e44a59)
|
2026-11-27 18:23:35 +00:00 |
|
chenleixu
|
9e710b15be
|
models: 权重移出版本控制(17 GiB 超 LFS 2 GiB 配额),保留配置与分词器
- git rm --cached 7 个 safetensors(5 个 8B 分片 + 0.6B + LoRA adapter)
- .gitignore 增加 models/**/*.safetensors 与 *.bin
- 保留 config/generation_config/tokenizer_config/special_tokens_map 等小文件(22 个,22 MB)
- 本地权重不删,vLLM 仍从 models/ 加载
|
2026-11-27 18:21:42 +00:00 |
|
chenleixu
|
b82e44ec32
|
feat: Docker 打包、交付链路与命名脱敏
镜像与构建
- 六阶段 Dockerfile(base/wheels/deps/manifest/core|guard),core 不含 torch
- 构建期自证:gen_manifest --strict 拦未登记模块,core 阶段重算 sha256
- compose 四服务 host 网络(llm.url 强制回环),config.core/local 可挂载覆盖
无 docker 环境的四段链路
- pull_oci_image.py 直拉 OCI 镜像 rootfs(纯标准库,走加速器)
- replay_image_build.sh 按 stage chroot 重放 Dockerfile
- run_image_chroot.sh 等价 docker run(uid 10001 + 入口 + host 网络)
- pack_image.py 封成 docker save 格式包,自带 diff_id 校验
交付
- make_package.sh 生成自包含目录:镜像包 + 溯源清单 + 构建输入 + 脚本 + 源码快照
- 文档:从零复现指南、docker 打包方案、镜像构建限制与替代方案、交付包 README
命名
- Qwen 品牌名统一替换为 large_model / small_model / large_model_guard,
覆盖 vLLM 服务名、模型目录、配置、脚本、测试与文档
- 模型架构字段(architectures / model_type / tokenizer_class)属上游定义,
改名会导致加载失败,保留原值;check_local_model.py 的架构判断同理
验证:smoke 6/6;test.py 20 通过 0 失败 1 警告;gen --strict 67 文件 / 22 进镜像
|
2026-11-27 18:20:16 +00:00 |
|