| FROM unsloth/Kimi-K2-Instruct-BF16/ggml-model-Q2_K2.gguf | |
| TEMPLATE """{{ if .Tools }}<|im_system|>tool_declare<|im_middle|>{{ .Tools }}<|im_end|>{{ end }} | |
| {{ range $index, $message := .Messages }} | |
| {{ if and (eq $index 0) (ne $message.Role "system") }}<|im_system|>system<|im_middle|>You are a helpful assistant<|im_end|>{{ end }} | |
| {{ if eq $message.Role "system" }}<|im_system|>system<|im_middle|>{{ else if eq $message.Role "user" }}<|im_user|>user<|im_middle|>{{ else if eq $message.Role "assistant" }}<|im_assistant|>assistant<|im_middle|>{{ else if eq $message.Role "tool" }}<|im_system|>tool<|im_middle|>{{ end }} | |
| {{ range $message.Images }}<|media_start|>image<|media_content|><|media_pad|><|media_end|>{{ end }}{{ $message.Content }}<|im_end|> | |
| {{ end }} | |
| <|im_assistant|>assistant<|im_middle|>""" | |
| PARAMETER stop <|im_start|> | |
| PARAMETER stop <|im_user|> | |
| PARAMETER stop <|im_end|> | |
| PARAMETER temperature 0.6 | |
| PARAMETER top_k 20 | |
| PARAMETER top_p 0.95 | |
| PARAMETER repeat_penalty 1 | |
| PARAMETER num_gpu 1 | |
| LICENSE """ Modified MIT License | |
| Copyright (c) 2025 Moonshot AI | |
| Permission 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. | |
| Our only modification part is that, if the Software (or any derivative works | |
| thereof) is used for any of your commercial products or services that have | |
| more than 100 million monthly active users, or more than 20 million US dollars | |
| (or equivalent in other currencies) in monthly revenue, you shall prominently | |
| display "Kimi K2" on the user interface of such product or service. | |
| """ | |