arXiv:2512.04580cs.CRcs.AI2025-12

为大模型安全分发设计轻量加密格式,支持权限控制与无缝部署。

CryptoTensors: A Light-Weight Large Language Model File Format for Highly-Secure Model Distribution

  • 基于Safetensors扩展,实现张量级加密与访问策略嵌入。
  • 支持懒加载与部分反序列化,解密透明且运行开销极低。
  • 适合需保护模型知识产权的医疗、金融等敏感领域使用。

为提升大语言模型在医疗、法律、金融等特定领域的性能,敏感数据被用于私有化定制或微调模型。此类定制后的模型被视为个人隐私资产或企业知识产权。因此,在部署和分发过程中保护模型权重并维持严格保密性至关重要。然而,现有模型格式与部署框架普遍缺乏内置的机密性、访问控制或可信硬件集成支持。当前的安全方法要么依赖计算成本高昂的密码技术,要么依赖受控私有基础设施。尽管在特定场景有效,但难以大规模部署。本文提出CryptoTensors,一种面向机密大模型分发的轻量级文件格式。作为广泛采用的Safetensors格式的扩展,CryptoTensors融合张量级加密与嵌入式访问控制策略,同时保留延迟加载与部分反序列化等关键特性。它支持透明解密与自动密钥管理,可灵活授权并实现安全执行,开销极小。我们实现了一个原型库,在序列化与运行时场景下进行基准测试,并验证其与Hugging Face Transformers和vLLM等推理框架的兼容性。结果表明,CryptoTensors是真实世界中高效、易用且适用于广泛部署的模型权重保护方案。

原文摘要 · Abstract (English)

To enhance the performance of large language models (LLMs) in various domain-specific applications, sensitive data such as healthcare, law, and finance are being used to privately customize or fine-tune these models. Such privately adapted LLMs are regarded as either personal privacy assets or corporate intellectual property. Therefore, protecting model weights and maintaining strict confidentiality during deployment and distribution have become critically important. However, existing model formats and deployment frameworks provide little to no built-in support for confidentiality, access control, or secure integration with trusted hardware. Current methods for securing model deployment either rely on computationally expensive cryptographic techniques or tightly controlled private infrastructure. Although these approaches can be effective in specific scenarios, they are difficult and costly for widespread deployment. In this paper, we introduce CryptoTensors, a secure and format-compatible file structure for confidential LLM distribution. Built as an extension to the widely adopted Safetensors format, CryptoTensors incorporates tensor-level encryption and embedded access control policies, while preserving critical features such as lazy loading and partial deserialization. It enables transparent decryption and automated key management, supporting flexible licensing and secure model execution with minimal overhead. We implement a proof-of-concept library, benchmark its performance across serialization and runtime scenarios, and validate its compatibility with existing inference frameworks, including Hugging Face Transformers and vLLM. Our results highlight CryptoTensors as a light-weight, efficient, and developer-friendly solution for safeguarding LLM weights in real-world and widespread deployments.

大模型安全加密格式模型分发访问控制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。