From 17b8719136b073a4a612c9a8d4cd39bb07204898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Gonz=C3=A1lez=20Santamarta?= Date: Thu, 9 Jan 2025 09:23:16 +0100 Subject: [PATCH] phi-4 added --- llama_bringup/models/Phi-4.yaml | 10 ++++++++++ llama_bringup/models/SmolLM2.yaml | 2 +- llama_bringup/prompts/Phi-4.yaml | 11 +++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 llama_bringup/models/Phi-4.yaml create mode 100644 llama_bringup/prompts/Phi-4.yaml diff --git a/llama_bringup/models/Phi-4.yaml b/llama_bringup/models/Phi-4.yaml new file mode 100644 index 00000000..132d98c8 --- /dev/null +++ b/llama_bringup/models/Phi-4.yaml @@ -0,0 +1,10 @@ +n_ctx: 2048 +n_batch: 8 +n_gpu_layers: 0 +n_threads: 1 +n_predict: 2048 + +model_repo: "bartowski/phi-4-GGUF" +model_filename: "phi-4-IQ4_XS.gguf" + +system_prompt_type: "Phi-4" diff --git a/llama_bringup/models/SmolLM2.yaml b/llama_bringup/models/SmolLM2.yaml index 04800396..1b6be05f 100644 --- a/llama_bringup/models/SmolLM2.yaml +++ b/llama_bringup/models/SmolLM2.yaml @@ -1,6 +1,6 @@ n_ctx: 2048 n_batch: 8 -n_gpu_layers: -1 +n_gpu_layers: 0 n_threads: 1 n_predict: 2048 diff --git a/llama_bringup/prompts/Phi-4.yaml b/llama_bringup/prompts/Phi-4.yaml new file mode 100644 index 00000000..38417189 --- /dev/null +++ b/llama_bringup/prompts/Phi-4.yaml @@ -0,0 +1,11 @@ +prefix: "\n<|im_start|>user<|im_sep|>\n" +suffix: "<|im_end|>\n<|assistant|>\n" +stopping_words: ["<|im_end|>"] + +system_prompt: |- + <|im_start|>system<|im_sep|> + Below is an instruction that describes a task. Write a response that appropriately completes the request<|im_end|> + <|im_start|>user<|im_sep|> + Hello<|im_end|> + <|im_start|>assistant<|im_sep|> + Hello<|im_end|>