An open-source web interface for running and chatting with various large language models (LLMs) in a local environment. Highly extensible, based on Gradio, and supports various quantized models such as GGUF, GPTQ, and AWQ.
Text Generation WebUI (commonly known as "Oobabooga") is an open-source project that lets you run LLMs on a local computer. While providing a chat interface similar to ChatGPT, it guarantees complete privacy without an internet connection. Built with Python and Gradio, it is easy to customize, and various extensions can be added in the form of plugins.
The core strength of this tool is its model format compatibility. It can load almost any form of LLM, including Hugging Face's Transformers models, llama.cpp's GGUF format, ExLlamaV2's EXL2 format, and GPTQ and AWQ quantized models. This allows users to choose the optimal model format for their own hardware specifications.
Text Generation WebUI provides a variety of loaders. The llama.cpp loader can use CPU and GPU together, which is useful in environments with limited VRAM. The ExLlamaV2 loader offers the fastest speed with pure GPU inference. The Transformers loader is fully compatible with standard Hugging Face models.
Extensions include speech recognition (Whisper), speech synthesis (TTS), image generation (Stable Diffusion integration), LoRA adapter loading, and long-context processing (RoPE scaling). An API server feature is also built in, so other applications can call the model through a REST API. In particular, it provides an OpenAI-compatible API, so it integrates easily with apps that use the existing OpenAI SDK.
π» Code Example
Example of installing Text Generation WebUI and using its API.
"I ran Llama locally with Oobabooga and it was faster than I expected."
β Sharing the experience of running a LLaMA model locally with Text Generation WebUI (Oobabooga)
"With a GGUF 4-bit quantized model, I can run a 13B on 8GB of VRAM."
β Explaining that a quantized model makes it possible to run a large model on low-spec hardware
"If you turn on the OpenAI-compatible API, you can switch to a local model with almost no changes to your existing code."
β Emphasizing that the OpenAI API-compatible feature makes migration easy
β οΈ Common Mistakes & Cautions
Crash due to insufficient VRAM
If a model exceeds VRAM when loading, a crash occurs. Use the n-gpu-layers option to adjust the number of layers loaded onto the GPU.
Mismatch between loader and model format
GGUF models must use the llama.cpp loader, and GPTQ models must use the AutoGPTQ/ExLlama loader. Selecting a loader that does not match the format causes an error.
Exceeding the context length
If a model's default context length is exceeded, the output becomes strange. Enable RoPE scaling or use a long-context version of the model.
Chat template not applied
Each model has its own prompt template. If you do not select the correct template in the Instruction tab, quality degrades.