0


SecGPT 全球首个网络安全开源大模型且可以在CPU上运行的网络安全大模型

SecGPT 网络安全大模型

探索使用网络安全知识训练大模型,能达到怎样的能力边界。

SecGPT的愿景是将人工智能技术引入网络安全领域,以提高网络防御的效率和效果。其使命是推动网络安全智能化,为社会提供更安全的数字生活环境。

SecGPT可以作为基座安全模型,用于探索各种网络安全任务。以下是对SecGPT在网络安全任务中可能应用的进一步探讨

如何在CPU上运行

下载model

huggingface-cli.exe download --resume-download clouditera/secgpt-mini --local-dir d:/llm/secgpt-mini

修改代码

如果不修改,则在推理LLM时报:

The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's attention_mask to obtain reliable results. Setting pad_token_id to eos_token_id :151643 for open-end generation.

增加了如下2行:

  • attention_mask = torch.ones(input_ids.shape,dtype=torch.long,device=device)
  • attention_mask=attention_mask,

本文转载自: https://blog.csdn.net/penriver/article/details/138388202
版权归原作者 enjoy编程 所有, 如有侵权,请联系我们删除。

“SecGPT 全球首个网络安全开源大模型且可以在CPU上运行的网络安全大模型”的评论:

还没有评论