Skip to main content
Once your model is trained and evaluated, it’s time to deploy it for production use. This guide covers multiple deployment options from local development to cloud production.

Deployment Options

Local Deployment

Run models on your local machine for development and testing

Cloud Deployment

Deploy on cloud platforms for production use

Container Deployment

Use Docker containers for consistent deployment

Serverless Deployment

Deploy on serverless platforms for cost efficiency

Local Deployment

GGUF models are optimized for CPU inference and work well for local deployment. First, download your model in GGUF format from the Facet AI platform.

Using llama.cpp

Installation:
Running your model:
Advanced options:

Using Ollama

Installation:
Create a Modelfile:
Deploy your model:
API usage:

HuggingFace Transformers (Python)

For more control and integration with Python applications:

Cloud Deployment

Cloud deployment is purely experiment for now, will expand in future.

Google Cloud Run (vLLM)

Deploy your model on Google Cloud Run using vLLM for high-performance inference.

Prerequisites

  • Google Cloud Project with billing enabled
  • Docker installed locally
  • Google Cloud SDK installed

Step 1: Prepare Your Model

Export your model in merged format and upload to Google Cloud Storage:

Step 2: Create Dockerfile

Step 3: Build and Deploy

Step 4: Test Your Deployment

You can also deploy your model on AWS, Azure, or other cloud platforms using vLLM or SGLang.

Container Deployment

Docker Compose

Create a docker-compose.yml for easy local deployment:

Kubernetes Deployment

Deploy your model on Kubernetes for scalable production use:

Troubleshooting

Common Issues

Symptoms: Model fails to load or returns errorsSolutions:
  • Check model file integrity
  • Verify model format compatibility
  • Ensure sufficient memory allocation
  • Check file permissions
Symptoms: Slow inference, high latency, timeouts Solutions: - Optimize model quantization - Increase compute resources - Implement caching - Use batch processing
Symptoms: Out of memory errors, crashes Solutions: - Use quantized models - Increase memory allocation - Implement model sharding - Use smaller batch sizes
Symptoms: Connection timeouts, API failuresSolutions:
  • Check network connectivity
  • Verify firewall settings
  • Implement retry logic
  • Use load balancing

Next Steps

After deploying your model:
  1. Monitor Performance: Track metrics and user feedback
  2. Scale as Needed: Adjust resources based on usage patterns
  3. Iterate and Improve: Use production data to improve your model
  4. Maintain Security: Keep your deployment secure and updated
Your model is now ready for production use! Monitor its performance and gather feedback to continue improving your AI system.