More Docker. Easy Access. New Streamlined Plans. Learn more.

ai/phi

Verified Publisher

By Docker

Updated 3 months ago

Specialized Phi 3 NLP with vllm runner, ideal for targeted language tasks on CUDA.

Image
Machine Learning & AI
Gen AI
3

296

Phi 3 Model - ai/phi

Overview

The Phi 2 model Docker image offers efficient NLP capabilities designed for specialized and domain-specific language applications. Packaged with vllm and optimized for CUDA 12.6, Phi 2 is well-suited for tasks that benefit from fine-tuned language understanding, such as content moderation, recommendation systems, and interactive support bots.

Key Features and Use Cases

  • Domain-Specific NLP: Excellent for targeted language applications where specialized vocabulary or context is needed.
  • Scalable and Lightweight: Optimized for running on modest GPU resources, suitable for lower-latency applications.
  • CUDA-Optimized: Leverages GPU acceleration, making it highly efficient for real-time processing.

Getting Started

To start the Phi 2 model, run:

docker run -it --rm --gpus=all -p 8000:8000 --name vllm ai/phi:3-mini-4k-instruct-cuda-12.6

The model will be ready for OpenAI-compatible requests once running:

curl -s http://localhost:8000/v1/completions \
-H "Content-Type: application/json" \
-d '{
  "model": "phi",
  "prompt": "Enter your prompt here",
  "max_tokens": 10,
  "temperature": 0.7
}'

Image Variants and Tags

  • 3-mini-4k-instruct, 3-mini-4k-instruct-cuda-12.6: Lightweight, suitable for interactive support and real-time recommendation tasks.

License

Microsoft. Copyright (c) Microsoft Corporation.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Docker Pull Command

docker pull ai/phi