Effortlessly Build AI Models using MLC LLM

Published On Mon May 08 2023
Effortlessly Build AI Models using MLC LLM

How to Install MLC LLM

If you’re interested in learning how to install MLC LLM (Machine Learning Compilation for Large Language Models), you are in the right place. MLC LLM can help developers and researchers build efficient and scalable AI systems. In this blog post, we will go over the benefits of using MLC LLM and provide steps on how to install it.

Benefits of Using MLC LLM

MLC LLM offers a systematic and repeatable process that prioritizes efficiency and a Python-first approach for constructing models and optimizations. This technique enables quick experimentation with new models, ideas, and compiler passes, resulting in native deployment to the appropriate targets. Furthermore, MLC LLM creates GPU shaders for CUDA, Vulkan, and Metal as a starting point and supports a variety of CPU targets, including ARM and x86, through LLVM.

Steps to Install MLC LLM

To install MLC LLM, we provide a CLI (command-line interface) app. Before installing the CLI app, you should install some dependencies first. Here are the steps to install MLC LLM:

  1. Open your terminal or command prompt.
  2. Type the following command to create a new conda environment named “mlc-chat”.
  3. After creating the environment, activate it by typing:
  4. Next, install Git and Git-LFS using the following command:
  5. Now, install the chat CLI app from Conda using this command:
  6. Create a directory named “dist” using the following command:
  7. Download the model weights from Hugging Face and binary libraries from GitHub using the following commands:
  8. Finally, to start chatting with the bot running natively on your machine, enter the following command:

You should now be able to enjoy chatting with the bot!

In conclusion, MLC LLM offers a flexible and efficient way of building AI models. With MLC LLM, developers no longer have to rely on strong clusters and costly hardware for model inference. By following the steps provided above, you can easily install MLC LLM and start experimenting with new models and ideas. If you have any questions or feedback, feel free to leave them in the comment section below.