Generative AI – Build Your Own LLM

By | September 9, 2023
chatgpt digital signage ai

Building Your Own LLM for AI

Building your own LLM is going to occur to you. If only to assist human assistants. A fashion designer can allow customers with a series of voice questions to locate a particular style of dress.  Taking it further, they could optionally “design” the dress they want and AI could output mechanical and pattern data to allow dressmaker to make.  And sell at a very high price with a very high margin.

One of the custom LLMs example in self-service is by Verneek. You are in health-oriented supermarket and want to do very specific queries for current products available with multiple characteristics. Not just the usual characteristics like is it onsale, is there a coupon, which department.  Much more specific context.

Consider the Verneek solution topology elements as we have detailed on Intel Marketplace

  • LSTM
  • Proprietary
  • BERT
  • RNN

Verneek works closely with Nvidia (see Tokkio toolset).

Nice article here covering:

  • A brief history of large language models
  • What are large language models?
  • Why large language models?
  • Different kinds of LLMs
  • What are the challenges of training LLM?
  • Infrastructure cost
  • Understanding the scaling laws
  • How do you train LLMs from scratch?
  • Continuing the text dialogue-optimized LLMs
  • How do you evaluate LLMs?

Here is a Nice writeup on building own LLM options

How to create your own Large Language Models (LLMs)!

Ravi Saraswathi

Ravi Saraswathi

Chief Technology Officer (CTO) of US Cloud Practice at Kyndryl

I am creating my own fine-tuned LLM right now. My name is on it 🙂

Hello and welcome to the realm of specialized custom large language models (LLMs)! LLMs are created to comprehend and produce human language. These models utilize machine learning methods to recognize word associations and sentence structures in big text datasets and learn them. LLMs improve human-machine communication, automate processes, and enable creative applications.

Instead of relying on popular Large Language Models such as ChatGPT, many companies eventually have their own LLMs that process only organizational data. Currently, establishing and maintaining custom Large language model software is expensive, but I expect open-source software and reduced costs for GPUs to allow organizations to make their LLMs.

No alt text provided for this image
Refine Enterprise LLMS from pre-trained LLMs utilizing Organization data

Why Enterprise LLMs?

Enterprise LLMs can create business-specific material including marketing articles, social media postings, and YouTube videos. It can create, review, and design company-specific software. Also, Enterprise LLMs might design cutting-edge apps to obtain a competitive edge.

Before designing and maintaining custom LLM software, undertake a ROI study. Custom LLMs cost a lot to create and maintain. LLM upkeep involves monthly public cloud and generative AI software spending to handle user enquiries, which is expensive.

Popular Large Language Models (LLMs):

Some of the popular language models are Google’s BERT (Bidirectional Encoder Representations from Transformers), Facebook’s Roberta (Robustly Optimized BERT approach), and OpenAI’s GPT (Generative Pre-trained Transformer). OpenAI published GPT-3 in 2020, a language model with 175 billion parameters. In 2023, OpenAI published GPT-4, its largest model. Google launched BERT LLMs in 2018. BERT converts data sequences using transformers.

How do I build Enterprise LLMs (Large Language Models)?

The key steps include selecting a platform, selecting a language modeling algorithm, training the language model, deploying the language model, and maintaining the language model.

No alt text provided for this image

A big, diversified, and decisive training dataset is essential for bespoke LLM creation, at least up to 1TB in size. You can design LLM models on-premises or using Hyperscaler’s cloud-based options. Cloud services are simple, scalable, and offloading technology with the ability to utilize clearly defined services. Use Low-cost service using open source and free language models to reduce the cost.

Options for creating Enterprise LLMs:

1. Use on-prem data center:

Use your data center hardware for creating LLMs. Hardware is an expensive component. GPUs cost a lot of money. Free Open-Source models include HuggingFace BLOOM, Meta LLaMA, and Google Flan-T5. HuggingFace and Replicate are emerging models for API hosts. Enterprises can use LLM services like OpenAI’s ChatGPT, Google’s Bard, or others.

Pros: The model gives you full data processing control. Privacy-conscious buyers may welcome this strategy. You can easily customize the model for your use case, enabling more specific applications and quick responses to unanticipated needs. With large throughput and challenging scaling, this method may be cheaper over time. The model is yours. Your product is tougher to copy and more competitive if you customize the “secret sauce” to your use case.

