Concrete v2.9 版本发布,增强了 TFHE-rs 的互操作性,扩展了对有符号整数的支持并完全支持张量的序列化和反序列化,支持 Python 3.12,包括 CPU 和 GPU wheels,并修复了一些 Bug,优化了 GPU 内核,提高了 FHE 的评估性能。
Concrete 团队正在继续努力,以使 TFHE-rs 和 Concrete 之间的 互操作性 更加强大和功能丰富,并且这种努力可以在前端和后端看到。
我们很高兴地宣布,我们已经添加了对 Python 3.12 的支持,该支持可用于开发和生产环境。
你可以在完整的 发行说明 中找到所有详细信息、性能改进和错误修复。
Concrete v2.8 引入了一种工具,可以将 TFHE-rs 密文导入 Concrete,从而可以使用 Concrete 编译器和运行时进行计算,然后将结果导出回 TFHE-rs 生态系统。但是,此初始支持仅限于有符号整数,并且仅提供对张量的部分支持。
在 Concrete v2.9 中,对有符号整数的支持得到了扩展,如下面的示例代码片段所示。此外,桥接工具现在完全支持张量的序列化和反序列化,从而可以实现更复杂的用例,例如运行线性机器学习模型。
import concrete.fhe as fhe
from concrete.fhe import tfhers
## The tfhers signed integer type
# tfhers 有符号整数类型
tfhers_type = tfhers.int8_2_2(
tfhers.CryptoParams(
909,
1,
4096,
15,
2,
0,
2.168404344971009e-19,
tfhers.EncryptionKeyChoice.BIG,
)
)
## The concrete function with conversion from tfhers integers to concrete
# 具有从 tfhers 整数到 concrete 转换的 concrete 函数
@fhe.compiler({"x": "encrypted", "y": "encrypted"})
def add(x, y):
x = tfhers.to_native(x)
y = tfhers.to_native(y)
return tfhers.from_native(x + y, tfhers_type)
## Define the inpuset with signed integers
# 使用有符号整数定义输入集
inputset = [\
(tfhers.TFHERSInteger(tfhers_type, -128), tfhers.TFHERSInteger(tfhers_type, 127)),\
(tfhers.TFHERSInteger(tfhers_type, 0), tfhers.TFHERSInteger(tfhers_type, -128))\
]
circuit = add.compile(inputset, verbose=True)
## Run the fhe evaluation by encoding/decodinhg arguments/result from/to tfhers signed integer type
# 通过从/向 tfhers 有符号整数类型编码/解码参数/结果来运行 fhe 评估
print(
tfhers_type.decode(
circuit.encrypt_run_decrypt(tfhers_type.encode(1), tfhers_type.encode(-1))
)
)
Concrete 在 公共 zama pypi 和官方 pypi.org 存储库 上针对 Linux 和 Mac OS 平台的 Python 3.8 到 3.12 发布,包括 CPU 和 GPU wheels。
Concrete v2.9 包括各种优化和错误修复。值得注意的是,现在在 TFHE-rs GitHub 存储库下开发的 GPU 内核已得到更新。在我们的实验中,这些更新导致大型 FHE 评估的性能略有提高。
这些改进不需要更改 API,使你可以无需额外工作即可利用这些增强功能。尝试一下并与我们分享你的反馈!有关更多详细信息,请参阅 完整发行说明。
感谢你的持续支持和反馈。我们将继续致力于使 FHE 对每个人都更易于访问和高效。
- 原文链接: zama.ai/post/concrete-v2...
- 登链社区 AI 助手,为大家转译优秀英文文章,如有翻译不通的地方,还请包涵~
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!