Created using Colaboratory

pull/17/head
Maxime Labonne 10 months ago
parent 139e343da2
commit 20f0fc67e9

@ -5,7 +5,7 @@
"colab": { "colab": {
"provenance": [], "provenance": [],
"gpuType": "T4", "gpuType": "T4",
"authorship_tag": "ABX9TyP56xEUptBvw5HFOchVYu+H", "authorship_tag": "ABX9TyMEXNClg5PlR3HYYJSGabFJ",
"include_colab_link": true "include_colab_link": true
}, },
"kernelspec": { "kernelspec": {
@ -1066,7 +1066,7 @@
"id": "fD24jJxq7t3k", "id": "fD24jJxq7t3k",
"outputId": "94954934-0829-44e9-a5e5-262c17e162d0" "outputId": "94954934-0829-44e9-a5e5-262c17e162d0"
}, },
"execution_count": 51, "execution_count": null,
"outputs": [ "outputs": [
{ {
"output_type": "stream", "output_type": "stream",
@ -1722,7 +1722,7 @@
"id": "vNPL9WYg78l-", "id": "vNPL9WYg78l-",
"outputId": "3c3e7d2f-f0de-429d-fd97-dab480bc514a" "outputId": "3c3e7d2f-f0de-429d-fd97-dab480bc514a"
}, },
"execution_count": 54, "execution_count": null,
"outputs": [ "outputs": [
{ {
"output_type": "stream", "output_type": "stream",
@ -2112,7 +2112,7 @@
"source": [ "source": [
"## Push to hub\n", "## Push to hub\n",
"\n", "\n",
"To push your model to the hub, run the following blocks. It will create a new repo with the \"-GGML\" suffix. Don't forget to change the `username` variable in the following block." "To push your model to the hub, run the following blocks. It will create a new repo with the \"-GGUF\" suffix. Don't forget to change the `username` variable in the following block."
], ],
"metadata": { "metadata": {
"id": "Ar8pO7bb80US" "id": "Ar8pO7bb80US"
@ -2170,7 +2170,7 @@
"id": "UOyKfUD-8jmh", "id": "UOyKfUD-8jmh",
"outputId": "3c8df47b-f350-4251-a19f-4b9fb1116381" "outputId": "3c8df47b-f350-4251-a19f-4b9fb1116381"
}, },
"execution_count": 55, "execution_count": null,
"outputs": [ "outputs": [
{ {
"output_type": "stream", "output_type": "stream",
@ -2202,11 +2202,11 @@
"api = HfApi()\n", "api = HfApi()\n",
"\n", "\n",
"\n", "\n",
"create_repo(repo_id = f\"{username}/{MODEL_NAME}-GGML\", repo_type=\"model\", exist_ok=True)\n", "create_repo(repo_id = f\"{username}/{MODEL_NAME}-GGUF\", repo_type=\"model\", exist_ok=True)\n",
"\n", "\n",
"api.upload_folder(\n", "api.upload_folder(\n",
" folder_path=MODEL_NAME,\n", " folder_path=MODEL_NAME,\n",
" repo_id=f\"{username}/{MODEL_NAME}-GGML\",\n", " repo_id=f\"{username}/{MODEL_NAME}-GGUF\",\n",
" allow_patterns=f\"*{GGML_VERSION}*\",\n", " allow_patterns=f\"*{GGML_VERSION}*\",\n",
")" ")"
], ],

Loading…
Cancel
Save