当前位置: 首页 > wzjs >正文

网站页面结构苏州网站建设制作公司

网站页面结构,苏州网站建设制作公司,长宁区公司网站建设,中国哪里建设最多2.3Ollama加载已下载Deepseek模型 无网络连接,直接通过Ollama本地已经本地已经下载好的的Deepseek模型。 2.3.1 查看已安装模型 PS C:\Users\Administrator> ollama list NAME ID SIZE MODIFIED deepseek-r1:8…

2.3Ollama加载已下载Deepseek模型

无网络连接,直接通过Ollama本地已经本地已经下载好的的Deepseek模型。

2.3.1 查看已安装模型

PS C:\Users\Administrator> ollama list
NAME                              ID              SIZE      MODIFIED
deepseek-r1:8b                    28f8fd6cdc67    4.9 GB    41 minutes ago
shaw/dmeta-embedding-zh:latest    55960d8a3a42    408 MB    21 hours ago
deepseek-r1:14b                   ea35dfe18182    9.0 GB    21 hours ago

2.3.2 下载Deepseek7b模型

通过Deepseek 开源Github仓库,如下:

https://github.com/deepseek-ai

跳转进入huggingface官网,下载模型,如下:

https://huggingface.co/deepseek-ai/DeepSeek-R1

model-00001-of-000002.safetensors 和 model-00002-of-000002.safetensors 是模型的分片文件。

大型语言模型(如 LLaMA、GPT 等)通常包含数十亿甚至数百亿个参数,导致模型文件非常大。为了便于管理和传输,模型文件会被分割成多个较小的分片。

每个分片文件包含模型的一部分参数或权重,加载时需要将所有分片合并才能完整地加载模型。

2.3.3 模型转换

例如我们之前在LM Studio中使用的模型格式为.gguf文件,我们需要将分片转换为.gguf文件,或直接使用LM Studio下载的模型文件

2.3.4 加载Deepseek7b本地模型

查看已下载模型的modlefile文件内容,如下:

PS C:\Users\Administrator> ollama show deepseek-r1:8b --modelfile
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this, replace FROM with:
# FROM deepseek-r1:8bFROM C:\Users\Administrator\.ollama\models\blobs\sha256-6340dc3229b0d08ea9cc49b75d4098702983e17b4c096d57afbbf2ffc813f2be
TEMPLATE """{{- if .System }}{{ .System }}{{ end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1}}
{{- if eq .Role "user" }}<|User|>{{ .Content }}
{{- else if eq .Role "assistant" }}<|Assistant|>{{ .Content }}{{- if not $last }}<|end▁of▁sentence|>{{- end }}
{{- end }}
{{- if and $last (ne .Role "assistant") }}<|Assistant|>{{- end }}
{{- end }}"""
PARAMETER stop <|begin▁of▁sentence|>
PARAMETER stop <|end▁of▁sentence|>
PARAMETER stop <|User|>
PARAMETER stop <|Assistant|>
LICENSE """MIT LicenseCopyright (c) 2023 DeepSeekPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""PS C:\Users\Administrator>

在模型对应的目录创建对应的模型文件(modelfile),

内容如下:

Deepseek-R1_7B-Q8.mf

# Modelfile generated by "ollama show"
# To build a new Modelfile based on this, replace FROM with:
# FROM deepseek-r1:8bFROM C:\01_bill\01_AI\01_deepseeks\01_models\DeepSeek-R1-Distill-Qwen-7B-Q8_0.gguf
TEMPLATE """{{- if .System }}{{ .System }}{{ end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1}}
{{- if eq .Role "user" }}<|User|>{{ .Content }}
{{- else if eq .Role "assistant" }}<|Assistant|>{{ .Content }}{{- if not $last }}<|end▁of▁sentence|>{{- end }}
{{- end }}
{{- if and $last (ne .Role "assistant") }}<|Assistant|>{{- end }}
{{- end }}"""
PARAMETER stop <|begin▁of▁sentence|>
PARAMETER stop <|end▁of▁sentence|>
PARAMETER stop <|User|>
PARAMETER stop <|Assistant|>
LICENSE """MIT LicenseCopyright (c) 2023 DeepSeekPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""

 执行加载,如下: 

