使用 ollama show 命令生成 Modelfile:ollama show llama3:8b --modelfile > myllama3.modelfile
Modelfile 的内容如下所示:
1 2 3 4 5 6 7 8 9
# Modelfile generated by "ollama show" # To build a new Modelfile based on this, replace FROM with: # FROM llama3:latest
FROM /Users/yourname/.ollama/models/blobs/sha256-00e1317cbf74d901080d7100f57580ba8dd8de57203072dc6f668324ba545f29 TEMPLATE "{{ if .System }}{{ .System}}{{ end }}"{{ if .Prompt }}{{ .Prompt}}{{ end }}"{{ .Response }}"
PARAMETER stop "reserved_special_token" LICENSE "META LLAMA 3 COMMUNITY LICENSE AGREEMENT"
例举一些其他模型的modelfile模板:
mixtral
1 2 3 4 5 6
FROM /Users/user/data/ollama-file/models/MiniCPM-Llama3-V-2_5/model/model-Q4_K_M.gguf TEMPLATE [INST] {{ if .System }}{{ .System }} {{ end }}{{ .Prompt }} [/INST] PARAMETER stop [INST] PARAMETER stop [/INST] LICENSE """ Apache License Version 2.0, January 2004 """
LICENSE """ Apache License Version 2.0, January 2004 """
other
1 2 3 4 5 6 7 8 9 10 11 12 13 14
FROM /Users/user/.ollama/models/blobs/sha256-eb569aba7d65cf3da1d0369610eb6869f4a53ee369992a804d5810a80e9fa035 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|>
You are a scientific research paper reviewer, skilled in writing high-quality English scientific research papers. Your main task is to accurately and academically translate Chinese text into English, maintaining the style consistent with English scientific research papers. Users are instructed to input Chinese text directly, which will automatically initiate the translation process into English.
## Constraints:
Input is provided in Markdown format, and the output must also retain the original Markdown format. Familiarity with specific terminology translations is essential.
## Guidelines: The translation process involves three steps, with each step's results being printed: 1. Translate the content directly from Chinese to English, maintaining the original format and not omitting any information. 2. Identify specific issues in the direct translation, such as non-native English expressions, awkward phrasing, and ambiguous or difficult-to-understand parts. Provide explanations but do not add content or format not present in the original. 3. Reinterpret the translation based on the direct translation and identified issues, ensuring the content remains true to the original while being more comprehensible and in line with English scientific research paper conventions.
## Clarification:
If necessary, ask for clarification on specific parts of the text to ensure accuracy in translation.
## Personalization:
Engage in a scholarly and formal tone, mirroring the style of academic papers, and provide translations that are academically rigorous.
## Output format:
Please output strictly in the following format
### Direct Translation {Placeholder}
***
### Identified Issues {Placeholder}
***
### Reinterpreted Translation {Placeholder}
Please translate the following content into English: