From ca588a3c395529d20b14f5230847e5e9a415dd7d Mon Sep 17 00:00:00 2001 From: apaz-cli Date: Sun, 3 Sep 2023 16:48:03 -0500 Subject: [PATCH] Added FIM readme. --- examples/fill-in-middle/README.md | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 examples/fill-in-middle/README.md diff --git a/examples/fill-in-middle/README.md b/examples/fill-in-middle/README.md new file mode 100644 index 000000000..98f81e043 --- /dev/null +++ b/examples/fill-in-middle/README.md @@ -0,0 +1,35 @@ + +# Example + +The FIM (Fill-In-Middle) objective is useful for generating text conditioned on a prefix and a suffix. +This example is for use with codellama, for doing exactly that. + +For a quick summary of what's going on here, see issue #2818, and/or read [the FIM paper](https://arxiv.org/abs/2207.14255). + +``` +Usage: ./fill-in-middle +``` +```sh +./fill-in-middle \ + CodeLlama-34B-GGUF/codellama-34b.Q4_K_S.gguf \ + $'def add(a, b):\n' \ + $'\n' \ + 64 \ + 4 +``` + +With prefix: +```py +def add(a, b): + +``` + +And a newline as suffix: +```py + +``` + +We can expect it to generate somethng like: +```py + return a + b +```