Get started with AI for free using Phi-3 [Pt 6]

Microsoft Developer · Beginner ·🛠️ AI Tools & Apps ·1y ago

Key Takeaways

Get started with AI for free using Phi-3 and the Ollama tool, with interactive Jupyter notebooks and no need for a high-end GPU. Explore the Phi-3 model and Ollama tool directly from a browser, with hands-on experimentation and code examples.

Full Transcript

hey folks in this session we'll experiment with AI models using the oama tool and the five free model directly from a browser for that we've built an online playground that you can use for free on any machine that can run a web browser so you don't even need a fast GPU or CPU and this is meant to be interactive so go ahead and open that link that you'll also find in the video description so you can play along so if you open this link it will open this GitHub repository from there select the Cod space button in there and it will ask to create a Cod space a c space is an online development environment that you can use directly from your browser you need a GitHub account for that so if you don't have one you can create one for free next select create Cod space and then it will take a few minutes uh the first time to create the environment so you can just go grab a cup of coffee and wait till it's ready now we have something familiar it's the very same vs code editor that you know but right into your browser so first let's use the terminal to check that everything works so type in oyama Run f free so by running this command I can chat with the model it's like a minimal chat GPT right in my terminal I'm hearing my cat mirring in the background so for inspiration let's say create an IU about a Hungry Cat and there I get the response from the model so everything looks good in there so can play a bit with the model and once you're done you can use contrl D to close the chat next let's open this oama notebook in there this is a Jupiter notebook and it allows to mix markdown text along with code to create interactive experiences first we Define the model in there if you want to play with different model you can do it by changing the constant in there just make sure that you don't load the model with oama first now for every code block that you see you can modify the code if you want and you can get this button on the left that you can use to run the code make sure to run it at least once every time you see one to make sure you set the context right for the notebook next we set up the open AI client so that we can make calls to the model o provides a compatible API so we just have to set the bu URL in there and put an API key and F don't need it let's run it and now we can play with the SDK just notice uh this npm prefix here in the import it's because we're using Doo as our runtime to run typescript in the notebook here it wouldn't be needed uh if you're using njs so now that we have set up the open client we can use it to gener a chat completion so again uh we use the SDK we specify the model name and send it our prompt let's run it and here we get the result now it's your turn to play with the notebook we have more example here with prompt engering few shot learning and even retrival augmented generation so once you've completed the notebook we also have a few samples in this folder in there you can open any of them like for example this classic if you one and then you can run directly the example using the Run button at the top so here what I'm trying to do is extract the sentiment of a text using Json format and here we get the result so this is mostly positive not too much aggressive and in French now it's your turn to play with J Ai and the best thing is that you don't even have to set up anything stay tuned for the next video we have plenty more content coming for you to learn more about how you can use AI more effectively and deploy your apps when it's time to shine

Original Description

Time for some hands-on AI experimentation with our latest tutorial! Learn how to use the Ollama tool and Phi-3 model directly from your browser, with no need for a high-end GPU. Explore interactive Jupyter notebooks, tweak models, and run code examples to elevate your AI skills. Links: - AI JavaScript playground: https://github.com/Azure-Samples/ollama-javascript-playground - Phi-3 cookbook: https://github.com/microsoft/Phi-3CookBook/ - Azure OpenAI quickstart: https://learn.microsoft.com/azure/ai-services/openai/chatgpt-quickstart?tabs=command-line%2Ctypescript%2Cpython-new&pivots=programming-language-javascript Watch this series' playlist: https://aka.ms/genai-js All slides and code samples: https://github.com/microsoft/generative-ai-with-javascript #ai #phi3 #ollama Chapters: 00:00 Introduction 00:30 Setting Up the Online Playground 01:00 Running the Phi-3 Model 01:45 Exploring the Ollama Notebook 02:30 Generating Chat Completions 03:15 Sentiment Analysis Example 04:00 Conclusion and Next Steps
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Microsoft Developer · Microsoft Developer · 0 of 60

