引導式測驗 · 中等 等級

模型序列化格式測驗

測試序列化可移植性、pickle 安全性、僅張量權重檔案以及跨運行時導出模型的驗證。

相關引導路徑模型序列化格式
問題 1 的 8

為什麼 Python 的 pickle 格式被認為是模型的安全風險?

預覽每個問題8 問題

當您參加測驗時,就會出現答案和解釋。

  1. 為什麼 Python 的 pickle 格式被認為是模型的安全風險?
    • 載入它可以執行文件中嵌入的任意程式碼
    • 它壓縮檔案太多
    • 只在周末有效
    • 它刪除了原始模型
  2. ONNX 格式的主要優點是什麼?
    • 這是盡可能最小的格式
    • 它允許在一個框架中訓練的模型在許多其他運行時和語言中運行
    • 只能在PyTorch中打開
    • 它會自動提高準確性
  3. 為什麼安全張量在共享模型權重方面變得流行?
    • 為了方便起見,它在加載時運行程式碼
    • 這是最古老的可用格式
    • 它僅安全地存儲張量數據,具有快速內存可映射加載且無需執行代碼
    • 它只儲存模型精度
  4. GGUF 與哪個用例最相關?
    • 儲存電子表格
    • 加密電子郵件
    • 在雲端從頭開始訓練模型
    • 在本地硬體上高效運行量化大語言模型
  5. 像 ONNX 這樣的交換格式主要儲存什麼?
    • 標準化計算圖和模型的權重
    • 培訓過程影片
    • 僅訓練資料集
    • 開發者原始碼註釋
  6. When exporting a Keras 3 model for TensorFlow serving, which directory format can model.export produce?
    • GGUF
    • 保存的模型
    • CSV
    • A pickle file containing the entire Python application
  7. After exporting a model to ONNX for a new runtime, what should the team check?
    • That the ONNX file guarantees identical speed on every device
    • That the export automatically includes the original training data
    • That supported operators run and outputs match the reference model on representative inputs
    • That no preprocessing code is needed
  8. Why can a state-dictionary checkpoint be preferable to loading a whole Python object from an untrusted file?
    • It guarantees the model architecture is embedded
    • It makes every checkpoint safe regardless of loader and version
    • It automatically converts the model to ONNX
    • It can load tensor state without reconstructing arbitrary pickled Python objects, subject to the loader’s security settings