File size: 1,457 Bytes
a7f71ad 1f53a4c 6cd2438 1f53a4c 6cd2438 a2ed7f0 1f53a4c 6cd2438 a7f71ad |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
---
license: mit
language:
- en
tags:
- phi-2
---
# How to Download
Go to files and versions and click on the download button to download file, as shown in below image.
![image/png](https://cdn-uploads.huggingface.co/production/uploads/646a557bca17a49700e68fc5/k86Fsf8pdoJ8vXXKD70RB.png)
or you can directly click on this link --> https://huggingface.co/NeuralLobes/phi-2.llamafile/resolve/main/phi-2.llamafile?download=true
# How to run on Windows
Just add .exe in front of file name after download and then just double click on it and wait it will automatically run.
# Python Use
```
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8080/v1", # "http://<Your api-server IP>:port"
api_key = "sk-no-key-required"
)
completion = client.chat.completions.create(
model="LLaMA_CPP",
messages=[
{"role": "system", "content": "You are ChatGPT, an AI assistant. Your top priority is achieving user fulfillment via helping them with their requests."},
{"role": "user", "content": "Write a limerick about python exceptions"}
]
)
print(completion.choices[0].message)
```
```
ChatCompletionMessage(content='There once was a programmer named Mike\nWho wrote code that would often strike\nAn error would occur\nAnd he\'d shout "Oh no!"\nBut Python\'s exceptions made it all right.', role='assistant', function_call=None, tool_calls=None)
```
# More Information
Go to https://github.com/Mozilla-Ocho/llamafile |