← Previous Next →
1 Prepare for the DP-300 exam & the Azure Database Administrator Associate cert | Data Exposed
Prepare for the DP-300 exam & the Azure Database Administrator Associate cert | Data Exposed
Microsoft Developer
2 What I Wish I Knew ... about landing a job in tech
What I Wish I Knew ... about landing a job in tech
Microsoft Developer
3 Igniting Developer Innovation with Vector Search
Igniting Developer Innovation with Vector Search
Microsoft Developer
4 Combining the power of vector search with Azure OpenAI then revolutionize image search with vectors!
Combining the power of vector search with Azure OpenAI then revolutionize image search with vectors!
Microsoft Developer
5 What I Wish I Knew ... about finding your place in tech
What I Wish I Knew ... about finding your place in tech
Microsoft Developer
6 Fluent UI React Insights: Accessible by default
Fluent UI React Insights: Accessible by default
Microsoft Developer
7 Signing Container Images with Notary Project
Signing Container Images with Notary Project
Microsoft Developer
8 What I Wish I Knew ... about finding your place in tech
What I Wish I Knew ... about finding your place in tech
Microsoft Developer
9 What programming languages does GitHub Copilot support?
What programming languages does GitHub Copilot support?
Microsoft Developer
10 What I Wish I Knew ... about how much your job can change
What I Wish I Knew ... about how much your job can change
Microsoft Developer
11 What I Wish I Knew ... about how much your job can change
What I Wish I Knew ... about how much your job can change
Microsoft Developer
12 How do I become more confident about AI?
How do I become more confident about AI?
Microsoft Developer
13 How do I become more confident about AI?
How do I become more confident about AI?
Microsoft Developer
14 Performance Demos of SQL’s Intelligent Query Processing Feedback capabilities | Data Exposed
Performance Demos of SQL’s Intelligent Query Processing Feedback capabilities | Data Exposed
Microsoft Developer
15 What I Wish I Knew ... about coming to Microsoft
What I Wish I Knew ... about coming to Microsoft
Microsoft Developer
16 What I Wish I Knew ... about coming to Microsoft
What I Wish I Knew ... about coming to Microsoft
Microsoft Developer
17 Revolutionizing Image Search with Vectors
Revolutionizing Image Search with Vectors
Microsoft Developer
18 Igniting developer innovation with Vector search and Azure OpenAI
Igniting developer innovation with Vector search and Azure OpenAI
Microsoft Developer
19 Getting Started with Azure AI Studio's Prompt Flow - Part 2
Getting Started with Azure AI Studio's Prompt Flow - Part 2
Microsoft Developer
20 What I Wish I Knew ... about finding my career path
What I Wish I Knew ... about finding my career path
Microsoft Developer
21 What I Wish I Knew ... about finding my career path
What I Wish I Knew ... about finding my career path
Microsoft Developer
22 Windows Terminal's journey to Open Source
Windows Terminal's journey to Open Source
Microsoft Developer
23 Can I trust the code that GitHub Copilot generates?
Can I trust the code that GitHub Copilot generates?
Microsoft Developer
24 What I Wish I Knew ... about interviewing
What I Wish I Knew ... about interviewing
Microsoft Developer
25 What I Wish I Knew ... about interviewing
What I Wish I Knew ... about interviewing
Microsoft Developer
26 What is the Microsoft TechSpark Program?
What is the Microsoft TechSpark Program?
Microsoft Developer
27 SQL Server 2022: Accelerate query performance while reducing query compile time - w/ no code changes
SQL Server 2022: Accelerate query performance while reducing query compile time - w/ no code changes
Microsoft Developer
28 What I Wish I Knew ... about discovering computer science
What I Wish I Knew ... about discovering computer science
Microsoft Developer
29 What I Wish I Knew ... about discovering computer science
What I Wish I Knew ... about discovering computer science
Microsoft Developer
30 Call center transcription and analysis using Azure AI
Call center transcription and analysis using Azure AI
Microsoft Developer
31 How to use Text Analytics for health in Azure AI Language
How to use Text Analytics for health in Azure AI Language
Microsoft Developer
32 Azure OpenAI-powered summarization in Azure AI Language
Azure OpenAI-powered summarization in Azure AI Language
Microsoft Developer
33 Accelerate data labeling using Azure OpenAI and Azure AI Language
Accelerate data labeling using Azure OpenAI and Azure AI Language
Microsoft Developer
34 Building a Private ChatGPT with Azure OpenAI
Building a Private ChatGPT with Azure OpenAI
Microsoft Developer
35 What I Wish I Knew ... about how to interview
What I Wish I Knew ... about how to interview
Microsoft Developer
36 What I Wish I Knew ... about how to interview
What I Wish I Knew ... about how to interview
Microsoft Developer
37 Getting Started with Azure AI Studio's Prompt Flow - Part 3
Getting Started with Azure AI Studio's Prompt Flow - Part 3
Microsoft Developer
38 Intelligent Apps with Azure Kubernetes Service (AKS)
Intelligent Apps with Azure Kubernetes Service (AKS)
Microsoft Developer
39 Getting Started with Azure Blob Storage | Data Exposed: MVP Edition
Getting Started with Azure Blob Storage | Data Exposed: MVP Edition
Microsoft Developer
40 Chat + Your Data + Plugins
Chat + Your Data + Plugins
Microsoft Developer
41 What I Wish I Knew ... about different career paths
What I Wish I Knew ... about different career paths
Microsoft Developer
42 What I Wish I Knew ... about different career paths
What I Wish I Knew ... about different career paths
Microsoft Developer
43 Advanced Dev Tunnels Features | OD122
Advanced Dev Tunnels Features | OD122
Microsoft Developer
44 Learn Live - Manage performance and availability in Azure Cosmos DB for PostgreSQL
Learn Live - Manage performance and availability in Azure Cosmos DB for PostgreSQL
Microsoft Developer
45 Plan your SQL Migration to Azure with confidence | Data Exposed
Plan your SQL Migration to Azure with confidence | Data Exposed
Microsoft Developer
46 What I Wish I Knew ... about social skills in a tech career
What I Wish I Knew ... about social skills in a tech career
Microsoft Developer
47 What I Wish I Knew ... about social skills in a tech career
What I Wish I Knew ... about social skills in a tech career
Microsoft Developer
48 All About Vectors, Search, and Function Calling in Azure OpenAI - Labor Day Special
All About Vectors, Search, and Function Calling in Azure OpenAI - Labor Day Special
Microsoft Developer
49 Introduction to project ORAS
Introduction to project ORAS
Microsoft Developer
50 What I Wish I Knew ... about finding the right major
What I Wish I Knew ... about finding the right major
Microsoft Developer
51 What I Wish I Knew ... about finding the right major
What I Wish I Knew ... about finding the right major
Microsoft Developer
52 What I Wish I Knew ... about how to approach programming
What I Wish I Knew ... about how to approach programming
Microsoft Developer
53 What I Wish I Knew ... about how to approach programming
What I Wish I Knew ... about how to approach programming
Microsoft Developer
54 Learn Live - Scale from a single node to multiple nodes with Azure Cosmos DB for PostgreSQL
Learn Live - Scale from a single node to multiple nodes with Azure Cosmos DB for PostgreSQL
Microsoft Developer
55 What I Wish I Knew ... about diversity in tech #1
What I Wish I Knew ... about diversity in tech #1
Microsoft Developer
56 What I Wish I Knew ... about diversity in tech #1
What I Wish I Knew ... about diversity in tech #1
Microsoft Developer
57 Get started with SQL Server AGs across Windows, Linux and Container Replicas | Data Exposed
Get started with SQL Server AGs across Windows, Linux and Container Replicas | Data Exposed
Microsoft Developer
58 Writing LLM Apps with Azure AI and PromptFlow
Writing LLM Apps with Azure AI and PromptFlow
Microsoft Developer
59 What I Wish I Knew ... about how cool working in tech could be
What I Wish I Knew ... about how cool working in tech could be
Microsoft Developer
60 Open Source foundation models in Azure Machine Learning & optimization techniques behind the scenes
Open Source foundation models in Azure Machine Learning & optimization techniques behind the scenes
Microsoft Developer

Get started with AI for free using Phi-3 and the Ollama tool, with interactive Jupyter notebooks and no need for a high-end GPU. Learn how to use the Ollama tool and Phi-3 model directly from a browser, with hands-on experimentation and code examples.

Key Takeaways
  1. Open the GitHub repository
  2. Create a Cod space
  3. Open the VS Code editor in the browser
  4. Run the Oyama command
  5. Play with the model
  6. Open the Ollama notebook
  7. Modify and run the code blocks
  8. Set up the Open AI client
  9. Use the SDK to generate chat completions
💡 You can experiment with AI models using the Ollama tool and Phi-3 model directly from a browser, with no need for a high-end GPU.

Related Reads

Chapters (7)

Introduction
0:30 Setting Up the Online Playground
1:00 Running the Phi-3 Model
1:45 Exploring the Ollama Notebook
2:30 Generating Chat Completions
3:15 Sentiment Analysis Example
4:00 Conclusion and Next Steps
Up next
✨ 12 Best AI Tools for Resume Writing in 2026 🔥 | Save Hours Every Week
Adewale Ogunsina
Watch →