summaryrefslogtreecommitdiff
path: root/candle-examples/examples/phi/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'candle-examples/examples/phi/README.md')
-rw-r--r--candle-examples/examples/phi/README.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/candle-examples/examples/phi/README.md b/candle-examples/examples/phi/README.md
new file mode 100644
index 00000000..8cf053bd
--- /dev/null
+++ b/candle-examples/examples/phi/README.md
@@ -0,0 +1,23 @@
+# candle-starcoder: code generation model
+
+[phi-1.5](https://huggingface.co/microsoft/phi-1_5).
+
+## Running some example
+
+```bash
+$ cargo run --example phi --release -- --prompt "def print_prime(n): "
+
+def print_prime(n):
+ print("Printing prime numbers")
+ for i in range(2, n+1):
+ if is_prime(i):
+ print(i)
+
+def is_prime(n):
+ if n <= 1:
+ return False
+ for i in range(2, int(math.sqrt(n))+1):
+ if n % i == 0:
+ return False
+ return True
+```