Converting sentence-transformers models to a single tensorflow graph
summary
Converts sentence-transformers (example all-miniLM-L6-v2) into a single TensorFlow SavedModel that accepts raw strings, folding tokenizer, padding, model and postprocessing into one graph. Uses tensorflow-text, Hugging Face sentence-transformers/Transformers APIs and Keras/AutoModel to reproduce embeddings (transcript shows 368‑dim for that model). Code publishes as notebooks and a GitHub package (tensorflow_exporter); unit tests compare Python outputs to the exported graph and saved models serve identical predictions.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 2:15Motivation for TF exporter
- 7:13Sentence Transformers architecture
- 12:57Implementing TF exporter
- 18:42Demonstrating TF exporter
- 20:27Testing and validation
related talks
19mWrite Once, Run Everywhere with Pytorch Transformers
25mTransformers: Standardizing Model Definitions Across the PyTorch Ecosystem
20mPyTorch x Transformers Journey
01h 26mFrom RNNs to Transformers: A Journey through Language Modeling
01h 26mTransformers Inside Out (Parts 1 & 2)
57mMachine Learning with JavaScript
38mThe Hitchhiker's Guide to Tensorflow: from Tensors to running models in production
01h 09mReinventing Machine Learning with Transformers and Hugging Face
