Language allows us to convey and comprehend meaning. We read news, write agreements, and share our knowledge using Language. Machines have not been good at understanding Natural Language. The rise of Large Language Models in the last five years has given researchers and industry the hope that machines can finally understand language in a human-like fashion.

Large Language Models

  • have large model sizes, typically in gigabytes
  • are trained on massive datasets - some in petabytes
  • use deep learning

History of Large Language Models

Natural Language has been studied since 1950s. Early chatbots were leveraging Natural Language Processing (NLP), just like ChatGPT. Traditionally, models were specialized in a limited number of natural language processing tasks. Now with the advances in AI and computing, researchers can build models that can store a large amount of information and perform a large number of natural language processing (NLP) tasks. These “large” models are called Large Language Models.

How does a Large Language Model (LLM) work?

Large Language Models first determine the context of the data in natural language, then apply the algorithm to produce the desired outcome, such as responding to a query. From a technical standpoint, Large Language Models function similarly to any Language Model.

What differentiates Large Language Models from a Language Model is the training data and use cases, i.e., applications they enable. Large Language Models enable general-purpose use cases rather than domain-specific ones. For example, one model can answer questions, summarize documents, translate agreements, write poetry and programming code, and pass the bar exam.

How are Large Language Models (LLM) trained?

Large Language Models generally use unsupervised learning on enormous amounts of text data. A Large Language Model training process involves seven tasks:

  1. Dataset collection: Gather a diverse and extensive dataset with various topics and writing styles.

    Google’s BERT, with 340M parameters, is trained over 3.3 billion words (15 GB)
  2. Preprocessing: Remove any irrelevant, false, copyrighted, or sensitive information.

    OpenAI outsources this process to Kenyan workers who earn less than $2 per hour.

  3. Tokenization: Tokenize cleaned data in smaller units (words or subwords) and organize them into sequences.

  4. Objective (Language Modelling): Define the goal, such as next-word prediction, to guide the learning process.

  5. Model architecture: Choose an architecture, such as a transformer-based model.

  6. Training: Iteratively train the model using the collected dataset and the defined training objective by exposing the model to different portions of the dataset.

    Training requires a powerful computing infrastructure. Researchers estimate that training the 11 billion parameter variant of T5 costs above $1.3 million for a single run and $10 million for the entire project.

  7. Fine-tuning: Evaluate the model using validation data and fine-tune further to adapt it to more specific domains or improve its performance on pre-determined domains and tasks.

Example Applications of Large Language Models

  1. Large Language Models enable Natural Language Processing (NLP) applications: Text classification, sentiment analysis, named entity recognition, and translation.

  2. Large Language Models empower chatbots and voice assistants: Human-like interactions providing information, answering questions, and assisting users in various tasks.

    To use LLMs in voice assistants, voice inputs should be converted into text using a transcription engine such as Leopard or Cheetah to pass text to LLMs.

  3. Large Language Models generate text: Coherent and creative texts such as blog posts, code snippets, marketing taglines, and product descriptions.

  4. Large Language Models facilitate automated translation: Accurate and natural language translation across languages.

  5. Large Language Models improve semantic search: Enhanced search engines, supporting semantic understanding of queries and documents, improving search accuracy, and providing more relevant search results.

If you have specific questions about training or using Large Language Models, work with Picovoice Consulting to get your questions answered and brainstorm with experts.

Consult an Expert