From fc52f179fe3581f8c0b720f3f119ce0af841a302 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 8 Jan 2025 23:26:25 +0100 Subject: [PATCH] chore(model gallery): add phi-4 (#4562) Signed-off-by: Ettore Di Giacinto --- gallery/index.yaml | 24 ++++++++++++++++++++++++ gallery/phi-4-chat.yaml | 20 ++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 gallery/phi-4-chat.yaml diff --git a/gallery/index.yaml b/gallery/index.yaml index e3a6ab85dac8..5678e75933bf 100644 --- a/gallery/index.yaml +++ b/gallery/index.yaml @@ -1,4 +1,28 @@ --- +- &phi4 + url: "github:mudler/LocalAI/gallery/phi-4-chat.yaml@master" + name: "phi-4" + license: mit + tags: + - llm + - gguf + - phi + - cpu + - gpu + - text-generation + urls: + - https://huggingface.co/microsoft/phi-4 + - https://huggingface.co/bartowski/phi-4-GGUF + description: | + phi-4 is a state-of-the-art open model built upon a blend of synthetic datasets, data from filtered public domain websites, and acquired academic books and Q&A datasets. The goal of this approach was to ensure that small capable models were trained with data focused on high quality and advanced reasoning. + phi-4 underwent a rigorous enhancement and alignment process, incorporating both supervised fine-tuning and direct preference optimization to ensure precise instruction adherence and robust safety measures. Phi-4 is a 14B parameters, dense decoder-only Transformer model. + overrides: + parameters: + model: phi-4-Q4_K_M.gguf + files: + - filename: phi-4-Q4_K_M.gguf + sha256: e38bd5fa5f1c03d51ebc34a8d7b284e0da089c8af05e7f409a0079a9c831a10b + uri: huggingface://bartowski/phi-4-GGUF/phi-4-Q4_K_M.gguf - &falcon3 name: "falcon3-1b-instruct" url: "github:mudler/LocalAI/gallery/falcon3.yaml@master" diff --git a/gallery/phi-4-chat.yaml b/gallery/phi-4-chat.yaml new file mode 100644 index 000000000000..1ff0b14af963 --- /dev/null +++ b/gallery/phi-4-chat.yaml @@ -0,0 +1,20 @@ +--- +name: "phi-4-chat" + +config_file: | + mmap: true + template: + chat_message: | + <|im_start|>{{ .RoleName }}<|im_sep|> + {{.Content}}<|im_end|> + chat: | + {{.Input}} + <|im_start|>assistant<|im_sep|> + completion: | + {{.Input}} + context_size: 4096 + f16: true + stopwords: + - <|end|> + - <|endoftext|> + - <|im_end|>