git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make
---
pip install -r requirements.txt
---
python convert.py ../Llama3-70B-Chinese-Chat/ --vocab-type bpe
---
./quantize ../Llama3-70B-Chinese-Chat/ggml-model-f32.gguf ../ggml-model-q4_0.gguf Q4_0
---
echo "FROM ggml-model-q4_0.gguf" >> Modelfile

echo "SYSTEM 你是一个有用的助手" >> Modelfile

PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"
PARAMETER num_keep "24"

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|>
"""
---

ollama create wangrongsheng/llama3-8b-chinese-chat -f ./Modelfile
---
ollama push wangrongsheng/llama3-8b-chinese-chat
GitHub 加速计划 / oll / ollama
82.41 K
6.3 K
下载
启动并运行 Llama 2、Mistral、Gemma 和其他大型语言模型。
最近提交(Master分支:1 个月前 )
01b80e9f add conversion for microsoft phi 3 mini/medium 4k, 128k 1 个月前
bd5e4326 - 1 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