Guide-linked quiz · Medium Level

Model Serialization Formats Quiz

Tests serialization portability, pickle safety, tensor-only weight files, and verification of exported models across runtimes.

Related guide pathsModel Serialization Formats
Question 1 of 8

Why is Python's pickle format considered a security risk for models?

Preview every question8 questions

Answers and explanations appear as you take the quiz.

  1. Why is Python's pickle format considered a security risk for models?
    • Loading it can execute arbitrary code embedded in the file
    • It compresses files too much
    • It only works on weekends
    • It deletes the original model
  2. What is the main advantage of the ONNX format?
    • It is the smallest possible format
    • It lets a model trained in one framework run in many other runtimes and languages
    • It can only be opened in PyTorch
    • It automatically improves accuracy
  3. Why has safetensors become popular for sharing model weights?
    • It runs code on load for convenience
    • It is the oldest format available
    • It stores only tensor data safely, with fast memory-mappable loading and no code execution
    • It only stores model accuracy
  4. GGUF is most associated with which use case?
    • Storing spreadsheets
    • Encrypting emails
    • Training models from scratch in the cloud
    • Running quantized large language models efficiently on local hardware
  5. What does an interchange format like ONNX primarily store?
    • A standardized computational graph and the model's weights
    • A video of the training process
    • Only the training dataset
    • The developer's source code comments
  6. When exporting a Keras 3 model for TensorFlow serving, which directory format can model.export produce?
    • GGUF
    • SavedModel
    • 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

Keep testing yourself

More quizzes picked for your level.

View all quizzes