Course Objective & Scope
A poorly chosen serialization format can cause version mismatches, slow loading and even arbitrary code execution vulnerabilities. The course compares the security risks of pickle and joblib with PyTorch state_dict and TorchScript, TensorFlow SavedModel, ONNX, Hugging Face safetensors and GGUF for LLMs.
In the labs the same model is converted to several formats, the numerical equivalence of outputs is tested, and the model is packaged with its dependencies using MLflow. Participants leave with a format selection guide and a model artefact checklist for the organisation.
Who Should Attend?
- ML engineers moving models between environments
- Data scientists managing model artefacts
- Platform and security teams responsible for model file safety
- Prerequisite: experience training models with PyTorch, TensorFlow or scikit-learn
Key Takeaways
- Choose the right serialization format for a use case
- Recognise and mitigate the security risks of pickle-based files
- Convert a model to TorchScript, SavedModel and ONNX
- Verify numerical equivalence after conversion
- Package a model with its dependencies and signature using MLflow
Curriculum
Why Serialization Matters
- Portability, load time and version compatibility
- Weights versus the full model graph
pickle, joblib and Security Risks
- Arbitrary code execution risk and file scanning
- Safe weight storage with safetensors
Framework Formats: TorchScript and SavedModel
- torch.jit.trace/script and torch.export
- SavedModel signatures and the Keras format
Portable Formats: ONNX and GGUF
- ONNX export and opset compatibility
- GGUF and quantization options for LLMs
Packaging and Validation
- MLflow model signature and dependency definition
- Output equivalence tests after conversion
Other Courses in This Category
-
Model Serving Architectures
Model serving architecture patterns: embedded models, model-as-a-service, serverless, edge, multi-model and LLM gateway designs, and how platforms like KServe, Triton, Ray Serve and vLLM fit in. For architects and senior ML engineers.
- Live Course
- 5 modules
-
Latency, Throughput and Cost Trade-offs in Model Serving
Balancing p95/p99 latency, throughput and unit cost in model serving: dynamic batching, quantization, caching, GPU/CPU selection and load-testing optimisation. For ML and platform engineers building scalable, cost-effective inference infrastructure.
- Live Course
- 5 modules
-
Security for Model Serving and Inference APIs
End-to-end security for inference services: mTLS, OAuth2/JWT, rate limiting, safe serialization, container hardening, defence against model extraction/adversarial attacks and data privacy. For ML, platform and AppSec engineers.
- Live Course
- 5 modules
-
TensorFlow Model Serving Fundamentals
Exporting TensorFlow and Keras models as SavedModel, defining SignatureDefs and serving them over REST and gRPC with TensorFlow Serving. For data scientists and ML engineers starting to deploy TensorFlow models.
- Live Course
- 5 modules
-
Advanced TensorFlow Model Serving and Optimisation
Multi-model configurations, dynamic batching, XLA/TensorRT and mixed-precision acceleration, GPU memory tuning, Prometheus metrics and custom servables in TensorFlow Serving. For engineers operating high-traffic TF services.
- Live Course
- 5 modules
-
Deploying TensorFlow Serving on Docker and Kubernetes
Operating TensorFlow Serving at scale on Docker and Kubernetes: pulling models from object storage, GPU scheduling, readiness/liveness probes, HPA/KEDA autoscaling and KServe integration. For MLOps and platform engineers.
- Live Course
- 5 modules
Get in touch