{ "cells": [ { "cell_type": "code", "execution_count": 11, "source": [ "from modeling_hybrid_clip import FlaxHybridCLIP\n", "model = FlaxHybridCLIP.from_pretrained(\"output\")\n", "# model.save_pretrained(\"./\")" ], "outputs": [], "metadata": {} }, { "cell_type": "code", "execution_count": 36, "source": [ "from transformers.modeling_flax_pytorch_utils import load_flax_checkpoint_in_pytorch_model\n", "from modeling_hybrid_clip import FlaxHybridCLIP\n", "\n", "model = FlaxHybridCLIP.from_pretrained(\"output\")\n" ], "outputs": [], "metadata": {} }, { "cell_type": "code", "execution_count": null, "source": [ "load_flax_checkpoint_in_pytorch_model(model, \"./flax_model.msgpack\")\n", "model.save_pretrained(\"./\")" ], "outputs": [], "metadata": {} }, { "cell_type": "code", "execution_count": 10, "source": [ "model.save_pretrained(\"./test\",)" ], "outputs": [ { "output_type": "stream", "name": "stderr", "text": [ "tcmalloc: large alloc 1284136960 bytes == 0x133cb8000 @ 0x7f0ad1bd7680 0x7f0ad1bf7bdd 0x7f07e8e4420d 0x7f07e8e52340 0x7f07e8e51e87 0x7f07e8e51e87 0x7f07e8e51e87 0x7f07e8e51e87 0x7f07e8e51e87 0x7f07e8e51e87 0x7f07e8e51e87 0x7f07e8e51e87 0x7f07e8e4dbd3 0x7f07e8e4e1fe 0x504d56 0x56acb6 0x568d9a 0x5f5b33 0x56bc9b 0x5f5956 0x56aadf 0x5f5956 0x56aadf 0x568d9a 0x5f5b33 0x56acb6 0x568d9a 0x68cdc7 0x5ff5d4 0x5c3cb0 0x56aadf\n" ] } ], "metadata": {} } ], "metadata": { "orig_nbformat": 4, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 2 }