From f068efe5095ac106beb1da30fc00ae1e682e150f Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 1 Jan 2024 04:51:47 -0500 Subject: [PATCH] docs(phi-2): add example (#1525) --- examples/configurations/README.md | 11 +++++++++++ examples/configurations/phi-2.yaml | 15 +++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 examples/configurations/phi-2.yaml diff --git a/examples/configurations/README.md b/examples/configurations/README.md index ef731d82..8b6a6560 100644 --- a/examples/configurations/README.md +++ b/examples/configurations/README.md @@ -67,6 +67,17 @@ curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/jso ``` +### Phi-2 + +``` +cp -r examples/configurations/phi-2.yaml models/ + +curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{ + "model": "phi-2", + "messages": [{"role": "user", "content": "How are you doing?", "temperature": 0.1}] +}' +``` + ### Mixtral ``` diff --git a/examples/configurations/phi-2.yaml b/examples/configurations/phi-2.yaml new file mode 100644 index 00000000..8deec58b --- /dev/null +++ b/examples/configurations/phi-2.yaml @@ -0,0 +1,15 @@ +name: phi-2 +context_size: 2048 +f16: true +gpu_layers: 90 +mmap: true +parameters: + model: huggingface://TheBloke/phi-2-GGUF/phi-2.Q8_0.gguf + temperature: 0.2 + top_k: 40 + top_p: 0.95 +template: + chat: &template | + Instruct: {{.Input}} + Output: + completion: *template \ No newline at end of file