Showing posts with label text generation. Show all posts
Showing posts with label text generation. Show all posts

Saturday, April 26, 2025

Azure AI Foundry - Part4 - Deploy and use a generative AI model

Azure AI Foundry supports deploying large language models (LLMs). In this article, we will see how to deploy a model and use it.

Azure AI Foundry Portal

  • Select your project - My assets - Models + endpoints - Deploy model
  • Click Deploy base model
  • Select the model you want to deploy (here I am selecting gpt-4.1) and click Confirm

  • You can see the deployment details like capacity (token per minute), resource location etc. 
  • Click on Create resource and deploy

  • Now it will start creating the resource and this step may take a minute or so.
  • Once it is done, it will take you to the following page where you can see the mode details on the model you just deployed.

  • Click on Open in playground to test the model.
  • Once the chat playground is open, you will see your deployment, and under that you will see a section where you can give the model instructions and context. An example is given in the following screenshot. Once the model instructions and context are provided make sure to click Apply changes button. 
  • Now you can click on Generate prompt, provide the query and click on Send.
  • You can also set values for limiting the maximum output token for the model response, temperature, frequency penalty etc. under the Parameters section.

  • A sample response is provided in the following screenshot.

  • To see the sample code, you can click on View code.
  • You can also see code samples and authentication using API key as shown below.

  • Metrics (total requests, token count, etc.) related to your LLM model deployment can be found on the following page.

 

Python


Sample code to interact with the model can be found in my GitHub repo.

Hope it was useful. Cheers!

Tuesday, April 22, 2025

Azure AI Foundry - Part3 - Abstractive text summarization

In this article, I will show you how to use Azure Cognitive Services for text summarization. 

Azure AI Foundry portal

  • AI Services - Language + Translator


  • Summarize Information - Summarize text


  • Select a connected AI service resource or create a new one.


  • Playgrounds - Summarize Information - Summarize text


Python


Sample code to summarize a PDF can be found in my GitHub repo. Following is an example of a resume summary: 


Hope this was useful. Cheers!

Thursday, March 28, 2024

Generative AI and LLMs Blog Series

In this blog series we will explore the fascinating world of Generative AI and Large Language Models (LLMs). We delve into the latest advancements in AI technology, focusing particularly on LLMs, which have revolutionized various fields, including natural language processing and text generation.

Throughout this series, we will discuss LLM serving platforms such as Ollama and Hugging Face, providing insights into their capabilities, features, and applications. I will also guide you through the process of getting started with LLMs, from setting up your development/ test environment to deploying these powerful models on Kubernetes clusters. Additionally, we'll demonstrate how to effectively prompt and interact with LLMs using frameworks like LangChain, empowering you to harness the full potential of these cutting-edge technologies.

Stay tuned for insightful articles, and hands-on guides that will equip you with the knowledge and skills to unlock the transformative capabilities of LLMs. Let's explore the future of AI together!

Image credits: designer.microsoft.com/image-creator


Ollama

Part1 - Deploy Ollama on Kubernetes

Part2 - Prompt LLMs using Ollama, LangChain, and Python

Part3 - Web UI for Ollama to interact with LLMs

Part4 - Vision assistant using LLaVA


Hugging Face

Part1 - Getting started with Hugging Face

Part2 - Code generation with Code Llama Instruct

Part3 - Inference with Code Llama using LangChain

Part4 - Containerize your LLM app using Python, FastAPI, and Docker

Part5 - Deploy your LLM app on Kubernetes 

Part6 - LLM app observability <coming soon>