Phi-2
This release adds support for the [Phi-2](https://www.microsoft.com/en-us/research/blog/phi-2-the-surprising-power-of-small-language-models/) model by Microsoft.
ollama run phi
Phi-2 is a new, powerful 2.7B model with strong reasoning and language understanding capabilities comparable to larger, 13B models. Given its small size, it will run effectively on a wide set of hardware configurations.
Example prompt
By default, `phi` includes a prompt template designed for multi-turn conversations:
% ollama run phi
>>> Hello, can you help me find my way to Toronto?
Certainly! What is the exact location in Toronto that you are looking for?
>>> Yonge & Bloor
Sure, Yonge and Bloor is a busy intersection in downtown Toronto. Would you like to take public transportation or drive there?
>>> Public transportation
Great! The easiest way to get there is by taking the TTC subway. You can take Line 1, which runs along Yonge Street and passes through downtown Toronto.
Using Ollama's API:
curl http://localhost:11434/api/chat -d '{
"model": "phi",
"messages": [
{ "role": "user", "content": "why is the sky blue?" }
]
}'
Example prompts (raw mode)
Phi also responds well to a wide variety of prompt formats when using [raw mode](https://github.com/jmorganca/ollama/blob/main/docs/api.md#request-raw-mode) in Ollama's API, which bypasses all default prompt templating:
Instruct
curl http://localhost:11434/api/generate -d '{
"model": "phi",
"prompt": "Instruct: Write a detailed analogy between mathematics and a lighthouse.\nOutput:",
"options": {
"stop": ["Instruct:", "Output:"]
},
"raw": true,
"stream": false
}'
Code Completion
curl http://localhost:11434/api/generate -d '{
"model": "phi",
"prompt": "def print_prime(n):\n ",
"raw": true,
"stream": false
}'
Text completion
curl http://localhost:11434/api/generate -d '{
"model": "phi",
"prompt": "There once was a mouse named",
"raw": true,
"stream": false
}'
New Models
- [Phi-2](https://ollama.ai/library/phi): A versatile 2.7B model by Microsoft with outstanding reasoning and language understanding capabilities.
- [Solar](https://ollama.ai/library/solar): A compact, yet powerful 10.7B large language model designed for single-turn conversation.
- [OpenChat](https://ollama.ai/library/openchat): Updated to OpenChat-3.5-1210, this new version of the 7B model model excels at coding tasks and scores very high on many open-source LLM benchmarks.
- [Wizard Math](https://ollama.ai/library/wizard-math): Updated to WizardMath v1.1, this 7B model excels at Math logic and reasoning and is now based on Mistral
What's Changed
* Fixed issues where `message` objects in `/api/chat` would return `"images": null` in the response
* `/api/chat` now always returns a `message` object, even if `content` is an empty string
New Contributors
* ianpurton made their first contribution in https://github.com/jmorganca/ollama/pull/1463
* AugustDev made their first contribution in https://github.com/jmorganca/ollama/pull/1529
**Full Changelog**: https://github.com/jmorganca/ollama/compare/v0.1.16...v0.1.17