GenAI has taken the world by storm. Many of us are enjoying its use daily. Whether it’s for getting advice on virtually any topic, code generation, making images or summarizing a difficult legal text; for many of us living without GenAI has become unthinkable. The most prominent GenAI model, or should I say application, is ChatGPT. However, left and right new companies pop-up that jumped on ChatGPT’s success and have created applications for use cases of their own. As a business owner or AI enthusiast, you may wonder; how would I go about making an AI for my specific use case? Here I’ve listed the five ways you can start implementing AI yourself, ranging from the most difficult to the easiest ways to make an AI.
Difficulty level: *****
Requirements: Full ML stack expertise, infrastructure skills, tons of data.
When people see a GenAI business, most would think that they made a model from scratch. However, you’ll come to find that almost all of AI businesses are made through the other methods listed below. This is with good reason. By far the hardest way to get started is training a model from scratch. Building a model from scratch requires you have ample data (e.g. scraping all of the internet), computing sources and in-house AI expertise. However, the reason you’d do this, is when you require full control over the model’s architecture and training, for instance when you need a highly specialized language model for a niche industry requiring a domain-specific dataset.
Another reason would be that you don’t want to be locked-in by any vendor’s base models. When you have the data to build your own model, you’re entirely self-reliant and can adapt and improve performance if you feel that the latest GPT, LLaMA and other models don’t fulfil your purpose.
Finally, pre-trained models are designed to handle general tasks, such as conversational AI, image generation or text generation. If your business needs a specialized solution, such as interpreting multi-modal data (e.g., text and images), a custom model may be necessary.
However, it’s safe to say that for most use cases (and likely yours), you’re not required to have full control over the model’s architecture and training, and find that the benefits of using a pretrained model, by far outweighs the downsides of making your own.
Difficulty level: ***
Requirements: Python, ML frameworks, Cloud Services / deployment.
Lucky for us, a ton of these powerful pretrained models are free to download from public repositories. For example you can find a ton of models on HuggingFace or download them directly through PyTorch. Aside from generative models such as LLMs or image generation models (including well known ones like LLaMA or GPT models), you can get models for computer vision, text to speech, image to video and much more.
No matter what you choose to use (including making your own model), you need a way for your application or service to interface with the model. This can be done by making a cloud service such as an API and will require a backend engineer to set up the backend (microservice) architecture to make the model usable in your application or service. What is great about this, is that you don’t need a data scientist on your team to set this up. All you need is (a team of) backend developers that are able to feed the input data into the model and return the output.
Difficulty level: **
Requirements: API integration, Microservice development, technical infrastructure
Setting up the infrastructure to interface with an LLM may be challenging for some. Additionally, it may be costly and takes a while to set up. If you want a quick and cost effective way to use the power of ChatGPT for your application you can do so through OpenAI’s API. OpenAI offers an easy to use application programming interface that allows you to use the power of a variety of models ranging from language models (including their latest) to image models and even audio models. However, there are a couple of downsides to the use of OpenAI’s API. Like with any of the AI services, privacy may be an issue. OpenAI’s API may log prompts and completions temporarily for monitoring abuse and improving the model. However, as of recent updates, OpenAI provides options for customers to opt out of such data retention by default for most enterprise plans. The jurisdiction in which OpenAI operates might not align with your local regulations (e.g., GDPR, HIPAA, or CCPA) and OpenAI’s servers may not be located in your region, leading to cross-border data transfer concerns.
However, in most cases this should not be a concern and setting up your AI-powered application through OpenAI’s API is a valid and quick way to get started. For example, for my company Workbee, we implemented automated Job Description optimization through the OpenAI API.
Difficulty level: ****
Requirements: Fine-tuning, data preparation, ML frameworks.
When the LLM that you need has to follow a specific format (e.g. it has to provide text with a certain composition, you want to save tokens because the generic models are too verbose or your model requires specific domain knowledge), you can adapt and fine-tune pretrained models.
By far the most convenient way to fine-tune OpenAI’s LLMs is through OpenAI’s fine-tuning services. It’s inexpensive and the fine-tuning service handles the whole cloud infrastructure for you which saves you time and personnel costs. In short, you compile the data with which you want to finetune the model, train the model with it and then, via API, you can use it as you would any other model. This, however, has a couple of caveats; The data that you feed the model will have to be uploaded to OpenAI and be trained on their servers. This means that if you have any sensitive or proprietary data you’d be sharing that with OpenAI. Once you’ve fine-tuned the model, it will live on OpenAI’s servers. Meaning, in order to interface with it you’ll have to use their API which will continue to cost money and may lead to being locked-in.
If you have the resources to set up training of an LLM yourself you can download any of the freely available LLMs and fine tune that by feeding your data into it on your own cloud infrastructure. You can then easily download the model from your servers and use it anywhere you want, using any infrastructure you need. What’s great about this is that you have all the access and rights to your model, you’re not dependent on OpenAI and can optimize costs so that it fits your business, likely saving money in the long run.
Of course, in both these cases, you have to provide the model with ample data to train the pretrained models with. Soon I’ll provide another blog post with a code example showing you how to effectively fine-tune your LLM.
Difficulty level: *
Requirements: Minimal coding (depending on the solution)
If you don’t have any development resources, you need an MVP up and running quickly or you want to try it out and see whether your users are open to interacting with an AI you can opt for buying ready made solutions. Today there are a ton of startups that have developed solutions for a wide variety of use cases.
The downside is of course that, in the long run, it may be more expensive to buy a complete solution than to make one of your own. Additionally, depending on how much you’ll build your company on top of the solution provider, you may be locking yourself in to using the solution indefinitely.
There you have it, these are the 5 ways to get started with GenAI for your business. If you need tailored advice on how to implement AI for your specific case, feel free to drop me a message and I’ll provide you with my insights.