Back to All
Project

Large Language Model (LLM) training and integration on Qualcomm® Robotics RB5 Development Kit

This project is a voice-activated chatbot application built with Flask, leveraging advanced AI models to transcribe, understand, and respond to user queries. It uses Google Cloud's Speech-to-Text for audio transcription and integrates the NeMo Large Language Model (LLM) API for response generation. Alternatively, it employs a PEFT-tuned sequence-to-sequence model for natural language processing tasks, ensuring flexible and accurate conversational interactions. The system supports real-time audio recording, transcription, and response delivery.

Objective

The inspiration for this project stemmed from the potential of integrating advanced AI-driven natural language processing (NLP) and speech recognition technologies into robotics. Working with the Qualcomm Robotics RB5 Development Kit, we aimed to explore how these technologies could enhance human-robot interactions. The project was motivated by the desire to create more intuitive and responsive communication systems within robotics, making interactions with robots more natural and efficient.

The desired outcome is to develop a highly accurate and flexible conversational AI system that can be seamlessly integrated into the Qualcomm Robotics RB5 Development Kit. This system will enable real-time audio transcription and intelligent response generation, improving the robot's ability to understand and interact with users. By leveraging advanced AI models like the NeMo Large Language Model (LLM) API and PEFT-tuned sequence-to-sequence models, we aim to create a versatile tool that enhances user experiences in various applications, from customer service robots to educational and assistive technologies.

Equipment Description
Qualcomm Robotics RB5 Qualcomm Robotics RB5 Development Kit
Power adapter
12 V with 2500 mA required by the 96Boards specification
USB to Micro USB cable

USB to USB Type C cable
For serial console interface , to view logs

For connecting the USB3.0 Type C port to the board and flashing images, adb and fastboot
Turtlebot Burger (TurtleBot3) Off the shelf robot from Robotis

Prerequisites:

  1. A Linux host system with Ubuntu 18.04.
  2. Install Android Platform tools (ADB)
  3. Install SSH on host and Qualcomm Robotics RB5 for secure shell communication.
  4. Install python3 on host and Qualcomm Robotics RB5

Setting up the project

1. Steps to Create a Custom Model on NVIDIA NGC:

  • Visit the NVIDIA NGC website. (https://ngc.nvidia.com/)
  • Log in with your credentials.

2. Navigate to the NeMo LLM Service:

  • From the main dashboard, navigate to NeMo LLM Service.
  • In the sidebar, click on Customizations.

3. Create a Custom Model:

  • Click on "Create Custom Model".
    This will open a new setup page to configure your custom model.

4. Select Base Model:

  • Choose a base model, i.e GPT-43B-002. This will be the starting point for your customization.
Qualcomm-image

5. Configure Training Settings:

Training Type: Choose the appropriate training method, such as p-tuning.

Batch Size: Set the batch size. For instance, a batch size of 8.

Learning Rate: Set the learning rate. can set it as 0.0001.

Epochs: Define the number of epochs for training. In the example, it is set to 50 epochs.

Virtual Tokens: set the number of virtual tokens.

6. Upload Your Dataset:

Training Dataset: Upload your training dataset file, such as data.jsonl. Ensure the dataset is formatted correctly for the model.
Validation Dataset: Optionally, upload a validation dataset to monitor training performance.

Qualcomm-image

7. Start Training: 

Click Start Training to begin the customization process. You can monitor the progress on the dashboard.

Qualcomm-image

8. Nemo LLM API Key:

Obtain an API key and organization ID for accessing the Nemo LLM service.

9. Steps to Generate Nemo API Key:

  • Sign Up / Log In:

a. Visit the NVIDIA Nemo Cloud Service website (https://ngc.nvidia.com/).

b. If you do not have an account, sign up for one. If you already have an account, log in using your credentials.

  • Access the NGC Dashboard:

a. After logging in, you will be directed to your NGC dashboard.

  • Navigate to API Keys:

a. On the dashboard, click on your profile icon or name in the top-right corner.

b. From the dropdown menu, select "API Key" or "Setup" to access the API key management page.

  • Generate a New API Key:

a. On the API key management page, click on the "Generate API Key" button.

b. You may be prompted to name your API key or specify its usage to help you remember its purpose.

  • Copy and Store Your API Key:

a. Once the API key is generated, it will be displayed on the screen. Copy the key immediately and store it in a secure location.

b. Note that for security reasons, this will be the only time the full API key is displayed. If you lose it, you will need to generate a new one.

Qualcomm-image

Steps to use the chatbot: 

1. Install Conda on WSL2:

a. Follow the step-by-step guide to install Conda on Ubuntu Linux using WSL2.

b. Link: Install Conda on Ubuntu: Quick & Easy Guide (thesecmaster.com)

c. After installation, create a Conda environment by using the following commands.

$ conda create --name <env_name> python=3.8

d. To check the conda environment list

$ conda env list

e. To activate conda environment

$ conda activate <env_name>

2. Install dependencies:

a. Run the following command to install all the required Python libraries listed in the requirements.txt file:

$ pip install -r requirements.txt

3. LLM Model Inference on Qualcomm Robotics RB5:

a. push the Model to the Qualcomm Robotics RB5 through ssh root<RB5_IP> or adb push.

$ scp -r Inferencing root@<RB5_IP>:/home/

b. Run the inference script to query the model using voice commands. The model will process the input and display the generated text in the user interface.

$ python3 app.py --nemo

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries ("Qualcomm"). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.

Project Authors
Capgemini
Ankitha MAssociate l – Engineer
Avdhesh ChouhanProfessional II
Sahil BandarTech Lead
Ashish TiwariDirector, Principal Engineer
Qualcomm relentlessly innovates to deliver intelligent computing everywhere, helping the world tackle some of its most important challenges. Our leading-edge AI, high performance, low-power computing, and unrivaled connectivity deliver proven solutions that transform major industries. At Qualcomm, we are engineering human progress.

Stay connected

Get the latest Qualcomm and industry information delivered to your inbox.

Subscribe
Manage your subscription

© Qualcomm Technologies, Inc. and/or its affiliated companies.

Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries. Qualcomm patented technologies are licensed by Qualcomm Incorporated.

Note: Certain services and materials may require you to accept additional terms and conditions before accessing or using those items.

References to "Qualcomm" may mean Qualcomm Incorporated, or subsidiaries or business units within the Qualcomm corporate structure, as applicable.

Qualcomm Incorporated includes our licensing business, QTL, and the vast majority of our patent portfolio. Qualcomm Technologies, Inc., a subsidiary of Qualcomm Incorporated, operates, along with its subsidiaries, substantially all of our engineering, research and development functions, and substantially all of our products and services businesses, including our QCT semiconductor business.

Materials that are as of a specific date, including but not limited to press releases, presentations, blog posts and webcasts, may have been superseded by subsequent events or disclosures.

Nothing in these materials is an offer to sell or license any of the services or materials referenced herein.