当前位置:   article > 正文

Mac Book M3 Max 64G 如何拿捏 Ollama 本地大模型 Llama3

Mac Book M3 Max 64G 如何拿捏 Ollama 本地大模型 Llama3

参考:

简介

在这里插入图片描述

安装

终端安装

在这里插入图片描述

命令

ollama -h
Large language model runner

Usage:
  ollama [flags]
  ollama [command]

Available Commands:
  serve       Start ollama
  create      Create a model from a Modelfile
  show        Show information for a model
  run         Run a model
  pull        Pull a model from a registry
  push        Push a model to a registry
  list        List models
  cp          Copy a model
  rm          Remove a model
  help        Help about any command

Flags:
  -h, --help      help for ollama
  -v, --version   Show version information
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
$ ollama list
NAME         	ID          	SIZE  	MODIFIED
llama2:latest	78e26419b446	3.8 GB	4 hours ago
llama3:70b   	be39eb53a197	39 GB 	About an hour ago
llama3:latest	a6990ed6be41	4.7 GB	4 hours ago
  • 1
  • 2
  • 3
  • 4
  • 5

界面安装

docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
  • 1

在这里插入图片描述

下载模型

在这里插入图片描述

llama2 7B 测试

命令帮助

$ ollama run llama2
pulling manifest
pulling 8934d96d3f08... 100% ▕████████████████▏ 3.8 GB
pulling 8c17c2ebb0ea... 100% ▕████████████████▏ 7.0 KB
pulling 7c23fb36d801... 100% ▕████████████████▏ 4.8 KB
pulling 2e0493f67d0c... 100% ▕████████████████▏   59 B
pulling fa304d675061... 100% ▕████████████████▏   91 B
pulling 42ba7f8a01dd... 100% ▕████████████████▏  557 B
verifying sha256 digest
writing manifest
removing any unused layers
success
>>> hello
Hello! It's nice to meet you. How are you today?

>>> /?
Available Commands:
  /set            Set session variables
  /show           Show model information
  /load <model>   Load a session or model
  /save <model>   Save your current session
  /bye            Exit
  /?, /help       Help for a command
  /? shortcuts    Help for keyboard shortcuts

Use """ to begin a multi-line message.

>>> /show
Available Commands:
  /show info         Show details for this model
  /show license      Show model license
  /show modelfile    Show Modelfile for this model
  /show parameters   Show parameters for this model
  /show system       Show system message
  /show template     Show prompt template

>>> /show info
Model details:
Family              llama
Parameter Size      7B
Quantization Level  Q4_0

>>> /show modelfile
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this one, replace the FROM line with:
# FROM llama2:latest

FROM /Users/zongxun/.ollama/models/blobs/sha256-8934d96d3f08982e95922b2b7a2c626a1fe873d7c3b06e8e56d7bc0a1fef9246
TEMPLATE """[INST] <<SYS>>{{ .System }}<</SYS>>

{{ .Prompt }} [/INST]
"""
PARAMETER stop "[INST]"
PARAMETER stop "[/INST]"
PARAMETER stop "<<SYS>>"
PARAMETER stop "<</SYS>>"

>>> good afternoon!
Great, good afternoon! *adjusts sunglasses* Is there something on your
mind that you'd like to talk about or ask? I'm here to listen and help in
any way I can.

>>> 现在进行角色扮演,你是我的女儿,名字叫 小雅,你和我的对话不能 出现英文,现在开始 :小雅,该起床了 。
*giggles* Oh, good morning! *bounces up and down* I'm so excited for
today! *twirls* Can we play dress-up and have a fashion show? *excitedly*
And maybe we can even have a tea party with our stuffed animals! *giggles*
What do you say, mommy? 
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/594364
推荐阅读
相关标签