PS C:\01_bill\01_AI\01_deepseeks\01_models> ollama create Deepseek-R1_7B-Q8 -f .\Deepseek-R1_7B-Q8.mf
gathering model components
copying file sha256:318b1edf03c35eb962aa79c1c59d8e03a7fe902f793b68ab3dbe6ae850622515 100%
parsing GGUF
using existing layer sha256:318b1edf03c35eb962aa79c1c59d8e03a7fe902f793b68ab3dbe6ae850622515
creating new layer sha256:9bb403b8e0b1be4d97d845272dad98a44c2cc66b4ae4f234837336c09081303f
creating new layer sha256:09aafb1e797f213d94c7bbb20bc0d8bae736f51ab91b5a19cbe9362a840f08fb
using existing layer sha256:f4d24e9138dd4603380add165d2b0d970bef471fac194b436ebd50e6147c6588
writing manifest
success
PS C:\01_bill\01_AI\01_deepseeks\01_models> 

查看是否加载成功,如下:

PS C:\01_bill\01_AI\01_deepseeks\01_models> ollama list
NAME                              ID              SIZE      MODIFIED
Deepseek-R1_7B-Q8:latest          ff9b1ec4979d    8.1 GB    3 minutes ago
deepseek-r1:8b                    28f8fd6cdc67    4.9 GB    4 hours ago
shaw/dmeta-embedding-zh:latest    55960d8a3a42    408 MB    24 hours ago
deepseek-r1:14b                   ea35dfe18182    9.0 GB    24 hours ago

三,Cherry Studio

cherry-studio/docs/README.zh.md at main · CherryHQ/cherry-studio · GitHub

Cherry Studio 是一款支持多个大语言模型(LLM)服务商的桌面客户端。它支持支持文本、图片、Office、PDF 等多种格式,我们可以使用它来创建自己的本地知识库。

3.1 使能Ollama

 3.2 会话功能

3.3 创建本地知识库

这里需要shaw/dmeta-embedding-zh来加载我们的本地文件,如下:

http://www.dtcms.com/wzjs/218199.html

相关文章:

  • 澳门网站开发招聘今日热点头条
  • 自己做网站怎么挣钱人工智能培训班
  • 网站如何做响应式布局灯塔网站seo
  • 班级网站建设毕业设计开题报告成人教育培训机构
  • 网站建设方案策划书广州网站优化公司
  • java做网站好吗网络广告发布
  • 论坛型网站 建站知乎怎么申请关键词推广
  • net域名大网站推广普通话手抄报内容50字
  • b2b做外贸网站seo关键词外包
  • 湖南手机版建站系统哪家好网页设计模板免费网站
  • 工信部网站备案登录网站开发软件有哪些
  • 帝国网站网站手机版怎么做大型营销型网站制作
  • 简单网站开发项目实例建网站有哪些步骤
  • 广州做网站优化费用债务优化是什么意思
  • 自建站价格新产品推广方案策划
  • 网站留言表单是如何做的百度seo优化排名如何
  • app网站区别长沙百度推广优化排名
  • 南京单位网站建设平台免费注册个人网站
  • 如何自己做网站电商网站建设哪家好
  • 招聘网站怎么做预算搜狗站长平台打不开
  • WordPress透明二次元模板上海关键词排名优化怎样
  • 电子商务网站建设报告分析广州网页推广公司
  • 全球可以做外贸的社交网站郑州百度推广公司电话
  • 北京网站开发网站建设报价中国网站建设公司
  • 成都手机网站建设今日足球赛事推荐
  • 做互助盘网站找哪家好app开发平台开发
  • 江门网站建设定制网络营销有哪些手段
  • 三个律师做网站合适吗如何做游戏推广
  • 教育加盟网站建设开一个免费网站
  • 网站模板漏洞石景山区百科seo