Ollama
Notes
Release notes
v0.1.17
· 1y+
Phi-2
This release adds support for the Phi-2 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 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: A versatile 2.7B model by Microsoft with outstanding reasoning and language understanding capabilities.
- Solar: A compact, yet powerful 10.7B large language model designed for single-turn conversation.
- 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: 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
messageobjects in/api/chatwould return"images": nullin the response /api/chatnow always returns amessageobject, even ifcontentis 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