Showing posts with label Text Generation. Show all posts
Showing posts with label Text Generation. Show all posts

Monday, August 26, 2024

🚀 What is an LLM Inference Engine?

I've recently received questions about LLM inference engines on my YouTube channel, "Murat Karakaya Akademi." This topic is becoming increasingly important as more organizations integrate Large Language Models (LLMs) into their operations. If you're curious to learn more or see a demonstration, feel free to visit my channel (https://www.youtube.com/@MuratKarakayaAkademi).

🚀 What is an LLM Inference Engine?

An LLM inference engine is a powerful tool designed to make serving LLMs faster and more efficient. These engines are optimized to handle high throughput and low latency, ensuring that LLMs can respond quickly to a large number of requests. They come with advanced features like response streaming, dynamic request batching, and support for multi-node/multi-GPU serving, making them essential for production environments.

Why Use Them?

  • 🎯 Simple Launching: Easily serve popular LLMs with a straightforward setup [1].
  • 🛡️ Production Ready: Equipped with distributed tracing, Prometheus metrics, and Open Telemetry [2].
  • Performance Boost: Leverage Tensor Parallelism, optimized transformers code, and quantization techniques to accelerate inference on multiple GPUs [3].
  • 🌐 Broad Support: Compatible with NVIDIA GPUs, AMD and Intel CPUs, TPUs, and more [1].

Examples include:

  • vLLM: Known for its state-of-the-art serving throughput and efficient memory management [1].
  • Ray Serve: Excellent for model composition and low-cost serving of multiple ML models [2].
  • Hugging Face TGI: A toolkit for deploying and serving popular open-source LLMs [3].

#LLM #MachineLearning #AI #InferenceEngine #MuratKarakayaAkademi

References: [1] What is vLLM? https://github.com/vllm-project/vllm
[2] Ray Serve Overview https://docs.ray.io/en/latest/serve/index.html?_gl=1*14i4ooq*_gcl_au*MTE0Mjg5OTE0Ni4xNzI0NjY5MTkx

[3] Hugging Face Text Generation Inference https://huggingface.co/docs/text-generation-inference/en/index 

Tuesday, November 8, 2022

Text Generation in Deep Learning with Tensorflow & Keras: Fundamentals

Text Generation in Deep Learning with Tensorflow & Keras: Fundamentals

This tutorial is the first part of the “Text Generation in Deep Learning” series. We will cover all the topics related to Text Generation with sample implementations in Python Tensorflow KerasYou can access the codesvideos, and posts from the below links. In this part, we will learn the Fundamentals of Text Generation in Deep Learning.


You can access to all parts of the Deep Learning with Tensorflow & Keras Series at my blog muratlkarakaya.netYou can watch all these parts on the Murat Karakaya Akademi YouTube channel in ENGLISH or TURKISHYou can access the complete Python Keras codes in the video description of each part.

If you would like to learn more about Deep Learning with practical coding examples, please subscribe to my YouTube Channel or follow my blog on muratkarakaya.net. Please, turn on notifications to notify you when new parts are uploaded.





Text Generation in Deep Learning with Tensorflow & Keras Tutorial Series

 

Text Generation in Deep Learning with TensorFlow & Keras Tutorial Series

This is the index page of the “Text Generation in Deep Learning” tutorial series. We will cover all the topics related to Text Generation with sample implementations in Python TensorFlow KerasYou can access the codesvideos, and posts from the below links.

If you would like to learn more about Deep Learning with practical coding examples, please subscribe to my YouTube Channel or follow  my blog on muratkarakaya.netDo not forget to turn on notifications so that you will be notified when new parts are uploaded.



Building an Efficient TensorFlow Input Pipeline for Character-Level Text Generation

Building an Efficient TensorFlow Input Pipeline for Character-Level Text Generation

This tutorial is the second part of the “Text Generation in Deep Learning with Tensorflow & Keras” series. 

In this tutorial series, we have been covering all the topics related to Text Generation with sample implementations in PythonIn this tutorial, we will focus on how to build an Efficient TensorFlow Input Pipeline for Character-Level Text Generation

First, we will download a sample corpus (text file). After opening the file and reading it line-by-line, we will convert it to a single line of text. Then, we will split the text into input character sequence (X) and output character (y). 

Using tf.data.Dataset and Keras TextVectorization methods, we will

  • preprocess the text,
  • convert the characters into integer representation,
  • prepare the training dataset,
  • and optimize the data pipeline.

Thus, in the end, we will be ready to train a Language Model for character-level text generation.

If you would like to learn more about Deep Learning with practical coding examples, please subscribe to Murat Karakaya Akademi YouTube Channel or follow my blog on muratkarakaya.net. Do not forget to turn on notifications so that you will be notified when new parts are uploaded.



Photo by Harry Grout on Unsplash

Building an Efficient TensorFlow Input Pipeline for Word-Level Text Generation

 Building an Efficient TensorFlow Input Pipeline for Word-Level Text Generation


This tutorial is the third part of the “Text Generation in Deep Learning with Tensorflow & Keras” series.

In this series, we have been covering all the topics related to Text Generation with sample implementations in PythonThis tutorial will focus on how to build an Efficient TensorFlow Input Pipeline for Word-Level Text GenerationFirst, we will download a sample corpus (text file). After opening the file and reading it line-by-line, we will split the text into words. Then, we will generate pairs including an input word sequence (X) and an output word (y).

Using tf.data API and Keras TextVectorization methods, we will

  • preprocess the text,
  • convert the words into integer representation,
  • prepare the training dataset from the pairs,
  • and optimize the data pipeline.

Thus, in the end, we will be ready to train a Language Model for word-level text generation.

If you would like to learn more about Deep Learning with practical coding examples, please subscribe to Murat Karakaya Akademi YouTube Channel or follow my blog on muratkarakaya.net. Do not forget to turn on notifications so that you will be notified when new parts are uploaded.

If you are ready, let’s get started!



Photo by Quinten de Graaf on Unsplash

Sampling in Text Generation

 

Sampling in Text Generation

This tutorial is the fourth part of the “Text Generation in Deep Learning with Tensorflow & Keras” tutorial series. In this series, we have been covering all the topics related to Text Generation with sample implementations in Python.

In this tutorial, we will focus on how to sample (select) the next token in Text GenerationFirst, we will introduce the text generation process. Then, we will briefly present the most common methods of sampling. Afterward, we will implement three sampling methods: Greedy Sampling, Temperature Sampling, and Top-k sampling. We will discuss the advantages and disadvantages of these methods as well. Thus, in the end, we will understand the sampling in Text Generation and prepare the implementation of three popular sampling methods to use in upcoming parts for word-level text generation.

You can access to all parts of the Deep Learning with Tensorflow & Keras Series at my blog muratlkarakaya.netYou can watch all these parts on the Murat Karakaya Akademi YouTube channel in ENGLISH or TURKISHYou can access the complete Python Keras codes in the video description of each part.

If you would like to learn more about Deep Learning with practical coding examples, please subscribe to Murat Karakaya Akademi YouTube Channel or follow  my blog on muratkarakaya.net. Do not forget to turn on notifications so that you will be notified when new parts are uploaded.

If you are ready, let’s get started!



Photo by Brett Jordan on Unsplash

Character Level Text Generation with an LSTM Model

 

Character Level Text Generation with an LSTM Model

This tutorial is the fifth part of the “Text Generation in Deep Learning with Tensorflow & Keras” series. In this series, we have been covering all the topics related to Text Generation with sample implementations in Python, Tensorflow & Keras

In this tutorial, we will focus on how to build a Language Model using Keras LSTM layer for Character Level Text GenerationFirst, we will download a sample corpus (text file). After opening the file, we will apply the TensorFlow input pipeline that we have developed in Part B to prepare the training dataset by preprocessing and splitting the text into input character sequence (X) and output character (y). Then, we will design an LSTM-based Language Model and trai n it using the train set. Later on, we will apply several sampling methods that we have implemented in Part D to generate text and observe the effect of these sampling methods on the generated text. Thus, in the end, we will have a trained LSTM-based Language Model for character-level text generation with three sampling methods.

You can access all the parts of the Text Generation in Deep Learning with Tensorflow & Keras tutorial series on my blog at muratkarakaya.netYou can watch all these parts on the Murat Karakaya Akademi channel on YouTube in ENGLISH or TURKISHYou can access this Colab Notebook using the link.

If you would like to learn more about Deep Learning with practical coding examples, please subscribe to Murat Karakaya Akademi YouTube Channel or follow my blog at muratkarakaya.net. Do not forget to turn on notifications so that you will be notified when new parts are uploaded.

If you are ready, let’s get started!



Photo by Jan Huber on Unsplash

Character Level Text Generation with an Encoder-Decoder Model

Character Level Text Generation with an Encoder-Decoder Model


This tutorial is the sixth part of the “Text Generation in Deep Learning with Tensorflow & Keras” series. In this series, we have been covering all the topics related to Text Generation with sample implementations in Python, Tensorflow & Keras

After opening the file, we will apply the TensorFlow input pipeline that we have developed in Part B to prepare the training dataset by preprocessing and splitting the text into input character sequence (X) and output character (y). Then, we will design an Encoder-Decoder approach with Bahdanau Attentionas the Language Model. We will train this model using the train set. Later on, we will apply several sampling methods that we have implemented in Part D to generate text and observe the effect of these sampling methods on the generated text. Thus, in the end, we will have a trained Encoder Decoder-based Language Model for character-level text generation with three sampling methods.

You can access to all parts of the Deep Learning with Tensorflow & Keras Series at my blog muratlkarakaya.netYou can watch all these parts on the Murat Karakaya Akademi YouTube channel in ENGLISH or TURKISHYou can access the complete Python Keras code here.  

If you would like to learn more about Deep Learning with practical coding examples, please subscribe to Murat Karakaya Akademi YouTube Channel or follow my blog on muratkarakaya.net.  Do not forget to turn on notifications so that you will be notified when new parts are uploaded.

If you are ready, let’s get started!

Last updated on 25th March 2022.



Photo by Emile Perron on Unsplash

Controllable Text Generation in Deep Learning with Transformers (GPT3) using Tensorflow & Keras Tutorial Series

 

Controllable Text Generation in Deep Learning with Transformers (GPT3) using Tensorflow & Keras Tutorial Series

This is the index page of the “Controllable Text Generation in Deep Learning with Transformers (GPT3) using Tensorflow & Keras” tutorial series.

We will cover all the topics related to Controllable Text Generation with sample implementations in Python Tensorflow Keras.

You can access the codesvideos, and posts from the below links.

You may like to start with learning the Text Generation methods in Deep Learning with Tensorflow (TF) & Keras from this tutorial series.

If you would like to learn more about Deep Learning with practical coding examples, please subscribe to the Murat Karakaya Akademi YouTube Channel or follow my blog on muratkarakaya.net. Do not forget to turn on notifications so that you will be notified when new parts are uploaded.

Last updated: 14/05/2022



Photo by Ibrahim Boran on Unsplash

Fundamentals of Text Generation

 

Fundamentals of Text Generation

Author: Murat Karakaya
Date created: 21 April 2021
Last modified: 19 May 2021
Description: This is an introductory tutorial on Text Generation in Deep Learning which is the first part of the “Controllable Text Generation with Transformers” series

Accessible on:



Photo by Markus Spiske on Unsplash

tf.data: Tensorflow Data Pipelines Tutorial Series

 

tf.data: Tensorflow Data Pipelines Tutorial Series

INDEX PAGE: This is the index page of the “tf.data: Tensorflow Data Pipelines” series.

We will cover all the topics related to tf.data Tensorflow Data Pipeline with sample implementations in Python Tensorflow Keras.

You can access the codesvideos, and posts from the below links.

If you would like to learn more about Deep Learning with practical coding examples, please subscribe to my YouTube Channel or follow my blog on Blogger. Do not forget to turn on notifications so that you will be notified when new parts are uploaded.



Photo by Florian Wächter on Unsplash