- Models
- Phi 3.5 Mini Instruct
- Deploy
Phi 3.5 Mini Instruct
3.8B parameter language model optimized for reasoning, math, and code tasks in memory-constrained environments.
Deployment guide
This guide provides step-by-step instructions for deploying AMD Inference Microservice (AIM) container for microsoft/Phi-3.5-mini-instruct model in various environments. Follow these instructions to quickly get started with running an AI model on AMD accelerators. This guide assumes EPYC_9965 accelerator on the target system.
Prerequisites
- AMD EPYC™ CPU (e.g., EPYC_ZEN4, EPYC_ZEN5, EPYC_9965)
- Docker installed and configured
Docker deployment
Running the container
docker run \ -p 8000:8000 \ amdenterpriseai/aim-epyc-microsoft-phi-3-5-mini-instruct:0.13.0Customizing deployment with environment variables
Customize your deployment with optional environment variables:
docker run \ -e AIM_PRECISION=bf16 \ -e AIM_ACCELERATOR_COUNT=188 \ -e AIM_METRIC=throughput \ -e AIM_PORT=8080 \ -p 8080:8080 \ amdenterpriseai/aim-epyc-microsoft-phi-3-5-mini-instruct:0.13.0Kubernetes deployment
Deployment
It is possible to deploy AIM using Kubernetes. In this doc a sample Kubernetes deployment manifest is provided.
Create deployment.yaml with the following content:
apiVersion: apps/v1kind: Deploymentmetadata: name: minimal-aim-deployment labels: app: minimal-aim-deploymentspec: progressDeadlineSeconds: 3600 replicas: 1 selector: matchLabels: app: minimal-aim-deployment template: metadata: labels: app: minimal-aim-deployment spec: containers: - name: minimal-aim-deployment image: amdenterpriseai/aim-epyc-microsoft-phi-3-5-mini-instruct:0.13.0 imagePullPolicy: Always env: - name: AIM_PRECISION value: "auto" - name: AIM_ACCELERATOR_COUNT value: "188" - name: AIM_ACCELERATOR_MODEL value: "auto" - name: AIM_ENGINE value: "vllm" - name: AIM_METRIC value: "latency" - name: AIM_LOG_LEVEL_ROOT value: "INFO" - name: AIM_LOG_LEVEL value: "INFO" - name: AIM_PORT value: "8000" ports: - name: http containerPort: 8000 resources: requests: memory: "16Gi" cpu: "188" limits: memory: "16Gi" cpu: "188" startupProbe: httpGet: path: /v1/models port: http periodSeconds: 10 failureThreshold: 360 livenessProbe: httpGet: path: /health port: http readinessProbe: httpGet: path: /v1/models port: http volumeMounts: - name: ephemeral-storage mountPath: /tmp - name: dshm mountPath: /dev/shm volumes: - name: ephemeral-storage emptyDir: sizeLimit: 256Gi - name: dshm emptyDir: medium: Memory sizeLimit: 32GiCreate a service configuration in service.yaml file:
apiVersion: v1kind: Servicemetadata: name: minimal-aim-deployment labels: app: minimal-aim-deploymentspec: type: ClusterIP ports: - name: http port: 80 targetPort: 8000 selector: app: minimal-aim-deploymentThe deployment can be customized further based on your requirements. It can be applied to Kubernetes cluster using kubectl:
kubectl apply -f . -n <YOUR_K8S_NAMESPACE>This page covers Docker and Kubernetes. The full deployment guide also covers model caching for production, testing your deployment, advanced deployment scenarios, monitoring and troubleshooting, and security considerations.
View full deployment guide