What's next? Next word prediction with PyTorch

Today, I will take you through a simple next-word prediction model built using PyTorch. The inspiration for this, is of course predictive text - or more specifically Google’s Smart Compose. At its core, the Google Smart Compose model is a form of language model. Smart Compose uses a few words the user inputs and then predicts the following words or sentences in emails you want to write. Google details how they build their Smart Compose feature in their research blog post here. From this, I want to pull out some requirements for building a successful Smart Compose model: ...

November 8, 2023 · 7 min · James Malcolm

Handling multiple interactions with Langchain

There are many tutorials on getting started with Langchain and LLMs to create simple chat applications. I want to go slightly beyond this post and go into a bit of detail on the role of memory has in chat applications, and lastly touch on how you can scale your application across multiple sessions and multiple users. What is Langchain? Langchain is an open-source python package that helps in creating LLM solutions. It has four main modules: ...

October 24, 2023 · 5 min · James Malcolm

Counting Pennies - Deploy or buy GenAI?

In this post, we explore the cost of deploying or buying your generative AI. Specifically, I want to focus on the computing cost - not the additional costs which contribute to the total cost of ownership. In this, I want to explore three options, these are: Managed: Use OpenAI directly Self-managed: Deploy using AWS Self-managed: Deploy using Google Cloud This post is part of my wider LLM series. Handling multiple interactions with Langchain LLM Risks - Prompt Injection Or a full list of posts, available here. ...

August 7, 2023 · 5 min · James Malcolm

LLM Risks - Prompt Injection

Generative AI models are all the rage nowadays. For data people, generative models have been around for several years, but the power and usability of products such as ChatGPT have taken the world by storm. This emergence has brought in new and emerging security risks with it. One of the largest and most novel risks is prompt injection. Prompt injection attacks can affect all large language and generative AI models. ...

June 15, 2023 · 4 min · James Malcolm

Hacking your Trustpilot score

Is this a clickbait title? Perhaps. Consumers are 74% more likely to purchase from a business with positive online reviews, coupled with Trustpilot’s reach - it’s becoming a easy decision to manage your TrustScore. Done successfully, there’ll be no shortage of customer feedback on your products and services, providing the following benefits: Word of mouth advertising. Trustpilot’s 3 million reviews posted every month help provide social proof for consumers ...

March 28, 2023 · 3 min · James Malcolm