rai icon indicating copy to clipboard operation
rai copied to clipboard

`rai_whoami/build_whoami.py` freqeuntly throws various exceptions when using small models (e.g. llama3.1:8b)

Open Cytrus14 opened this issue 7 months ago • 0 comments

Describe the bug When a small model is used (e.g. llama3.1:8b) for complex and simple tasks, the command python src/rai_whoami/rai_whoami/build_whoami.py panda/ --build-vector-db frequently (but not always) throws various exceptions. For example:

Traceback (most recent call last): File "/home//Work/Robotec/rai/src/rai_whoami/rai_whoami/build_whoami.py", line 56, in build_whoami(args) File "/home//Work/Robotec/rai/src/rai_whoami/rai_whoami/build_whoami.py", line 43, in build_whoami info.to_directory(args.output_dir) File "/home//Work/Robotec/rai/src/rai_whoami/rai_whoami/models/models.py", line 180, in to_directory f.write(base64.b64decode(image)) File "/usr/lib/python3.10/base64.py", line 87, in b64decode return binascii.a2b_base64(s) binascii.Error: Incorrect padding

To Reproduce Steps to reproduce the behavior:

  1. Set up RAI according to the quick setup guide
  2. During the project configuration step (i.e., when running the 'poetry run streamlit run src/rai_core/rai/frontend/configurator.py` configuration tool) select a small model (e.g. llama3.1:8b) for both simple and complex task.
  3. Set up the robot's identity according to this example
  4. run the python src/rai_whoami/rai_whoami/build_whoami.py panda/ --build-vector-db command

Expected behavior The src/rai_whoami/rai_whoami/build_whoami.py should not throw an exception. Instead, the user should be informed that the process of building the whomai has failed and provide a recommendation to, for example, use a more sophisticated model.

Screenshots None

Platform

  • OS: Ubuntu 22.04
  • ROS 2 Version Humble
  • Other information: llama3.1:8b Q4_K_M was used as the model for simple task, complex task, and embedding

Version commit 0e12297a468eab719b25228f5e273877605cbdfd

Additional context None

Cytrus14 avatar May 08 '25 08:05 Cytrus14