1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Llama-3-ELYZA-JP-8BをWSL2 docker で動かすメモ

Posted at

たんなるメモ

$ docker pull ollama/ollama
$ mkdir work
$ cd work
$ wget https://huggingface.co/elyza/Llama-3-ELYZA-JP-8B-GGUF/resolve/main/Llama-3-ELYZA-JP-8B-q4_k_m.gguf
$ cat << EOF > Modelfile
FROM ./Llama-3-ELYZA-JP-8B-q4_k_m.gguf
TEMPLATE """{{ if .System }}<|start_header_id|>system<|end_header_id|>

{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>

{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>

{{ .Response }}<|eot_id|>"""
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"
PARAMETER stop "<|reserved_special_token"
EOF
$ cd ../
$ docker run -d -v $(pwd)/ollama:/root/.ollama -v $(pwd)/work:/root/work -p 11434:11434 --name ollama ollama/ollama
$ docker exec -it ollama ollama create elyza:jp8b -f /root/work/Modelfile
$ docker exec -it ollama ollama run elyza:jp8b

image.png

$ docker stop ollama && docker rm ollama
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?