Cons: Hosting the model yourself takes more technical expertise and infrastructure, making it harder to set up and integrate. All model upgrades must be built in-house. It could be costly and complicated. You must have in-house ML professionals who can fine-tune models and MLOps. Turnover and onboarding of new hires might also slow progress

Create custom Large Language Models (LLMs) using On-Prem hardware:

You can create language models that suit your needs on your hardware by creating local LLM models.

  1. Use LLMs platform for build – Many use Anaconda for open-source data science and machine learning applications. It has several LLM-building resources. Build LLM libraries and dependencies can build using Python.
  2.  Build & train machine learning models – The open-source platform TensorFlow trains machine learning models. Huggingface has pre-trained LLMs. Choose a Hugging Face pre-trained model like GPT-2 for fine-tuning.
  3. Fine-tuning and customization – Python is ideal for training the model on a specific dataset for a specific goal.

2. Use Hyperscalers:

Use Hyperscale services such as AWS Sagemaker, Google GKE/TensorFlow & Azure Machine learning services.

How to use Public cloud services *AWS, Azure & GCP* for creating custom LLMs?

  • AWS Machine Learning services like Amazon SageMaker simplify LLM model creation by integrating data processing, model training, deployment, and monitoring.Train your LLM model using Amazon SageMaker. Select a GPU-capable instance type to speed up training.
  • Google TensorFlow Model Garden or other trained models on Google Cloud along with Google’s Prediction API are some of the services provided by Google Cloud. Use GKE, Google Cloud AI Platform Prediction to install your custom LLM model. Google generative AI app builder, PALM API and Makers suite (Model training tools, model deployment tools, model monitoring tools) can be utilized for managing Apps.
  • Azure Machine Learning trains custom LLM models. Use a base model to tweak. You can utilize Azure AI Marketplace or other pre-trained models.

3. Use the Subscription model:

OpenAI, Cohere, and Anthropic provide language models via API subscriptions. Simply join a provider for API access. Data input and output length determine user fees.

Pros: Setup is simple, no infrastructure is needed. API makes model access uniform, simplifying integration and acceptance. String-free. Simple APIs. Swap providers if LLMs suit you. LLM setup and usage without ML Ops saves time, money, and effort.

Cons: Sending data to a third party may risk leaks and algorithm improvement. Offering this to enterprise customers may be difficult. Service level agreements and pricing strategy set subscription prices. Scaled closing-source solutions may cost more than in-house models.

Community-made ML apps and LLMs

Large language models created by the community are frequently available on a variety of online platforms and repositories, such as Kaggle, GitHub, and Hugging Face.

No alt text provided for this image
Explore the best community-created ML apps.

Summary

On-prem data centers, hyperscalers, and subscription models are 3 options to create Enterprise LLMs. On-prem data centers are cost-effective and can be customized, but require much more technical expertise to create. Smaller models are inexpensive and easy to manage but may forecast poorly. Companies can test and iterate concepts using closed-source models, then move to open-source or in-house models once product-market fit is achieved.

Creating LLMs requires infrastructure/hardware supporting many GPUs (on-prem or Cloud), a big text corpus of at least 5000 GBs, language modeling algorithms, training on datasets, and deploying and managing the models.

An ROI analysis must be done before developing and maintaining bespoke LLMs software. For now, creating and maintaining custom LLMs is expensive and in millions. Most effective AI LLM GPUs are made by Nvidia, each costing $30K or more. Once created, maintenance of LLMs requires monthly public cloud and generative AI software spending to handle user inquiries, which can be costly. I predict that the GPU price reduction and open-source software will lower LLMS creation costs in the near future, so get ready and start creating custom LLMs to gain a business edge.

Published by

Ravi Saraswathi

Status is reachable
Chief Technology Officer (CTO) of US Cloud Practice at Kyndryl
In the near future, I believe most companies will begin designing their own fine-tuned Artificial Intelligence (AI) Large Language Models (LLMs) to gain a competitive edge and reduce data exposure. In this article, I outline three simple ways to create bespoke enterprise LLMs based on available technology.
More Posts
  • https://kioskindustry.org/kiosk-translating-in-sign-language-assist-deaf-customers-and-help-restaurants-reduce-risk-of-ada-lawsuits/

 

Author: Staff Writer

Craig Keefner is the editor and author for Kiosk Association and kiosk industry. With over 30 years in the industry and experience in large and small kiosk solutions, Craig is widely considered to be an expert in the field. Major kiosk projects for him include Verizon Bill Pay kiosk and hundreds of others.