diff --git "a/docs/C3/1. \350\207\252\345\256\232\344\271\211\345\257\274\345\205\245\346\250\241\345\236\213.md" "b/docs/C3/1. \350\207\252\345\256\232\344\271\211\345\257\274\345\205\245\346\250\241\345\236\213.md" index ad2d1af..a15f027 100644 --- "a/docs/C3/1. \350\207\252\345\256\232\344\271\211\345\257\274\345\205\245\346\250\241\345\236\213.md" +++ "b/docs/C3/1. \350\207\252\345\256\232\344\271\211\345\257\274\345\205\245\346\250\241\345\236\213.md" @@ -113,7 +113,7 @@ llama.cpp是GGUF的开源项目,提供CLI和Server功能。 ### 3.1 从HuggingFace下载Model 最直觉的下载方式是通过git clone或者链接来下载,但是因为llm每部分都按GB计算,避免出现`OOM Error(Out of memory)`,我们可以使用Python写一个简单的download.py -首先应该去hf拿到用户个人的`ACCESS_TOKEN`,打开 huggingface 。 +首先应该去hf拿到用户个人的`ACCESS_TOKEN`,打开 huggingface个人设置页面。 ![alt text](../images/C3-3-1.png) diff --git a/docs/images/C3-3-1.png b/docs/images/C3-3-1.png index b1958db..a218e33 100644 Binary files a/docs/images/C3-3-1.png and b/docs/images/C3-3-1.png differ diff --git a/docs/images/C3-3-2.png b/docs/images/C3-3-2.png index 2c4a9fb..b575284 100644 Binary files a/docs/images/C3-3-2.png and b/docs/images/C3-3-2.png differ diff --git a/docs/images/C3-3-3.png b/docs/images/C3-3-3.png index 8ac8053..99c1cec 100644 Binary files a/docs/images/C3-3-3.png and b/docs/images/C3-3-3.png differ diff --git "a/notebook/C3/1.\344\273\216GGUF\347\233\264\346\216\245\345\257\274\345\205\245/main.ipynb" "b/notebook/C3/1.\344\273\216GGUF\347\233\264\346\216\245\345\257\274\345\205\245/main.ipynb" index 1cc3db2..9b5ff61 100644 --- "a/notebook/C3/1.\344\273\216GGUF\347\233\264\346\216\245\345\257\274\345\205\245/main.ipynb" +++ "b/notebook/C3/1.\344\273\216GGUF\347\233\264\346\216\245\345\257\274\345\205\245/main.ipynb" @@ -2,29 +2,9 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[?25ltransferring model data ⠙ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠙ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠸ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠸ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠴ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠴ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠧ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠧ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠇ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠏ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠙ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠙ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠸ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠸ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠴ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠴ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠦ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠇ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠇ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠋ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠋ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠹ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠹ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data ⠼ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1Gtransferring model data \n", - "using existing layer sha256:99f013fc74fcfaab19a9cb36de4ebb8c50e9a15048ef88da2387ee7a0c0cffcb \n", - "using autodetected template chatml \n", - "using existing layer sha256:f02dd72bb2423204352eabc5637b44d79d17f109fdb510a7c51455892aa2d216 \n", - "creating new layer sha256:fb05d8484292a164d767deb5cd552e96b9fb4968bbcb855b0ae43cf7beb4e516 \n", - "writing manifest \n", - "success ⠋ \u001b[?25h\u001b[?25l\u001b[2K\u001b[1G\u001b[A\u001b[2K\u001b[1G\u001b[A\u001b[2K\u001b[1G\u001b[A\u001b[2K\u001b[1G\u001b[A\u001b[2K\u001b[1G\u001b[A\u001b[2K\u001b[1G\u001b[A\u001b[2K\u001b[1Gtransferring model data \n", - "using existing layer sha256:99f013fc74fcfaab19a9cb36de4ebb8c50e9a15048ef88da2387ee7a0c0cffcb \n", - "using autodetected template chatml \n", - "using existing layer sha256:f02dd72bb2423204352eabc5637b44d79d17f109fdb510a7c51455892aa2d216 \n", - "creating new layer sha256:fb05d8484292a164d767deb5cd552e96b9fb4968bbcb855b0ae43cf7beb4e516 \n", - "writing manifest \n", - "success \u001b[?25h\n" - ] - } - ], + "outputs": [], "source": [ "# 1. 创建模型\n", "!ollama create mymodel -f Modelfile" @@ -32,20 +12,9 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "NAME \tID \tSIZE \tMODIFIED \n", - "mymodel:latest \tb82a6e9999d2\t355 MB\t15 seconds ago\t\n", - "llama3:latest \t365c0bd3c000\t4.7 GB\t13 hours ago \t\n", - "llama3.1:latest\t75382d0899df\t4.7 GB\t15 hours ago \t\n" - ] - } - ], + "outputs": [], "source": [ "# 2.查看模型\n", "!ollama list" @@ -53,20 +22,12 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "^C\n" - ] - } - ], + "outputs": [], "source": [ "# 3. 终端内运行下列脚本运行模型\n", - "# ollama run mymodel" + "!ollama run mymodel" ] } ],