LLM

LLM - Large Language Models with text-generation-webui

AI, LLM, Models... very interesting topic, I'm exploring and the more I learn the more I want to go further... Am I AI ? 100% blood and flesh here :)

· 3 min read
LLM - Large Language Models with text-generation-webui

First, what is LLM ?

Large Language Models (LLMs):

  1. Definition: LLMs are artificial neural networks trained on massive datasets to generate human-like text, perform natural language processing tasks, and simulate conversational interactions.
  2. Importance: LLMs have revolutionized the field of natural language processing due to their ability to produce high-quality text and better understand nuances within language.
  3. Examples: Some popular LLMs include GPT-3, OpenAI's ChatGPT, Google's PaLM, and Facebook's BlenderBot.

Text-Generation Web UIs:

  1. Overview: Text-generation web UIs allow users to interact directly with LLMs via a browser interface, enabling them to create content such as essays, poems, stories, and even code snippets.
  2. Benefits: These interfaces provide an accessible platform for individuals to explore and experiment with advanced language generation technologies without requiring specialized knowledge or programming skills.
  3. Popular examples: Notable text-generation web UIs include Hugging Face's Hub, EleutherAI's Gpt-Jot, and Stability AI's Stable Diffusion.
What's cool is that you can do it at home, on your computer, of course result may vary with the hardware you own, but if you have a decent GPU you should be good !

For this experimentation I'm using Ubuntu 22.04 server, you can use Desktop and even if you want, use Windows, you'll find everything needed on their GitHub.

# Install git if no present
sudo apt install git

# /opt to deploy Oobabooga
cd /opt

# Getting the files from the repo
sudo git clone https://github.com/oobabooga/text-generation-webui.git

# giving some rights to the current user on the newly created directory
sudo chown your_user:xxx -R text-generation-webui/ 

# initial deployment
cd text-generation-webui
sudo apt install curl
bash start_linux.sh
# answer the two questions about your GPU

then control-c to close the process and execute it again by adding --silent argument, that will allow you to access remotely (from another computer in the same subnet) to this instance :

bash start_linux.sh --listen

here you go, you can access it with http://ipaddress:7860

There is no model loaded yet so this thing is "dumb", we need to feed this engine some brain power. There are a lot of model available for many different purposes and needs.

Many of these are hosted here and are free !

Hugging Face – The AI community building the future.
We’re on a journey to advance and democratize artificial intelligence through open source and open science.

To begin with I will chose this model : https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-AWQ

it's pretty massive, it fits my computer power capacity and it has French language as well as English.

Click on the copy icon next to the name of the model on its webpage

and copy it in

Then click on download, be careful these models can be heavy to download, check the console server you should be able to see what's going on :

Once it's done, on the same page click on the refresh button :

The downloaded model appears, select it and click on Load

now this is loaded you can head over the chat menu and play with the IA

you can look for other models that will fit what you're looking for. I find it really faster than Chat-GPT and way more private...

Next I will add a new AI character to interact with, with its own personality learning by the interaction and getting more and more sophisticated in time.

Then I will add some extension to text-generation-webui to extend the possibilities.