{ "metadata": { "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.5" }, "orig_nbformat": 2, "kernelspec": { "name": "ml", "display_name": "ML", "language": "python" } }, "nbformat": 4, "nbformat_minor": 2, "cells": [ { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "10000" ] }, "metadata": {}, "execution_count": 4 } ], "source": [ "batch = tokenizer(lines, max_length=512, padding='max_length', truncation=True)\n", "len(batch)" ] } ] }