Giter Club home page Giter Club logo

azureai-inference-workshop-2024's Introduction

Azure AI Inference Workshop

1. Motivation

Building generative AI applications involves working with a wide range of language models from diverse providers.

  • Language models can be large (LLM) or small (SLM) in terms of model size and complexity.
  • Models can be proprietary (e.g., GPT-4 from OpenAI) or open-source (e.g., GPT-2 from HuggingFace).
  • Models can differ in their capabilities (text generation, embedding) and API features (config parameters, system prompt, stop words etc.)

This creates a challenge for AI application developers when interacting with these models - particularly when they want to evaluate diverse models, or switch to a different model later.

2. Introduction

The Azure AI Model Inference API tries addresses this challenge by providing a unified API that abstracts the differences between the various models into common API calls for convenience - while providing extensibility to support model-specific features.

Developers can now focus on building their applications for a specific capability without worrying about how that capability is implemented in a specific model instance.

3. Learning Objectives

In this workshop, we'll explore the Azure AI Model Inference API from core concepts to applied usage with various models and inference tasks.

By the end of the workshop you should be able to:

  1. Describe the Azure AI Inference API capabilities
  2. Describe the benefits of using the unified API
  3. Configure your application to use the unified API
  4. Use Inference API with diverse deployed models
  5. Ensure responsible AI with content safety tooling

4. Pre-Requisites

  • Python 3.8 or higher
  • Azure Subscription
  • Model Deployments (Azure AI Studio)
  • Authentication Credentials

Model deployments will have default key, endpoint, region properties.

  • Use endpoint for initializing the inference API library.
  • Use key to create a traditional authentication credential if preferred.
  • Alternatively, use Microsoft Entra ID (32-character string) for a secure managed identity solution.

Check out the samples README for updated requirements.

5. Supported Models

Currently, we can deploy models in the Azure AI platform in one of two ways:

  • Managed Compute Endpoints - using Models as a Platform (MaaP) with subscription based pricing for managed inference capability.
  • Serveless API Endpoints - using Models As a Service (MaaS) with token-based billing for pay as you go inference capability.

Currently only a subset of these models are available for use with the Azure AI Inference API.

Azure Inference API Managed Serverless
Cohere Embed V3 family -
Cohere Command R family -
Meta LLama 2 chat family -
Meta Llama 3 instruct family
Phi-3 family
Mistral-Small -
Mistral-Large -
Mixtral family

6. Related Resources

  1. Docs - Azure AI Model Inference API
  2. Docs - Azure AI Inference Library (Python)
  3. Docs - AI Model Inferene Package (Python)
  4. Repo - Azure AI Inference Samples (Python)
  5. Docs - Deploy models .. with Azure AI Studio

7. Get Started

Step-by-step instructions will be provided in the docs/ folder. You can view the workshop guide in your browser by opening this repository in GitHub Codespaces (or Docker Desktop) then using this command:

mkdocs serve

This should start the dev server at http://localhost:8000 so you can preview the guide. You should also see a pop up a dialog with options to view the preview in the browser, or in the Visual Studio Code editor. If you miss the pop up, you can open the Visual Studio Code Terminal Ports tab and use the options under the Forwarded Address column to take desired actions.

azureai-inference-workshop-2024's People

Contributors

nitya avatar

Watchers

Lucian avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.