Understand 7.1 ships with a fully functional AI library and model. That means Understand can now provide AI descriptions of your code without transmitting any information. All source code and code descriptions remain local to your machine and the results are saved in your project.und directory.


We also have a video on this exciting new feature, here.


The Understand AI feature is designed to work with a dedicated GPU. However, if your machine has integrated graphics or not enough VRAM ( 5 gigs of free VRAM are required ), AI descriptions will be generated using your CPU instead. Using the CPU is considerably slower and should be avoided unless necessary.


This new AI feature can be accessed by going to View->AI Overview or by clicking the new AI icon in the top right corner of any editor:



Once opened, the AI Overview widget will start generating descriptions for your project.



There are currently 3 options available for the AI widget:



  • Background: Off - This disables the AI Overview widget's background processes. Sync events, such as Ctrl + Click, will manually trigger the generation of an AI description if one does not exist already or if the current AI description is out of date.

  • Background: Open Files - This tells the AI Overview to generate AI descriptions for all files currently open in Understand. Newly opened files will be added to the queue.

  • Background: Entire Project - The AI Overview widget will start generating AI descriptions for your entire project. This process can take anywhere from 2 to over 24 hours depending on your machine and project. If the Understand project is closed before completion, the AI Overview widget will pick up where it left off once the project is reopened, so there is no need to complete this process in a single session.


On First launch, Understand will perform a benchmark and choose one of these options as default. If Understand sets your default as 'Background: Off', your machine may not be suitable for generating AI descriptions. Currently, we know that Intel-based Macs and virtual machines will not generate AI descriptions, but there may be other limitations as well.


AI descriptions can be shared between users working on the same project. Within your project.und directory, there is a file called 'ann_AI Overview.json'. As part of your project.und directory, it is designed to be shared. It can even be checked into version control. That means only one machine needs to generate the AI descriptions for a project and can then share those descriptions to all other members working with the same project. So if your machine is unable to generate AI descriptions, there is still a way to enjoy the benefits of Understand AI.


Technical Specifications and Limitations:

Required CPU and optional GPU

x86 with dedicated graphics hardware

AMD Ryzen 3 5300G or Intel Core i5-11400 ( or better in single-threaded benchmarks )

6 GiB free VRAM ( 8 GiB free recommended )

x86 without graphics hardware

AMD EPYC 9184X or Intel Core i9-13900F (or better in multi-threaded tensor benchmarks)

ARM

Apple M1 or better

6 GiB free VRAM ( 8 GiB free recommended )


Free RAM: 6 GiB free

Free disk space: 3 GiB free


Environments where AI features are not supported:

x86 Mac (Intel Mac)

Virtual machines, due to inaccessibility of graphics hardware and graphics software


Minimum integrated GPU: AMD Ryzen 5 5600H, Intel Iris Xe, or Apple M1

Recommended GPU: NVIDIA RTX 4070 SUPER, Radeon RX 7900 XT, Apple M4

Advanced: ( Here be dragons... )



Rerunning the benchmark:

Once Understand decides to use your CPU or GPU, Understand won't run the benchmark again. If your GPU has at least 4 gigs of VRAM, but Understand is still using your CPU, we can try rerunning the benchmark once VRAM has been cleared ( Recommended after machine reboot ). To manually force Understand to rerun the benchmark, we can delete the und AI server's configuration file:

  • Windows – C:\Users\USERID\AppData\Roaming\SciTools\undaiserver.ini
  • Linux/Unix – ~/.config/SciTools/undaiserver.conf
  • Mac OS X – ~/Library/Preferences/com.scitools.undaiserver.plist

Mac’s also require that you run the command 

killall cfprefsd

after deleting the file. Otherwise it will just be restored from the cached settings. 


Once the above file is deleted, launch Understand to trigger the benchmark.


We can also manually enable Understand's AI feature by changing some values in this file. In order for the AI to be enabled, Milliseconds needs to be at or below 20000. Also, Broken=false just in case allocation failed during the speed test.


Understand AI specifics:

Understand ships with a llama 3.2, 1 billion parameter model. Understand also utilizes the llama.cpp library for interacting with the model. 


Fully disable Understand AI:


Understand AI cannot be fully disabled if the AI Overview widget is open. Even when 'Background: Off' is chosen, AI descriptions can still be queue for entities on sync events. If a sync event is triggered and that entity either doesn't have an AI description, or that description is out of date, Understand will queue the generation of a new AI description. 


If AI descriptions are checked into source control, generating new AI descriptions may not be desirable. It is possible to generate AI descriptions for engineers to share. This is particularly useful when using Understand on a machine that is not fit to generate AI descriptions, such as a virtual machine. To fully disable Understand AI, we need to delete/rename the model. You can find it here:


Path2Understand/conf/understand/models/Llama-3.2-1B-Instruct-Q8_0.gguf


This feature is under active development:


We are actively working on Understand's AI feature. If you are running into an issue or have any feedback, please let us know.