diff --git a/phi2/README.md b/phi2/README.md index 46a7c589..aef47cd1 100644 --- a/phi2/README.md +++ b/phi2/README.md @@ -1,8 +1,9 @@ # Phi-2 Phi-2 is a 2.7B parameter model released by Microsoft[^1] and trained on a mixture -of GPT-4 outputs and clean web-text. Its performance rivals -much, much stronger models. +of GPT-4 outputs and clean web-text. Its performance rivals much larger models. + +Phi-2 efficiently runs on an Apple silicon device with 8 GB memory in 16-bit precision. ## Setup @@ -12,14 +13,14 @@ Download and convert the model: python convert.py ``` -which will make a file `weights.npz`. +This will make the `weights.npz` file which MLX can read. ## Generate To generate text with the default prompt: ```sh -python model.py +python phi2.py ``` Should give the output: @@ -40,7 +41,13 @@ Answer: Logic in mathematics is like a compass in navigation. It helps To use your own prompt: ```sh -python model.py --prompt --max_tokens +python phi2.py --prompt --max_tokens +``` + +To see a list of options run: + +```sh +python phi2.py --help ``` [^1]: For more details on the model see the [blog post]( diff --git a/phi2/model.py b/phi2/phi2.py similarity index 100% rename from phi2/model.py rename to phi2/phi2.py